开发者

Automatic logout when login in other site in the same server

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜