我的ASP.NET MVC 2應用程序有點奇怪的行爲。ASP.NET MVC 2&IIS:HTTP 500.24 favicon.ico錯誤
我正在使用IIS 7.5,Windows身份驗證和ASP.NET模擬來加載我的網頁。
經過幾次的搜索,我沒有找到一個很好的方式擺脫500.24要求我保持每天頁面加載得到的(在根目錄下的favicon.ico觸發此):
我看過一些文章,如this one或that one,但這似乎不能解決我的問題。我需要這些設置以供我的應用程序在此處工作:.NET 4 Framework集成模式管道,Windows驗證和ASP.NET模擬。
這裏是我的web.config的簡化版本,如果它可以幫助任何人(當然,我已經刪除的連接字符串出於安全原因..)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off" />
<identity impersonate="true" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.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=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<authentication mode="Windows">
<!-- roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/-->
<!-- forms loginUrl="~/Account/LogOn" 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="/Globe" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/Globe" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/Globe" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/Globe" />
</providers>
</roleManager>
<pages>
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
<security>
<requestFiltering>
<verbs>
<add verb="PUT" allowed="true" />
<add verb="DELETE" allowed="true" />
</verbs>
</requestFiltering>
</security>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
</configuration>
我的應用程序工作時,圖標.ico正在加載,我只是想知道爲什麼它會在每個請求中觸發一個500.24(當然,也許是Fiddler不能對自身進行身份驗證並導致de 500.24 HTTP錯誤,但是當它正常執行時會觸發401.2 - 未經授權相反...)
在網絡上的快速建議看起來是它的模擬=真。您是否嘗試過轉移到經典模式(由許多鏈接建議)以查看它是否有效。因爲我猜「」不適合你 –
dbones
2010-11-10 22:23:07
我不能使用經典模式,因爲我的應用程序需要集成管道,並且'和<驗證validateIntegratedModeConfiguration =「false」/>'已經在我的web.config中強制執行。 –
LoganWolfer
2010-11-11 15:48:54