Solved: HttpContext.Current.Session is null

Answered
0
0

Hi,

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=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;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
1
0

Hi Felix,

you can find a similar question here: https://wisej.com/support/question/httpcontext-current-session-is-null

Hope that helps.

Best regards
Frank

  • 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.