面对.net服务器中会话过期问题中的一些问题 [英] Facing some issue in session expire problem in .net server

查看:69
本文介绍了面对.net服务器中会话过期问题中的一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在会话过期问题上需要一些专家建议。



这里是我面临的问题:





两个差异。登录:管理员和用户:

1]设置webconfig。 (本地化)

< authentication mode =Forms>

< forms defaultUrl =〜/ admin / Dashboard.aspxloginUrl =〜/ admin / login.aspxslidingExpiration =truetimeout =2880/>



< authentication mode =Forms>

< forms defaultUrl =〜/ User / Dashboard.aspxloginUrl =〜/ User / login.aspxslidingExpiration =truetimeout =2880/>



2]在服务器多个托管(10个网站)上:我们必须设置唯一的机器密钥或同样适用于Windows托管。(不在本地)

< machinekey validationkey = #decryptionkey =#validation =SHA1decryption =AES>

3]即使设置在以下行之后,会话也会过期。

< sessionstate mode = InProccookieless =falsetimeout =940>

目前已添加2]和3] ...它无效。 ..



哪种方式可以解决..



谢谢



我尝试过:



目前正在工作



设置webconfig。 (本地化)

< authentication mode =Forms>

< forms defaultUrl =〜/ admin / Dashboard.aspxloginUrl =〜/ admin / login.aspxslidingExpiration =truetimeout =2880/>



< authentication mode =Forms>

< forms defaultUrl =〜/ User / Dashboard.aspxloginUrl =〜/ User / login.aspxslidingExpiration =truetimeout =2880/>

hello guys ,

need some expert advice in session expire issue.

here is the issue i am facing:


Two Diff. Login: Admin And Users :
1] Set webconfig. (Localization)
<authentication mode="Forms">
<forms defaultUrl="~/admin/Dashboard.aspx" loginUrl="~/admin/login.aspx" slidingExpiration="true" timeout="2880"/>

<authentication mode="Forms">
<forms defaultUrl="~/User/Dashboard.aspx" loginUrl="~/User/login.aspx" slidingExpiration="true" timeout="2880"/>

2] On Server Multiple Hosting(10 Website) : We have to set unique machinekey or same will work on windows hosting.(Not in a Local)
<machinekey validationkey="#" decryptionkey="#" validation="SHA1" decryption="AES">
3] Session expire even after set below line.
<sessionstate mode="InProc" cookieless="false" timeout="940">
Currently added 2] and 3]...its not working. ..

which way i can resolve it ..

Thank you

What I have tried:

currently working on

Set webconfig. (Localization)
<authentication mode="Forms">
<forms defaultUrl="~/admin/Dashboard.aspx" loginUrl="~/admin/login.aspx" slidingExpiration="true" timeout="2880"/>

<authentication mode="Forms">
<forms defaultUrl="~/User/Dashboard.aspx" loginUrl="~/User/login.aspx" slidingExpiration="true" timeout="2880"/>

推荐答案

虽然您可以设置超过默认十分钟的超时值,但托管服务不必遵守您的请求:每个会话占用Web服务器中的空间,并且会话持续时间越长需要内存和其他资源来支持相同数量的客户端。默认情况下,许多托管服务不接受会话持续时间的任何增加(有些限制低于10分钟)。



您可以与托管服务商谈增加它 - 您可能需要额外支付 - 或者您可以使用Cookie,因为它们存储在客户端PC上,如果您需要,它的使用寿命会更长。
Although you can set a timeout value greater than the default ten minutes, the hosting service does not have to honour your request: each session occupies space in the webserver, and the longer sessions last the more memory and other resources are required to support the same number of clients. Many hosting services will not accept any increase in Session duration by default (and some limit it lower than 10 minutes).

You can either talk to your hosting service about increasing it - you may have to pay extra - or you can use Cookies instead as they are stored on the client PC and the lifetime can be a lot greater if you need it to be.


这篇关于面对.net服务器中会话过期问题中的一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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