Is there a way to Set Connection timeout used in IIS in asp.net programaticaly in one page ? without setting it globally for all the website from IIS itself ?
-
1Do you need Request Timeout?K D– K D2013-06-05 07:47:10 +00:00Commented Jun 5, 2013 at 7:47
-
Are you talking about the Request Timeout or your DB Connection Timeout ? Or maybe your DB Command Timeout ? Be more specific please.Dimitar Dimitrov– Dimitar Dimitrov2013-06-05 08:34:34 +00:00Commented Jun 5, 2013 at 8:34
-
not the DB command time out nor the DB connection time out um i will post a new question bcs i want to know what is the difference between the time out in the connection string and the connection time out in the iisSora– Sora2013-06-05 08:50:01 +00:00Commented Jun 5, 2013 at 8:50
Add a comment
|
2 Answers
Update your connection string.
Add Connection Timeout=900 in your connection string.
Connection Timeout always specified in seconds and Default is 30 seconds.
You can set these according to your need.
Your connection string may look like:
server=servername;database=DBName;User ID=UserID;Password=PWD; Connect Timeout=timeinseconds
Hope its helpful.
5 Comments
Sora
my connection string is inside web.config so if i set it there it will be global i don't want it to be global i just want to set for one page
Sora
and for the record i don't think the connect timeout is the same as connection time out used in the IIS (manage website-advanced setting-connection limit-connection timeout )
Freelancer
you can set different connection string for different pages[part of application]
Sora
yeah i know but my question is whats the difference between the time out in the connection string and the time out in the IIS ?
Freelancer
good question. i dont know the answer. But i can say your above question was not containing this question. So you can post new question.