I have an MVC application that hosts an API documentation site sitting behind auth forms. There are only two pages on the site ... home, which lists (at a high level) all the endpoints on the site, as well as data objects. You can click any of these data objects / endpoints and go to the details page.
Each of my pages is decorated with the attribute [Authorize(Roles="role,names,here")] . As expected, when you enter the site, you are redirected to the login page, and any subsequent requests just work.
However, yesterday the site began to operate, and I'm not sure why. After the initial login, the page you requested loads just fine. However, each time you click a link to go to any of the other pages, users are redirected to the login page, and the credentials no longer work.
Any thoughts on what caused this, and how can I fix it?
[Edit] I donβt know why, but my sessionState configuration was commented out in my web.config (I didnβt, and as I said, it worked 48 hours ago), but it seems to upset this:
<sessionState mode="InProc" customProvider="DefaultSessionProvider"> <providers> <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="dbConn"/> </providers> </sessionState>