P
Piotrek
Hi all.
I would like to know what is the difference between these two timeouts:
- CommandTimeout
- ConnectionTimeout
I have following setting in my web.config file:
<httpRuntime executionTimeout="60"/>
Which timeout does it set (command, connection or other)?
Is it possible to globally set CommandTimeout e.g. in web.config?
And last thing: in my app. I get this exception:
System.Web.HttpUnhandledException: Exception of
type 'System.Web.HttpUnhandledException' was thrown. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the
target of an invocation. ---> System.Data.SqlClient.SqlException:
Timeout
expired. The timeout period elapsed prior to completion of the
operation or
the server is not responding.
What should I do to fix it? I think that I should set CommandTimeout to
some bigger value, but I would like to make it only in one place, not
in every SqlCommand I have.
Is it possible?
Thanks in advance,
Piotrek
I would like to know what is the difference between these two timeouts:
- CommandTimeout
- ConnectionTimeout
I have following setting in my web.config file:
<httpRuntime executionTimeout="60"/>
Which timeout does it set (command, connection or other)?
Is it possible to globally set CommandTimeout e.g. in web.config?
And last thing: in my app. I get this exception:
System.Web.HttpUnhandledException: Exception of
type 'System.Web.HttpUnhandledException' was thrown. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the
target of an invocation. ---> System.Data.SqlClient.SqlException:
Timeout
expired. The timeout period elapsed prior to completion of the
operation or
the server is not responding.
What should I do to fix it? I think that I should set CommandTimeout to
some bigger value, but I would like to make it only in one place, not
in every SqlCommand I have.
Is it possible?
Thanks in advance,
Piotrek