josephdaviskcrm
asked on
ASP.NET - Set Connection time out in the app settings section of the web.config file.
I have the following in my web.config file.
<appSettings>
</appSettings>
I want to be able to run code like the following in my application...
cmd = New SqlCommand(sqlStr, conn)
cmd.CommandTimeout = Convert.ToInt32(Configurat ionManager .AppSettin gs("Connec tionTimeou t"))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
how do I enter this into the web.config file correctly for say, 90 seconds?
P.S. - ASP.NET 3.5
<appSettings>
</appSettings>
I want to be able to run code like the following in my application...
cmd = New SqlCommand(sqlStr, conn)
cmd.CommandTimeout = Convert.ToInt32(Configurat
cmd.Connection.Open()
cmd.ExecuteNonQuery()
how do I enter this into the web.config file correctly for say, 90 seconds?
P.S. - ASP.NET 3.5
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry use 90 instead of 90000, I thought it was milliseconds but it is seconds
ASKER
Cool. Thanks.