【问题标题】:Web Deploy using Visual Studio: can publish only individual files使用 Visual Studio 进行 Web 部署:只能发布单个文件
【发布时间】:2016-10-21 14:29:25
【问题描述】:

我正在尝试使用 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 应用程序。

【问题讨论】:

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


【解决方案1】:

按照“将 ASP.NET Core 项目发布到 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 发布对话框来发布和预览更改。

【讨论】:

    猜你喜欢
    • 2021-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多