如何将 ASP.Net MVC 5 部署到 IIS 8 Windows Server 2012?

How to deploy ASP.Net MVC 5 to IIS 8 Windows Server 2012?

我在 ASP.Net MVC 5 和数据库 SQL Server 2012 中开发了一个应用程序 现在我想将它部署在 Windows Server 2012 with IIS 8

我关注了这个link:http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-to-iis

但是当我 运行 我的应用程序在浏览器中出现错误时:

HTTP Error 500.19 - Internal Server Error The requested page can not be access because the related configuration data for the page is invalid.

如果你能详细解释一下,我是这方面的新手。

验证是否在您的服务器中安装了 asp.net 角色。

希望这篇link可以帮到你:https://technet.microsoft.com/en-us/library/hh831475.aspx

我会确保您安装了最新的 .Net 软件包。我有一个针对 4.5.2 的 MVC5 应用程序会拒绝启动。

您需要先在 Visual studio 上选择您的项目来发布它。之后,您需要在 IIS 上创建站点。在某些情况下,您会发现很难映射您的数据库,因为您需要在数据库服务器上添加权限。