超时已过期。仅在ASP.NET中

时间:2013-04-14 13:25:00

标签: c# asp.net sql-server

SqlConnection.ConnectionTimeoutSqlCommand.CommandTimeout设置为无限(0),我的桌面应用程序将无限期等待。但是,我的ASP.NET应用程序不会。没有连接被泄露,并且有足够的系统内存。

我怀疑ASP.NET正在秘密设置超时,但即使HttpRuntimeSection.ExecutionTimeout设置为30分钟。我仍然遇到超时异常。

ASP.NET中是否还有其他超时变量我不知道?或者有人知道可能导致这种情况的原因吗?

更新:堆栈跟踪

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at FrostWebsite._default.GetQuickStats()
at FrostWebsite._default.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

1 个答案:

答案 0 :(得分:1)

问题是你有ASP.NET的超时异常,而不是SQL。有一种方法可以超越asp.net超时。示例:http://weblogs.asp.net/aghausman/archive/2009/02/20/prevent-request-timeout-in-asp-net.aspx