Try our conversational search powered by Generative AI!

Login issues in EPiServer after upgrade from 7.5=>7.7

Vote:
 

We had a fully working EPiServer Commerce application that was upgraded from R3=>7.5, but after we upgraded it to 7.7 (cause we needed the dictionary support) we couldn't login in EPiServer admin/edit mode. Was no issues logging in to the CM site. If we logged in with incorrect credentials we got "login failed", if we logged in with correct user credentials, we just got redirected to the loginpage again.

When I investigated the cookie, I noticed that the expire date was set to 1999, which made the browser to drop the cookie. After some research I've noticed that the upgrade added a lot of code to the Global.asax file (not the cs file which made it hard to find). And after removing this code:

HttpCookie cookie = HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
                if (cookie != null)
                {
                    FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(cookie.Value);
                    appName = ticket.UserData;
                }

                if (appName.Length == 0)
                {
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage();
                    httpApplication.CompleteRequest();
                }

We could login again, so my question is, this code must have been added cause of a reason? And after googling on why my UserData gets empty I'm getting the answer that u can't create a ticket yourself and as well use RedirectToLoginPage.

This code is in my Global.asax in the webproject and in the CM site GLobal.asax as well, and that site is working. So maybe the code shouldn't be there for the website project? I'm thinking if something went wrong with the Nuget installation and it installed it by mistake in my webproject as well?

It is more things that is acting suspicious, for instance, if I go to the startpage, I'm getting redirected to Apps/Shell/Pages/default.aspx   (for the website project, not the CM site) and that seems very weird to me. I also got the Apps folder in my website project and in the CM project.

Anyone with info on this?

/J

#87653
Jun 18, 2014 17:58
Vote:
 

This simply happened because we installed by mistake the CommerceManager Nuget package for the EPiServer website as well.

/J

#87913
Jun 25, 2014 14:20
* 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.