Session is null - need IRequiresSessionState interface

257 views
Skip to first unread message

schiffm

unread,
Dec 6, 2011, 9:23:47 AM12/6/11
to ExtDirectHandler
I need to access the Session in my Direct methods. I'm trying to add
variables to the Session in Global.asax, specifically in
Application_PreRequestHandlerExecute. My application always did this,
even using a different implementation of Ext.Direct.

Now, with your ExtDirectHandler, my "/rpc" request are coming into the
PreRequestHandlerExecute handler, but the HttpContext.Current.Session
is null.

After spending several hours trying to find the answer, I found the
following post:

http://stackoverflow.com/questions/1382791/asp-net-what-to-do-if-current-session-is-null

The top answer lists 3 possible causes, and the third bullet
definitely applies. I tried adding
System.Web.SessionState.IRequiresSessionState to the DirectHttpHandler
class, and the whole thing just worked!

Could you please add the IRequiresSessionState interface to the
DirectHttpHandler class?

Thanks,

Mariana

Gian Marco Gherardi

unread,
Dec 6, 2011, 9:27:44 AM12/6/11
to extdirec...@googlegroups.com
Yes, seems a good idea.

Reply all
Reply to author
Forward
0 new messages