Can I change the cookie name FormsAuthentication?

Can I change the cookie name FormsAuthentication?

If so, how?

The problem I am facing is that when I have two web applications that are deployed in one domain, then when someone logs in, the second one will be automatically logged out because they use one and same authentication cookie name.

+53
cookies forms-authentication
Jul 12 '11 at 9:20
source share
2 answers

You can configure it in the web.config file:

<authentication mode="Forms"> <forms name=".CookieName" loginUrl="LoginPage.aspx" /> </authentication> 
+77
Jul 12 '11 at 9:22
source share

Yes, you can specify the cookie name in the web.config on forms element in the authentication element.

 <authentication mode="Forms"> <forms name="RoleBasedAuthenticationCookiename" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx"> </forms> </authentication> 
+11
Jul 12 2018-11-11T00:
source share



All Articles