Moving from Session mode InProc to StateServer
-
This is so FRUSTRATING... I was losing session information when embedding an iFrame inside a PHP site, so decided to switch from InProc mode of sessions to StateServer. Made/added the following lines to my web.config:
<sessionState mode="StateServer" timeout="60" cookieless="AutoDetect" stateConnectionString="tcpip=localhost:42424" /> <pages enableSessionState="true"> <httpModules> <add name="Session" type="System.Web.SessionState.SessionStateModule" />
and yet, the first time I touch a Session variable I get a: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration. I am using Master and Pages and the Session is in the Master Page_Load code behind. Any help is greatly appreciated. -
This is so FRUSTRATING... I was losing session information when embedding an iFrame inside a PHP site, so decided to switch from InProc mode of sessions to StateServer. Made/added the following lines to my web.config:
<sessionState mode="StateServer" timeout="60" cookieless="AutoDetect" stateConnectionString="tcpip=localhost:42424" /> <pages enableSessionState="true"> <httpModules> <add name="Session" type="System.Web.SessionState.SessionStateModule" />
and yet, the first time I touch a Session variable I get a: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration. I am using Master and Pages and the Session is in the Master Page_Load code behind. Any help is greatly appreciated.Steve van Niman wrote:
I was losing session information when embedding an iFrame inside a PHP site,
So, you want to maintain Session for two different site ? Have a look into this article, It may help you Exploring Session in ASP.Net[^]
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
-
Steve van Niman wrote:
I was losing session information when embedding an iFrame inside a PHP site,
So, you want to maintain Session for two different site ? Have a look into this article, It may help you Exploring Session in ASP.Net[^]
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
No - just one site. Just need to get it out of IIS. Server managing sessions is the same server; however, if this is in place, then I am set to start a server farm if necessary.
-
No - just one site. Just need to get it out of IIS. Server managing sessions is the same server; however, if this is in place, then I am set to start a server farm if necessary.
what about Iframe inside in PHP Site? I am not able to understand section ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
-
what about Iframe inside in PHP Site? I am not able to understand section ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
Please don't worry about iFrame in PHP at this point. I can't get this to run as a simple website on my machine...
-
This is so FRUSTRATING... I was losing session information when embedding an iFrame inside a PHP site, so decided to switch from InProc mode of sessions to StateServer. Made/added the following lines to my web.config:
<sessionState mode="StateServer" timeout="60" cookieless="AutoDetect" stateConnectionString="tcpip=localhost:42424" /> <pages enableSessionState="true"> <httpModules> <add name="Session" type="System.Web.SessionState.SessionStateModule" />
and yet, the first time I touch a Session variable I get a: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration. I am using Master and Pages and the Session is in the Master Page_Load code behind. Any help is greatly appreciated.Wow - sometimes it amazes me as to how frequently the "website" or "project" becomes corrupted in Visual Studio. At wits end, started brand new website and literally copied over web.config from website giving me issues with sessionState - StateServer. Worked out of the gates... Ok so my config was correct, so why would my existing site not work? Went to \windows\Microsoft.Net\Framework\n.n.nnn.release\Temporary ASP.NET Files\ and deleted all websites - still a no go. Then remembering what one of my friends told me, "It is common for the solution/website to become corrupted. When this happens, copy all files to a new directory and start over. Bingo - works out of the gate. Lost two days on something that should have worked because the platform I'm on cannot remain uncorupted...