Sql Server connection timeout
I'm trying to execute a sql server query through asp.net but the following exception occurs : "Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
My connection string timeout is 300000 and remote query timeout in sql server is 60000 how can i solve this problem
I seems you have a blocked table. You can exec sp_lock to see who is blocking what.
If there is no blocking, then you have a query really bad constructed.
Please extend the script execution timeout in web.config file.
<!-- Increase script execution timeout -->
<system.web>
<httpRuntime executionTimeout="300" /> <!-- its 5 min -->
</system.web>
Hope, this will resolve your issue.
Thanks, Rohit
The problem is with the command timeout, i solved the problem with the following line of code :
command.CommandTimeout = 30000;
but the question now : how can i set commandTimeout default value over the application
链接地址: http://www.djcxy.com/p/56690.html上一篇: 重新启动时,Windows服务的SQL Server登录问题
下一篇: Sql Server连接超时