-1
Hey there, guys. I have two ASP.NET MVC5 applications on the same server on the same site. I’m trying to make one authentication valid for both projects. I have already set a cookie name for both applications, even though it didn’t work.
I’m trying to share the same login cookie to two differents MVC5 Projects.
I’ve already set the same cookie name to Both Projects, but thats doesnt work.
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
CookieName = "OrienteIntegrada",
Provider = new CookieAuthenticationProvider
{
// Permite que o aplicativo valide o carimbo de segurança quando o usuário efetuar login.
// Este é um recurso de segurança que é usado quando você altera uma senha ou adiciona um login externo à sua conta.
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
}
});
Applications are accessed like this: server/test and server/teste2;
I have to configure something in IIS or in another class related to Identity?
Thanks in advance.