2012-07-13 38 views

回答

0

如果您使用ASP.NET 2.0的sessionState屬性然後你可以調整你的web.config

<sessionState 
mode="InProc" 
stateConnectionString="tcpip=127.0.0.1:42424" 
stateNetworkTimeout="10" 
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI" 
sqlCommandTimeout="30" 
customProvider="" 
cookieless="UseCookies" 
cookieName="ASP.NET_SessionId" 
timeout="20" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE 
allowCustomSqlDatabase="false" 
regenerateExpiredSessionId="true" 
partitionResolverType="" 
useHostingIdentity="true"> 
<providers> 
    <clear /> 
</providers> 
</sessionState> 

timeout有一個在偷看MSDN Documentation of the sessionState attribute

+0

thx爲您的反饋。我使用了這種配置,但是我的會話持續時間不夠長 – user168507 2012-07-13 15:22:22

+0

只需將超時時間增加到任何想要的值。 – 2012-07-13 15:49:26