ASP MVC 5 HttpContext.Current.Request.IsAuthenticated is still TRUE after IIS app pool recycle

113 Views Asked by At

On IIS app pool recycle HttpContext.Current.Session items are null but HttpContext.Current.Request.IsAuthenticated is TRUE, how this this can be set false. We are using OWIN middleware Cookie based authentication scheme. Authorize filter is checking HttpContext.Current.Request.IsAuthenticated value and ActionFilter is further pre-checking HttpContext.Current.Session items value for further action.

On appdomain recycle Authorize filter get the HttpContext.Current.Request.IsAuthenticated value as TRUE so request is passed to ActionFilter, inside action filter session values are null so request got stuck for further processing. Is there any solution,configuration exist which will set HttpContext.Current.Request.IsAuthenticated value to FALSE on appdomain recycle.

0

There are 0 best solutions below