web 3.0

HttpHandler and Session State

Its funny when you use a specific solution to solve many problems over and over and then you find out the limitation of your “genius” solution.  Kind of a let down huh?  What if you soon discover that your solution still is “genius” and solves the problem you thought you had.  that is a good feeling if I say so myself. 

I just started to "heavily using HttpHandlers that are dependant on the session state.  The site that I have been working on requires Session so there was no way around it.  The issue that kept coming up is that the context.Session that was getting passed to the ProcessRequest method was always null.  I needed the Session and the link I am including gave me the answer. 

To save you the read, you can use to Interface markers to tell IIS that you need the Session passed to your handler, IRequiresSessionState or IReadOnlySessionState.  Guess what, you know have the current Session being passed to your handler.   Hope it helps.

 

http://bytes.com/groups/net-asp/341797-session-object-null-http-handler

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Categories: .Net | Visual Studio | Tips and Tricks | Microsoft

Bookmark and Share
Comments are closed