几天来一直坚持这个问题,请帮忙。我尝试了很多解决方案,例如在网络配置中增加连接超时:下面是我的错误代码。
Server Error in '/' Application.
The wait operation timed out
Run Code Online (Sandbox Code Playgroud)
描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。
Exception Details: System.ComponentModel.Win32Exception: The wait operation timed out
Run Code Online (Sandbox Code Playgroud)
来源错误:
Line 595: SqlCommand cmd = new SqlCommand(str, con);
Line 596: con.Open();
Line 597: rd = cmd.ExecuteReader();
Line 598: //cs.CloseConnection();
Line 599: return rd;
Source File: c:\inetpub\vhosts\xyz.com\httpdocs\App_Code\admin.cs Line: 597
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪:
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlConnection.OnError(SqlException …Run Code Online (Sandbox Code Playgroud)