Organizational Research By

Surprising Reserch Topic

httpcontext current session is null in ashx file


httpcontext current session is null in ashx file  using -'c#,asp.net,.net,session,generic-handler'

I saw some questions (Here and Here) but they do not answer my question.
I am trying to call Ajax using "ajax.ashx" file, and in function to access Session.
For some reason, the value of the Session object itself is null.

Use example:

Session = HttpContext.Current.Session // This is null


Or:

public virtual void ProcessRequest(HttpContext context)
{
    System.Web.SessionState.HttpSessionState Session = context.Session;
    // This is null
}


In the Web.config:

<sessionState timeout="1800"></sessionState>

    
asked Sep 11, 2015 by SetScheid
0 votes
18 views



Related Hot Questions



Government Jobs Opening


...