会话在超时连接字符串web配置之前到期 [英] session expire before timeout connection string web config

查看:71
本文介绍了会话在超时连接字符串web配置之前到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<add key="connection" value=" Data Source=1.00.001.29;Network    Library=;Connection Timeout=50;Packet Size=4096;Integrated    Security=no;User ID=secret; Password=secret; Encrypt=no;" />

above is my connection string , when i run my application on local host it runs fine no session expiry . but when i upload on server with above connection string web config file my application logout in few seconds , when ever i do some edit update operation it logout . so please anybody help me what should i use connection timeout or connect timeout or connection lifetime or nothing and also tell me how much value to use for timeout

推荐答案

连接超时是代码在想要运行SQL命令时尝试建立连接时等待的时间。这与会话完全无关,并且根据你如何进行身份验证,它也将是未发布的。



如果你存储用户已登录的事实你的会话,这是你的会议超时然后你需要询问谁托管谁为什么这是。某些主机可能会限制或禁用会话超时。
The connection timeout is how long your code will wait while trying to establish a connection when it wants to run SQL commands. It is totally unrelated to session, and depending how you do authentication it will also be unreleated to that.

If you are storing the fact that the user has logged in in your session, and it is your session that is timing out then you need to ask whoever does your hosting as to why this is. Some hosts might restrict or disable session timeouts.


这篇关于会话在超时连接字符串web配置之前到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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