Hi how do I set up an http handler so I can manipulate IRequiresSessionState? I need to change when I can access session state. There is a stackoverflow question that takes me 90% of the way there, I am just too green in c# to know how to actually implement it and get it to work. If one of you experts could give me a quick 123 I would be eternally grateful.
Asked
Active
Viewed 3,809 times
3 Answers
0
The code in this answer seems to be a pretty complete implementation of a HttpModule
that's guaranteed to have access to session state. Could you be more specific about what's not working or what else you need it do to?

Community
- 1
- 1

stevemegson
- 11,843
- 2
- 38
- 43
-
I am trying to access a session preinit. Could you step me through the process on how to use this code. e.g. 1. create a new class. 2. paste the code in. 3. at the top of the class the needs to access the session type "bla bla bla" to use the class you just created. – Praesagus Aug 28 '09 at 19:18
0
IRequiresSessionState is a marker interface. It doesn't have any members. There's nothing to implement. If you mark a class with it, the class has access to the Session. It's that simple.

Axl
- 8,272
- 2
- 26
- 18
-
I'm sorry I am pretty new to c#. I don't know what it means to 'mark' a class with it - put it in the class? Then what, I will have access to the session without referring to the code I just put in? – Praesagus Aug 28 '09 at 19:13