views:

223

answers:

0

I have written an HttpModule that adds a response filter. The filter is capturing page output and storing it in a session variable.

  1. I am able to access HttpContext.Current.Session in my HttpModule.
  2. The HttpModule is handling the PostAcquireRequestState event.
  3. I am still able to access HttpContext.Current.Session in the PostAcquireRequestState event.
  4. In the PostAcquireRequestState event, I add a custom stream that inherits from Stream to Response.Filter
  5. HttpContext.Current.Session is null when accessed from the Stream.Write method.

Everything worked fine when using an InProc SessionState. However, I now must use StateServer. Using StateServer, the code is now broken.

Any ideas?