使用Visual Studio进行Web部署:只能发布单个文件

时间:2016-10-21 14:29:26

标签: visual-studio-2015 asp.net-core .net-core webdeploy windows-server-2012-r2

我正在尝试使用Web Deploy和Visual Studio将应用程序部署到远程IIS。我只能推送单个文件,但是当我尝试发布整个项目时,它很快就说它成功但没有任何推动。它将输出构建到目录,但它从不将其复制到服务器。

另外,当我尝试发布wwwroot文件夹时,它会抱怨另一件事,这并没有给出太多:

"Could not connect to the remote computer using the specified process ("Web      Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC. The remote server returned an error: (400) Bad Request."*

* Web管理服务正在远程计算机上运行。

我正在使用:

IIS版本为8.5,Webdeploy 3.6,Visual Studio 2015。 该应用程序是一个.NET Core应用程序。

1 个答案:

答案 0 :(得分:1)

遵循"将ASP.NET核心项目发布到IIS服务器" (https://docs.asp.net/en/latest/publishing/iis-with-msdeploy.html

又错过了一个步骤:

在生成的发布PowerShell脚本中(在PropertiesPublishProfiles下),将发布模块版本号从1.0.1更新为1.0.2-beta2。将1.0.1更改为1.0.2-beta2后,您可以使用Visual Studio发布对话框发布和预览更改。