未执行的URL(MVC异常)
昨天开始就碰到在IIS里面通过URL无法直接访问到图片,提示错误,所以经过研究发现,合理的配置节应该如下
先改成集成模式,然后再改成经典模式
<system.webServer>
<directoryBrowse enabled="true" />
<handlers>
<remove name="mvc" />
<remove name="MVC Handler" />
<add name="MVC Handler" path="*" verb="*" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="mvc" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
</system.webServer>