469,600 Members | 2,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

why can't I access SessionState from custom HttpHandler?

hi all!

in my custom HttpHandler HttpContext.Current.Session is not set - why?

greetings, ralf
Nov 19 '05 #1
3 1586
The SessionState is handled by an HttpHandler, and it's possible that your
HttpHandler is called before the SessionState HttpHandler.

By implents the IRequiresSessionState (marker interface), you prevent your
HttpHandler to be called before the SessionState HttpHanlder, and so you can
use the session.

"Ralf Müller" wrote:
hi all!

in my custom HttpHandler HttpContext.Current.Session is not set - why?

greetings, ralf

Nov 19 '05 #2
Wow! Thank you very much! Didn't expect the solution to be that easy...

"Cyril S." <Cy****@discussions.microsoft.com> schrieb im Newsbeitrag
news:72**********************************@microsof t.com...
The SessionState is handled by an HttpHandler, and it's possible that your
HttpHandler is called before the SessionState HttpHandler.

By implents the IRequiresSessionState (marker interface), you prevent your
HttpHandler to be called before the SessionState HttpHanlder, and so you can use the session.

"Ralf Müller" wrote:
hi all!

in my custom HttpHandler HttpContext.Current.Session is not set - why?

greetings, ralf

Nov 19 '05 #3
Hello Cyril S.,

And if you only require read only session state, you implement IReadOnlySessionState
instead of IRequireSessionState.

--
Matt Berther
http://www.mattberther.com
The SessionState is handled by an HttpHandler, and it's possible that
your HttpHandler is called before the SessionState HttpHandler.

By implents the IRequiresSessionState (marker interface), you prevent
your HttpHandler to be called before the SessionState HttpHanlder, and
so you can use the session.

"Ralf Müller" wrote:
hi all!

in my custom HttpHandler HttpContext.Current.Session is not set -
why?

greetings, ralf

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by DalePres | last post: by
9 posts views Thread by Jared Tullis | last post: by
8 posts views Thread by bryan | last post: by
10 posts views Thread by Nemisis | last post: by
1 post views Thread by henke.lundin | last post: by
6 posts views Thread by =?Utf-8?B?SmF5IFBvbmR5?= | last post: by
5 posts views Thread by Author | last post: by
3 posts views Thread by =?Utf-8?B?UGF0UA==?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.