visual-studio - WebDeploy - 只是无法让它工作

标签 visual-studio iis deployment msdeploy msdeployserviceagent

我已经在 VMWare 下运行的 Server 2008 R2 上安装了 Web Deploy 2.1。

在 IIS 管理器(管理服务小程序)中,我可以看到“启用远程连接”被选中,端口设置为 8172。在“IIS 管理器权限”下,我添加了我的 Windows 帐户 (CORP\ekkis) 和“身份验证”小程序(用于 IIS) 我已启用“Windows 身份验证”。

我也关闭了防火墙。

所以从命令行我测试系统像这样工作:

C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:dump -source:contentPath=\temp,wmsvc=192.168.0.70,username=CORP\ekkis,password=MyPass,authType=Basic -allowUntrusted=True

得到这个:
Info: Using ID '9b954a0f-ff07-4e77-ba2c-d27472f5fda0' for connections to the rem
ote server.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the destination computer ("192.168.0.70") using t
he Web Management Service, but could not authorize. Make sure that you are using
 the correct user name and password, that the site you are connecting to exists,
 and that the credentials represent a user who has permissions to access the sit
e.
Error: Object of type 'contentPath' and path '\temp' cannot be created.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.

我还尝试使用以下服务 URL 从主机操作系统部署 Visual Studio 2010(我没有找到有关如何形成此 URL 的正确文档):
https://192.168.0.70/
https://192.168.0.70:8172/
https://192.168.0.70:8172/MsDeployAgentService/
https://192.168.0.70/MsDeployAgentService/

我也尝试过非安全版本,但无法使其正常工作。网址的正确格式是什么?我缺少什么权限?

VS 的错误因我尝试的方式而异,但下面是一个示例:
Could not complete the request to remote agent URL 'http://192.168.0.70:8172//MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.

真的应该有一个指南来做到这一点(是的,我在谷歌上搜索了自己的脸)!

谢谢 - ekkis

最佳答案

好的,我发现正确的网址是:

https://192.168.0.70:8172/MsDeploy.axd

并且启用“Windows 身份验证”似乎没有什么区别。此外,将我的帐户放在“经理”列表中似乎也没什么区别。

所以后端一切正常(我已经关闭了 Web 部署代理服务)。这只是我错误的网址。

关于visual-studio - WebDeploy - 只是无法让它工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6921272/

相关文章:

网络上的 C# 应用程序

c# - 如何在一个 Console.WriteLine() 语句中打印多个变量的值?

IIS applicationHost 'setEnvironment' 属性

c# - 目录不存在 - 参数名称 : directoryVirtualPath

powershell - 通过 PowerShell 向 applicationHost.config 添加 <location/> 元素

python - 部署 Python Azure 函数时中央目录损坏

Javafx 部署问题

visual-studio - 是否应该将 .nuget 文件夹添加到版本控制中?

mysql - 如何使用 Entity Framework 回滚迁移的正确方法

c# - 缺少适用于 Windows Phone 的 Microsoft Visual C++ 2013 运行时包