Asp.net mvc 4 如何使用Windows Server 2008 R2和IIS 7.5部署ASP NET MVC 4 Web应用程序?
首先,我很抱歉重复一个问题,但它的解决方案是: 这对我不起作用。我阅读了此解决方案中的文章,但无法部署我的ASP NET MVC 4 web应用程序。我试过这个:Asp.net mvc 4 如何使用Windows Server 2008 R2和IIS 7.5部署ASP NET MVC 4 Web应用程序?,asp.net-mvc-4,iis-7,asp.net-mvc-routing,windows-server-2008-r2,Asp.net Mvc 4,Iis 7,Asp.net Mvc Routing,Windows Server 2008 R2,首先,我很抱歉重复一个问题,但它的解决方案是: 这对我不起作用。我阅读了此解决方案中的文章,但无法部署我的ASP NET MVC 4 web应用程序。我试过这个: <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> ... </system.webServer> 我也试过这个: <system.webServer> <modul
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
...
</system.webServer>
我也试过这个:
<system.webServer>
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
</system.webServer>
<system.webServer>
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
</system.webServer>
我下载了一个更新:
可以使用更新来启用某些IIS 7.0或IIS 7.5处理程序
处理URL不以句点结尾的请求
但当我尝试安装时
我正在研究:
-Windows Server 2008 R2 Service Pack 1
-互联网信息服务7.5
-Visual Studio 2013更新2使用Web部署发布
-.Net Framework 4.5
我的模块
最后,我的web.config没有模块标记,因为我使用了这两个模块,得到了相同的结果
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<httpRuntime targetFramework="4.5" />
<compilation debug="true" targetFramework="4.5" />
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<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>
</configuration>
发布web应用程序时,结果如下:
有人知道我做错了什么吗?我无法使用一键发布Web部署部署我的MVC Web应用程序,但我使用以下配置部署了我的Web应用程序: 我不需要使用以下标签:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
...
</system.webServer>
或