Can I change the FormsAuthentication cookie name? Can I change the FormsAuthentication cookie name? asp.net asp.net

Can I change the FormsAuthentication cookie name?


You can adjust it in your web.config file:

<authentication mode="Forms">  <forms name=".CookieName" loginUrl="LoginPage.aspx" /></authentication>


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

<authentication mode="Forms">    <forms name="RoleBasedAuthenticationCookiename" loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx">    </forms></authentication>