Try our conversational search powered by Generative AI!

Login does not work in Azure

Vote:
 

I have an Alloy site that we created a couple of weeks ago that are running the latest version of Epi (as we speak ;-) ).

I am trying to move it to Azure to use it as a demo site and everything is working great except that it is impossible to login.

It just keep telling me that the username and/or password is wrong.

I am using EPiServer AspNetIdentity and when I run it local against the database, blobs, service bus (but the site on IIS Express) it works to login to the site, but when published in Azure it does not.

The site works for everyting else, just the login that does not work so the Database and Blobs is ok.

Anyone got any ide'a?

#183575
Oct 17, 2017 21:24
Vote:
 

Try adding a CookieDomain to the Identity code in Startup. See last property in the CookieAuthenticationOptions below, set to a wildcard domain for multisite authentication.

app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString(Global.LoginPath),
                Provider = new CookieAuthenticationProvider
                {
                    // Enables the application to validate the security stamp when the user logs in.
                    // This is a security feature which is used when you change a password or add an external login to your account.
                    OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager<ApplicationUser>, ApplicationUser>(
                        validateInterval: TimeSpan.FromMinutes(30),
                        regenerateIdentity: (manager, user) => manager.GenerateUserIdentityAsync(user))
                },
                CookieDomain = ".egandalf.com"
            });
#183580
Oct 17, 2017 21:48
Vote:
 

Yeah domain thingy check answer here

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2017/9/the-quick-navigator-not-available-when-using-different-quoteditquot-domain/

see ya! 

#183589
Oct 17, 2017 23:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.