472,127 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

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 1666
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.