asp.net – 如何增加我的存储过程调用的超时时间(见错误)?
发布时间:2020-05-23 05:12:51 所属栏目:asp.Net 来源:互联网
导读:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.Description: An unhandled exception occurred during the execution of the current web
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Source Error: Line 91: Line 92: DataSet getData; Line 93: getData = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["connstr"].ConnectionString,CommandType.StoredProcedure,"Course_NewReportGet_Get_Sav",objPara); Line 94: Line 95: foreach (DataRow dr in getData.Tables[0].Rows) Source File: c:UsersRyanbancroft archivesantiagosantiago codetrunkadmintoolsOptimus.aspx.cs Line: 93 Stack Trace: [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 exception,Boolean breakConnection) +1950890 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,Boolean breakConnection) +4846875 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj) +2392 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33 System.Data.SqlClient.SqlDataReader.get_MetaData() +83 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,RunBehavior runBehavior,String resetOptionsString) +297 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,Boolean returnStream,Boolean async) +954 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,String method,DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,String method) +32 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior,String method) +141 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,DataTable[] datatables,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand command,CommandBehavior behavior) +130 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,CommandBehavior behavior) +287 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +94 Mexico.Data.SqlHelper.ExecuteDataset(SqlConnection connection,CommandType commandType,String commandText,SqlParameter[] commandParameters) +149 Mexico.Data.SqlHelper.ExecuteDataset(String connectionString,SqlParameter[] commandParameters) +93 admin_tools_Optimus.GetUsers() in c:UsersRyanbancroft archivesantiagosantiago codetrunkadmintoolsOptimus.aspx.cs:93 admin_tools_Optimus.GetCompanies() in c:UsersRyanbancroft archivesantiagosantiago codetrunkadmintoolsOptimus.aspx.cs:75 admin_tools_Optimus.Proceed(Object sender,EventArgs e) in c:UsersRyanbancroft archivesantiagosantiago codetrunkadmintoolsOptimus.aspx.cs:43 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +1565 解决方法也许这不适用,但我认为应该被提及.默认的CommandTimeOut为30秒.对于99.9%的Web应用程序中发生的任何操作,这应该是足够的时间.除非您绝对确定该操作需要更长的时间,否则您应该花费时间尝试优化sql,以便在< 30秒内返回.正确的索引是开始的好地方.(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc-2 – 将日期参数传递给RedirectToAction Route
- asp.net-mvc – 基于MVC角色的路由
- asp.net-mvc-3 – 如何使用复选框列制作MVC 3 Webgrid?
- 从ASP.Net中的sessionID获取会话对象
- ASP.NET为什么会话超时,sessionstate超时设置
- asp.net-mvc – asp.net mvc中的加密视图状态
- asp.net-mvc – 实体框架5迁移:设置初始迁移和数据库的单个
- asp.net – MVC 3 htmlhelper的扩展方法来包装内容
- asp.net-mvc-3 – 验证隐藏的字段
- asp.net-mvc – 如何每秒自动刷新MVC PartialView
推荐文章
站长推荐
- asp.net – 如何限制指定文件类型的下载
- asp.net-mvc – 在MVC中检查图像mime,大小等
- ASP.NET会话状态和多个工作进程
- asp.net-mvc – 当我使用Validator.TryValidateO
- asp.net – aspnet的最大值:MaxHttpCollectionK
- asp.net-mvc – 在PasswordSignInAsync成功后,Us
- asp.net – 便携式区域的缺点
- asp.net – 使用外部connectionStrings.config文
- asp.net-mvc – ASP.NET MVC身份默认实现
- dropdownlist事件不显示在属性窗口asp.net Visua
热点阅读
