Session State, Forms Authentication and HttpContext. Items all are unrelated - so not sure why are you mixing them up. The forms authentication has its own cookie separate from session cookie and its life time can be different.
You can have session state irrespective of user has been authenticated or not. I am also not certain how you are storing UseProfile object in the session cookie - advise to put some code HttpContext. Items is property bag associated with the each HttpRequest note that this collection is available only for the request life time and there is no built-in mechanism to persist the collection.So its unlikely that you are going to get your UserProfile object in this collection unless you are putting it there for each request in some module or global.asax.
You need to explain what exactly you are doing perhaps with code samples!
Session State, Forms Authentication andHttpContext. Items all are unrelated - so not sure why are you mixing them up. The forms authentication has its own cookie separate from session cookie and its life time can be different.
You can have session state irrespective of user has been authenticated or not. I am also not certain how you are storing UseProfile object in the session cookie - advise to put some code. HttpContext.
Items is property bag associated with the each HttpRequest - note that this collection is available only for the request life time and there is no built-in mechanism to persist the collection. So its unlikely that you are going to get your UserProfile object in this collection unless you are putting it there for each request in some module or global.asax. You need to explain what exactly you are doing perhaps with code samples!
I am using IReadOnlySessionState coz I ran out of ideas and it came up during a google search, thought I mention it so people won't answer me with that. User Profile is extracted from the ticket in the session cookie in the global. Asax and assigned to the HttpContext.Items.
But at times it is still null in the http handler (on the deployed server). – Titan Jul 5 at 13:48 @Titan, can you post the code that puts data into and gets out of the session cookie? Its a bit unusual to use session cookie to store custom data - I would have rather chosen a separate cookie!
– VinayC Jul 6 at 4:20.
I am having trouble accessing the HttpContext. Itemstypeof(UserProfile) object sometimes when the Http Handler is called, where UserProfile is the object stored in the session cookie via forms authentication. It works 100% of the time when I open the browser on the same machine it is being deployed or debugging in visual studio, but it fails out randomly when I test from a remote computer.
I put in some tracing, and basically the HttpContext. Itemstypeof(UserProfile) is null even when the Session Cookie was passed successfully, according to fiddler. I have tried implementing IReadOnlySessionState in the HTTPHandler but it still does not work.
I do realise that sometimes, after like 3 minutes or more of logging in, it works 100% of the time after that.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.