web.config
//configuration/system.web/authentication/forms/@name
<configuration> <system.web> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" defaultUrl="~" name="tokenA" /> . . .
//configuration/system.web/sessionState/@cookieName
<configuration> <system.web> <sessionState cookieName="tokenA" /> . . .
Startup.Auth.cs
public partial class Startup { public void ConfigureAuth(IAppBuilder app) { app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login"), /* Add the following line */ CookieName = "tokenB" }); . . . } }
Global.asax.cs
public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { System.Web.Helpers.AntiForgeryConfig.CookieName = "tokenC"; . . .