Advertisement

07.22.2008 at 04:34PM PDT, ID: 23586945
[x]
Attachment Details

ASP.NET - Set Connection time out in the app settings section of the web.config file.

Asked by josephdaviskcrm in .NET, Programming for ASP.NET

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(ConfigurationManager.AppSettings("ConnectionTimeout"))
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.5Start Free Trial
[+][-]07.22.2008 at 04:44PM PDT, ID: 22064722

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Programming for ASP.NET
Sign Up Now!
Solution Provided By: RedKelvin
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.22.2008 at 04:47PM PDT, ID: 22064740

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628