我對我們的生產基地看到這還有一個小的測試網站,我設置只是爲了測試這一點...MVC3中的錯誤 - 請求永遠不會超時。工作正常,在同一個項目aspx頁面
基本上,它似乎是由請求從未MVC處理時間到。我已經在web.config中設置了一個executionTimeout並關閉了調試模式。然後,我添加了一個無限循環的thread.sleeps到一個普通的aspx頁面和一個mvc頁面(該循環在mvc頁面的控制器中)。 aspx頁面可靠地超時(HttpException(0x80004005):Request timed out。),但是mvc頁面只是永遠旋轉而不會超時。
是否有單獨的設置mvc(我看過,但沒有找到它們)?默認情況下,mvc請求是否不超時?
任何幫助,將不勝感激。如果能幫助任何人,我會很樂意通過電子郵件發送我的小測試網站。
編輯:我正在使用MVC3。
我的web.config的內容:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Enabled" value="true" />
</appSettings>
<system.web>
<httpRuntime maxRequestLength="16384" executionTimeout="30" />
<compilation debug="false" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
這也發生在我身上!我很驚訝我沒有看到有人抱怨這個問題! –
看起來像一個框架錯誤! – dan
這是什麼意思?它真的發生在真實場景中嗎? – mare