Last post Jun 25, 2018 09:21 AM by Brando ZWZ
Jun 22, 2018 02:37 PM|RagavanB|LINK
As ASPState In-Memory introduced, am migrating the sql server session state to ASPStateInMemory.
Our website has multiple application hosted under single site and all applications need to share the same session from the sql server db. The current hosted website uses sessionstate mode as sqlserver and all applications are grouped with a application name.
So there is no problem in current structure.
<sessionState allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="xxxxxx;Application Name=SessionTest;" timeout="180" cookieless="false"/>
As I tried to migrate to ASPStateInMemory (Microsoft.Web.SessionState.SqlInMemoryProvider) the session state is not getting shared by the applications. A new session is getting created for every application.
My website structure would be like:
|- RootWebsite(having the login page)
We have created the ASPStateInMemory database, and added SqlInMemoryProvider to our application with .net framework 4.5.
The problem is all the applications are not sharing the same session db.
Can someone help me to handle multiple applications using new In-Memory structure?
Jun 25, 2018 09:21 AM|Brando ZWZ|LINK
As far as I know, the sql in-memory could be used in Web Farm and Web Garden scenarios
According to your description, I couldn't directly find the reason why the in-memory session state doesn't share the session.
Could you please post the web.config you have used now?
Do you install the newest the Microsoft. AspNet. SessionState. SqlSessionStateProviderAsync package?
About how to use it, you could refer to this
If you could post more details information, it will be more easily for us to find the solution.