首页 > 代码库 > mvc 项目运行报错检查web.config

mvc 项目运行报错检查web.config

最近写mvc项目,只是一个简单的添加信息管理信息列表的网站程序,当我挂在iis7.0上时候运行发现报错,请求问题导致,后来我在我的配置文件里加了一句话解决了。

 <system.webServer>    <modules runAllManagedModulesForAllRequests="true"/>    <validation validateIntegratedModeConfiguration="false" />    <handlers>      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />    </handlers>  </system.webServer>

就是<modules runAllManagedModulesForAllRequests="true"/>这句的设定!重新运行一切ok

mvc 项目运行报错检查web.config