如何使用表单身份验证将会话超时增加到1小时 [英] How to increase session timeout to 1 hour using forms authentication

查看:77
本文介绍了如何使用表单身份验证将会话超时增加到1小时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在web.config中使用以下代码,但它无法正常工作。

如果有任何想法请帮助我。



Hi All,
I am using following code in web.config but its not working.
if any idea please help me.

<authentication mode="Forms">
      <forms loginUrl="Login.aspx" timeout="60" />
   </authentication>
   <sessionState mode="InProc" cookieless="false" timeout="60"/>





谢谢。



Thanks.

推荐答案

你可以用不同的方式做到这一点,



You can do that in different ways,

In web.config
<sessionState timeout = "60" mode = "InProc">
Default value must be there as 20

Else you can do that from IIS level
On IIS select the website you want to change the default session time out. Click on "Session State". provide the Time-out(in minutes): as 60


以下代码绝对正确。

我发现的问题我没有增加File Zilla中的超时从我托管项目的位置。





Following code is absolutely correct.
The problem what I found that I was not increasing the timeout in File Zilla From where I have hosted my Project.


<authentication mode="Forms">
      <forms loginUrl="Login.aspx" timeout="60" />
   </authentication>
   <sessionState mode="InProc" cookieless="false" timeout="60"/>





感谢您的回复。



Thanks for ur replies.


我对这件事情并不完全,我最近y浏览此链接 http://www.javatpoint.com/java-tutorial [ ^ ]这对我的工作很有帮助。我认为这个链接可以帮助你。
I did not exactly about this matter, i recently go through this link http://www.javatpoint.com/java-tutorial[^] which help me lot in my work. I thought this link will help you lot.


这篇关于如何使用表单身份验证将会话超时增加到1小时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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