无法在asp.net中维护SessionState [英] Unable to maintain SessionState in asp.net

查看:78
本文介绍了无法在asp.net中维护SessionState的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有asp.net网站,C#和sql server作为数据库。这个网站目前正在域名上运行。



我正在努力维持会话状态,但我仍未能得到......



这是我到目前为止所尝试的,在web.config中,我添加了这一行



<&的System.Web GT; 
< sessionState mode =InProccookieless =falsetimeout =1440/>
< authentication mode =Forms>
< forms loginUrl =〜/ Default.aspxtimeout =1440/>
< / authentication>
< compilation debug =truetargetFramework =4.0>



< /system.web>





本地工作,但在域上它没有工作......

它将用户拖动到登录页面工作或闲置超过20分钟。



任何人都可以帮助我,我该怎么解决这个问题,

n允许用户工作,n维持会话状态。



谢谢

解决方案

< blockquote>即使您设置了Web配置会话超时,您也需要设置IIS应用程序池超时。

http://technet.microsoft.com /en-us/library/cc771956(v=ws.10).aspx [ ^ ]

http://bradkingsley.com/iis7-application-pool-idle-time-out-settings/ [ ^ ]

http://stackoverflow.com/questions/1596267/how-to-disable-the-应用程序池空闲时间out-in-iis7 [ ^ ]


Hi guys,

I have asp.net web site with C# and sql server as database. This web site is currently running on domain.

i'm trying to maintain the session state, but still i'm failed to get..

this is what i have tried so far, in web.config, i have added this line

<system.web>
    <sessionState mode="InProc" cookieless="false" timeout="1440"/>
    <authentication mode="Forms">
      <forms loginUrl="~/Default.aspx" timeout="1440"/>
    </authentication>
    <compilation debug="true" targetFramework="4.0">
.
.
.
</system.web>



locally its working, but on domain its not wokring...
its dragging the user to the login page while working or on idle for morethan 20mins.

can anyone plz help me, how can i solve this,
n allow user to work, n maintain session state.

Thanks

解决方案

even you set web config session timeout you need to set your IIS app pool timeout as well.
http://technet.microsoft.com/en-us/library/cc771956(v=ws.10).aspx[^]
http://bradkingsley.com/iis7-application-pool-idle-time-out-settings/[^]
http://stackoverflow.com/questions/1596267/how-to-disable-the-application-pool-idle-time-out-in-iis7[^]


这篇关于无法在asp.net中维护SessionState的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆