ASP.NET Session State
Posted by Arvand Sabetian (Import) on 04 June 2010 03:05 AM
|
|
This article at Microsoft provides detailed analysis of different modes that can be used to store states: http://msdn.microsoft.com/en-us/library/ms972429.aspx <configuration> <system.web> <sessionState mode="StateServer" cookieless="false" timeout="20" /> </system.web> </configuration>
After changing sessionState to StateServer, we recommend creating a key. Visit this URL: http://aspnetresources.com/tools/machineKey , use it to generate a key and insert it between the <sessionState> and </system.web> tags like so: <system.web> <sessionState mode="StateServer" stateNetworkTimeout="600" /> <machineKey decryptionKey="1FB9CFB57F1B2E5E1F257BA,IsolateApps" validationKey="0AF99CB33B4E213F432C8CB6F5DF6907,IsolateApps" /> </system.web> If switching to StateServer is giving you an error, the asp net service may need to be turned on at the server level. Please contact support. For further explanation on what the above tags mean, please refer to the Microsoft post at the start of this post. It is also possible your application does not support session state -- refer to the developer(s) of your script to confirm. Forum posts that can help: http://forum.arvixe.com/smf/general/increasing-session-timeout/ - http://forum.arvixe.com/smf/general/asp-net-forms-authentication-premature-timeouts/ | |
|
Thanks
Shaheem
<system.web>
<sessionState mode="StateServer" cookieless="false" />
</system.web>
</configuration>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="60" />
This results in frequent timeouts. The app's documentation says to change it to:
<sessionState mode="StateServer" stateConnectionString="tcpip=serverName:42424" sqlConnectionString="data source=serverName;Trusted_Connection=yes" cookieless="false" timeout="60" />
No matter what I substitute for serverName, I get a 500 server error. What serverName should I use?