G
Guest
Hi all,
I am running into query timeouts in my ASP.NET web application and need some
help. I found out about the SQLCommandTimeout Property that can be used to
reset to extent the timeout period past the default 30 seconds. Since my
DataSource is filled using the designer settings, I have no ADO.NET code in
my application and therefore I have no SQLCommand to reset the value in. So I
am using the web.config file, specifically the SessionState section, to set
SqlCommandTimeout to 180 seconds, or 3 Minutes. I know my stored procedure
needs about 2:30 minutes to return the largest data set we have at this time
so 3 minutes should be plenty of time.
Next I added some code in my code behind (in C#) to get and output the
SqlCommandTimeout value in my page_load handler. It is set to 3:00 minutes as
expected. But, things are not working as expected and described.
When I submit my page using settings that result in the large data set to be
returned, the query times out...in exactly 30 seconds! I timed it several
times. It is behaving as if the setting was never changed and/or the setting
is ignored.
Can someone here tell me what I am doing wrong and/or misunderstanding? If
that is not possible, can you suggest a work-around other than writing the
code to load the dataset myself? I know I can do that, but would like to
avoid it if I can unless I know for sure that will solve the problem.
We are using Visual Studio 2005, Professional under Windows XP Pro, SP 2.
Framework is 2.0 of course and the RDBMS is SQLServer 2000.
I look forward to reading your replies.
TIA
Ute
I am running into query timeouts in my ASP.NET web application and need some
help. I found out about the SQLCommandTimeout Property that can be used to
reset to extent the timeout period past the default 30 seconds. Since my
DataSource is filled using the designer settings, I have no ADO.NET code in
my application and therefore I have no SQLCommand to reset the value in. So I
am using the web.config file, specifically the SessionState section, to set
SqlCommandTimeout to 180 seconds, or 3 Minutes. I know my stored procedure
needs about 2:30 minutes to return the largest data set we have at this time
so 3 minutes should be plenty of time.
Next I added some code in my code behind (in C#) to get and output the
SqlCommandTimeout value in my page_load handler. It is set to 3:00 minutes as
expected. But, things are not working as expected and described.
When I submit my page using settings that result in the large data set to be
returned, the query times out...in exactly 30 seconds! I timed it several
times. It is behaving as if the setting was never changed and/or the setting
is ignored.
Can someone here tell me what I am doing wrong and/or misunderstanding? If
that is not possible, can you suggest a work-around other than writing the
code to load the dataset myself? I know I can do that, but would like to
avoid it if I can unless I know for sure that will solve the problem.
We are using Visual Studio 2005, Professional under Windows XP Pro, SP 2.
Framework is 2.0 of course and the RDBMS is SQLServer 2000.
I look forward to reading your replies.
TIA
Ute