Sitecore Login Fails With No Error Message
May 11, 2017
It's All In the Cookies (This Time)
Here's an interesting symptom: you open the Sitecore login page ("https://example.com/sitecore/login"), enter your username and password, hit "Log In," and... apparently nothing happens. In reality, the form does its POST, but the login appears to be unsuccessful and there is no error message to indicate a problem.
I've seen this happen a couple of different times, and each time there was a different solution. First thing's first, check your Sitecore log files. Since the login page isn't providing any information, the Sitecore log is invaluable. In my case, I was seeing this:
7920 15:48:03 INFO AUDIT (sitecore\admin): Login 996 15:48:03 INFO AUDIT (sitecore\admin): Logout 996 15:48:03 WARN Protected page accessed with no current user
Hmm, a successful login with an immediate logout? Weird. "Protected page access with no current user" sounds like a session issue. Sure enough, clearing my cookies for that domain did the trick. I was able to successfully login to Sitecore after clearing my cookies.
But how did I go so wrong in the first place? I was previously debugging issues with an integration site, and I reset the IIS AppPool several times. One of my previous ASPXAUTH cookies was getting mixed up with the current session.
But Wait, There's More
This exact same login problem has happened to me on a different project, but with a different cause: the underscore ("_") character cannot be part of a URL in a Sitecore site. I was using something like "http://demo_client.local" for a test site. The same consecutive Login/Logout INFO messages will be present in the Sitecore log. Changing the site hostname is a quick fix. A couple of great resources highlight this problem:
Do you have questions, comments, or corrections for this post? Find me on Twitter: @SitecoreSpark