0

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 ?

3
  • 1
    Do you need Request Timeout? Commented 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. Commented 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 iis Commented Jun 5, 2013 at 8:50

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

5 Comments

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
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 )
you can set different connection string for different pages[part of application]
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 ?
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.
0

Create a second cpnnection string in your web config with out timeout and in the page you want, add timeout you want.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.