By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

why can't I access SessionState from custom HttpHandler?

P: n/a
hi all!

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

greetings, ralf
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.