开发者

Automatic logout when login in other site in the same server

开发者 https://www.devze.com 2023-04-12 00:55 出处:网络
We develop 2 sit开发者_如何学Goes in asp.net, this both use forms authentication, when a user login in one of this sites it work fine, but if login into the second site, it\'s logout for the server of

We develop 2 sit开发者_如何学Goes in asp.net, this both use forms authentication, when a user login in one of this sites it work fine, but if login into the second site, it's logout for the server of the first site, the authentication of both sites have the same usecontrol.

thanks


How are you using Forms Authentication? Are you using cookies? If so, you might need to associate the cookie to the domain name. Something like this:

Dim c As HttpCookie = FormsAuthentication.GetAuthCookie(User.Identity.Name.ToString, False)
c.Domain = "webiste.com"
Response.AppendCookie(c)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号