I have an ASP.NET MVC application that is configured to use SQL Server to save the session state. If there is an issue with the session state connection string (invalid password, server, etc) my application is redirecting to an error page (HomeController action).
The problem is that before it enters my controller action code it throws another error. Then it enters a death loop and the browser finally kills it.
If the session state database connection string is good, the error page presents as expected.
I want to stop this from happening and add some useful debugging information. This has to be happening somewhere in the base of the page that I can't seem to put my finger on. I don't understand the full page life cycle of an ASP.NET MVC page to know where to look.
Any help will be greatly appreciated.
[AllowAnonymous]. If like the rest of the controller routes it is trying to validate the authentication/authorization and your session state has gone poof I'd expect you'd end up in a death loop. A misconfigured connection string might be a never event, but the session database going offline isn't. (Site won't work either way, but death loops don't help convey a problem and the site being down to the users)