Posted on: 6/3/2014 7:37:32 PM | Views : 380

In my asp.net app I use a store procedure to inser a record into SQL server.
Most time it only takes less one second.
But, sometime it takes more than 20 seconds depending on SQL performance.
In this case, IT guys need to recycle IIS app pool.
Is there any way to release all resources if inserting takes more than 10 seconds so that app will not frozen?
I tried to add code below for timeout but did not work.
mySQLCommand.CommandType = CommandType.StoredProcedure mySQLCommand.CommandTimeout = 10

Go to the complete details ...