Sora
Sora

Reputation: 2551

IIS connection timeout and connection string timeout attribute

I'm confused in those two terms I want to know what is the difference between the timeout inside the connection string and the timeout inside the IIS configuration

data source=xxxx;Initial Catalog=Test;User=yy;Password=yyyy;Timeout=10

enter image description here

Upvotes: 5

Views: 14962

Answers (2)

Mzf
Mzf

Reputation: 5260

DB connection timeout is very diffrent from IIS time out

DB connection timeout is about establis the connection to DB, from MSDN SqlConnection.ConnectionTimeout

Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

From MSDN about Connection Timeout

Connection timeouts help reduce the amount of memory resources that are consumed by idle connections. Time-out settings also allow you to specify how long server resources are allocated to specific tasks or clients.

Upvotes: 3

Marc Gravell
Marc Gravell

Reputation: 1064204

The timeout in the database connection string is the amount of time ADO.NET should spend trying to connect to a database server before deciding it is unavailable (which is unrelated to the command timeout, note). Connect in a database connection string is a synonym for Connect Timeout.

The timeout in IIS is how long it should spend trying to process a request before deciding that it has failed.

Upvotes: 2

Related Questions