server 2008R2+IIS7.5下配置不会出现什么问题,这里记录下在server2008+IIS7下的配置
参考了一下:http://www.cnblogs.com/fcu3dx/p/3773161.html
修改web.config,这里也把代码拷贝过来
替换web.config下对应的设置
<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true" /> <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>
根据上面的弄了之后问题照旧,查看IIS的“ISAPI 和 CGI 限制”,发现没有asp.net V4的项,因为是先安装的.net framework,后安装的IIS,所以需要重新注册下.NET 4.0,Win+R输入:C:/Windows/Microsoft.NET/Framework/v4.0.30319/aspnet_regiis.exe -i
妥妥的解决
原文:http://www.cnblogs.com/New-world/p/4471394.html