Solved: HttpContext.Current.Session is null



I am trying to convert an application from VWG to WiseJ and encounter a problem. In old days, VWG use the same way as “normal” web application that it use HttpContext.Current.Session to hold session object.

Therefore, I can create some share libraries that can be used in web development, no matter it is VWG, “normal” ASP.NET web, or Web Services (WCF), etc, as all share the same way to handle the Session.

However, in WiseJ, I noticed that the Session is now in Application.Session. And I find that the HttpContext.Current.Session is null.

So, I would like to know, is there any way to make WiseJ application use the “standard” way to manage the Session object (that is, use HttpContext.Current.Session instead)? In addition, with session object in HttpContext.Current.Session, the config section and IIS setting will be useful, such as:

<sessionState mode="InProc" regenerateExpiredSessionId="false" stateConnectionString="tcpip=" sqlConnectionString="data source=;Trusted_Connection=yes" cookieless="false" timeout="3" />

In WiseJ, when using Application.Session, how I can config the Session ?

Lastly, I have WCF and VWG Forms in the same application (Same VS project, deploy to one IIS path, such as http://server/erp ), I use Global.asax.cs to initialize the system. I find that when I load the WiseJ application, the Application_Start() will run but when a new user load the web the Session_Start() will not run.

In all, is WiseJ is a “standard” ASP.NET application ? How the problem of “HttpContext.Current.Session” and “Session_Start()” can be solved ?

Thanks and regards,

Felix CHAN

  • You must to post comments
Best Answer

Hi Felix,

you can find a similar question here:

Hope that helps.

Best regards

  • Felix CHAN
    Hi Frank, Thanks for the info. Regards, Felix CHAN
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.