Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<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
Posted
Comments
ZurdoDev 9-Jul-15 8:28am    
Why is your connection string added as an appsettings key instead of directly as a connectionstring?
Nikit Panchal 14-Jul-15 0:09am    
i have copied as it is from my hosting server

1 solution

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.
 
Share this answer
 
Comments
Nikit Panchal 13-Jul-15 1:47am    
can you just suggest me what should i put in connection string, connection time out is ok ? or connect timeout .
F-ES Sitecore 13-Jul-15 4:27am    
The connection timeout is fine, your issue is probably somewhere else.
Nikit Panchal 13-Jul-15 5:31am    
cool, thank you so much :)
Nikit Panchal 13-Jul-15 5:43am    
@sitecore , my hosting server has timeout 20. do i need to mention anything related to hosting session timeout in my websconfig ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900