Reputation: 2551
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 ?
Upvotes: 0
Views: 3486
Reputation: 2035
Create a second cpnnection string in your web config with out timeout and in the page you want, add timeout you want.
Upvotes: 0
Reputation: 9074
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.
Upvotes: 1