麻烦问个问题,提示“Timeout expired!”,然后导致程序死掉。帮忙看看了,在线等待!
提示错误如下所示:
Server Error in '/department' Application.
--------------------------------------------------------------------------
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
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.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.]
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +396
System.Data.SqlClient.SqlConnection.Open() +384
department.teacher.CalculateRecord() in e:\wwwroot\department\teacher.aspx.cs:101
department.teacher.Page_Load(Object sender, EventArgs e) in e:\wwwroot\department\teacher.aspx.cs:46
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
程序做得有些时间了,以前用着挺好的,不知现在什么原因,为了取消上传文件大小的限制,我在web.config文件中加了如下代码,是不是这里错误了。
<httpRuntime executionTimeout="600" maxRequestLength="100000" useFullyQualifiedRedirectUrl="false" />
先谢了,还望各位多多关照。一定感谢!