Skip to content

HttpContext.Current.Session is null #646

Description

@itg-assistant

Felix CHAN asked 2017-02-24 02:38:30 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions