G
Guest
Hi, I have a strange problem, perhaps someone has some idea. I have a custom Principal and Identity. Once the user is authenticated the principal gets saved in the current session (or current context cache, I tried both). On every request the principal is reconstructed. Everything works perfect on the developlement server and it works perfect for about 20 seconds on the deployement server. The web application is deployed on a web hosting with ASP.NET 1.1, so I don't have access to the server. What happens is that after a few seconds the session looses all it's content. The way I know is that the Requst.IsAuthenticated is still true, but the variable saved in the session as well as the variable saved in the current context cache disapper... I have a main page class that all other pages derive from and I check if the request is authenticated and if it is I try to: 1) first cast the existing principal to my custom principal. If that fails, I retrieve a value from the context.cache and try to do the same thing. If that fails I try to retrieve a value from the Session. If that fails I redirect the page to an error page where I display some info. Here is how that one looks like
===
Error number: 999
Could not convert login information to a readable format
Session count: 0
Session is cookiless: False
Session is new: False
Session is syncronized: False
Session is readonly: False
Session Mode: InProc
Session ID: 5ra5ra455ntwc5apuav2dt55
Session timeout: 45
User: System.Security.Principal.GenericPrincipal ---> the request is still authenticate
User: ---------------------------------------------------> but we couldn't cast it to our custom principal
Session ID: 5ra5ra455ntwc5apuav2dt5
=========================
My question is: how can the session still be the same (session is new = false), the request still be authenticated but the variables that I save in the session and the cache disappear?? Is it an IIS setting somewhere? Again, this works without any problem on the local server..
Any help would be appreciated
Thank you
===
Error number: 999
Could not convert login information to a readable format
Session count: 0
Session is cookiless: False
Session is new: False
Session is syncronized: False
Session is readonly: False
Session Mode: InProc
Session ID: 5ra5ra455ntwc5apuav2dt55
Session timeout: 45
User: System.Security.Principal.GenericPrincipal ---> the request is still authenticate
User: ---------------------------------------------------> but we couldn't cast it to our custom principal
Session ID: 5ra5ra455ntwc5apuav2dt5
=========================
My question is: how can the session still be the same (session is new = false), the request still be authenticated but the variables that I save in the session and the cache disappear?? Is it an IIS setting somewhere? Again, this works without any problem on the local server..
Any help would be appreciated
Thank you