MsDeploy 返回 403 禁止

发布于 2024-12-18 21:26:20 字数 1482 浏览 4 评论 0原文

我们有一个在 Intranet 上运行的 Web 应用程序,我正在尝试使用 Visual Studio 2010 将其发布到 Internet。目标服务器正在运行 iis7 并且 Web 管理服务正在运行。

在 Visual Studio 2010 上,我的服务 URL 是:

https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd

站点/应用程序是:

默认网站/WebApp

在目标上标记为 IIS 应用程序并允许不受信任的证书已选中,并且我正在使用管理帐户。

Visual Studio 返回以下错误:

开始 Web 部署将应用程序/包发布到 https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?站点=默认%20Web%20Site ... C:\程序 文件\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3588,5): 错误:Web 部署任务失败。(远程代理(URL https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?site=Default< /a> 网站)可以 不被联系。确保远程代理服务已安装并且 在目标计算机上启动。)

远程代理(URL https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?site=Default< /a> 网站)可以 不被联系。确保远程代理服务已安装并且 在目标计算机上启动。收到了不支持的回复。 响应标头“MSDeploy.Response”为“”,但预期为“v1”。 远程服务器返回错误:(403) 禁止。

有什么想法如何在没有有效 SSL 证书的情况下发布它吗?

We had a Web Application working on an intranet and I'm trying to publish it to the internet using Visual Studio 2010. The destination server is running iis7 and the Web Management Service is running.

On Visual Studio 2010 my service URL is:

https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd

And site/application is:

Default Web Site/WebApp

Marking as IIS App on destination and Allow untrusted certificate is checked and i'm using an administration account.

Visual Studio return the following error:

Start Web Deploy Publish the Application/package to
https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?site=Default%20Web%20Site ...
C:\Program
Files\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3588,5):
Error : Web deployment task failed.(Remote agent (URL
https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?site=Default Web Site) could
not be contacted. Make sure the remote agent service is installed and
started on the target computer.)

Remote agent (URL
https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd?site=Default Web Site) could
not be contacted. Make sure the remote agent service is installed and
started on the target computer. An unsupported response was received.
The response header 'MSDeploy.Response' was '' but 'v1' was expected.
The remote server returned an error: (403) Forbidden.

Any ideas how to publish it without a valid SSL certificate?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

丶视觉 2024-12-25 21:26:20

如果您进入 IIS,
单击“连接”列表中的服务器节点,
双击“管理服务”,然后您将进入一个带有“启用远程连接”复选框的屏幕。
由于服务正在运行,此复选框(以及屏幕的其余部分)可能会变灰。只需单击“操作”窗格中的“停止”链接,然后选中“启用远程连接”框以及您要在此处更改的任何其他设置,然后再次单击“操作”窗格中的“应用”和“启动”即可。

这应该可以让您使用正确的凭据从远程计算机连接到该服务。 (如果打开了正确的端口和东西以及所有这些爵士乐。)

我认为这对你的情况有帮助。至少您不会收到 403 错误,但可能会遇到其他一些 MsDeploy 错误。

If you go into IIS,
Click on the server node in the "Connections" list,
Double click "Management Service" then you are taken to a screen which has an "Enable remote connections" check box.
This checkbox (and the rest of the sreen) maybe greyed out because the service is running. Just click the "Stop" link in the Actions pane, then check the "Enable remote connections" box and any other settings you want to change here, then click 'Apply' and 'Start' on the Actions pane again.

That should hopefully let you connect, with proper credentials, to the service from a remote machine. (If the correct ports and stuff are opened and all that jazz.)

I think this helps your situation. At least you won't get 403's but you may have some other MsDeploy error.

忘年祭陌 2024-12-25 21:26:20

如果设置不正确,Web 部署可能会给您带来一大堆错误。 帮自己一个忙并使用Web 平台安装程序 (https://www.microsoft.com/web/downloads/platform.aspx)。如果您已尝试安装 WebDeploy,则应先卸载它。从 WebPI 中选择:“用于托管服务器的 Web 部署 3.6”。

Web Deploy can give you a whole bunch of errors if not setup correctly. Do yourself a favour and use the Web Platform Installer (https://www.microsoft.com/web/downloads/platform.aspx). You should uninstall WebDeploy first if you've already tried to install it. From the WebPI select: "Web Deploy 3.6 for Hosting Servers".

花间憩 2024-12-25 21:26:20

我也有同样的问题。谈论跳圈......
设置用户和部署权限等

  1. 该解决方案需要在收到 Cihan Yakar 预测的“NOT FOUND”错误后
    上面,我必须更改 webdeploy(对我来说,它需要重新下载搜索“WebDeploy_x64_en-US.msi”)
    启用所有选项。
  2. 出现新错误,总是好的,ERROR_USER_NOT_AUTHORIZED_FOR_CONTENTPATH。为此,我查看了网络部署错误(请参阅下面的链接)。

诊断 - 非管理用户尝试执行
与用户不参与的 Web 部署提供商进行的操作
目前已授权。解决方案 - 默认情况下,Web Deploy 2.0 设置,
创建管理服务委托规则,允许
非管理员可以与此提供程序执行操作。这是
可能该提供者所需的委托规则尚未
已正确设置。解决方法:从程序控制面板中运行
Web 部署 2.0 上的修复。或者,创建委托规则
手动。

事实证明,我必须从“配置 Web 部署处理程序”(请参阅​​下面的链接)手动创建它,使用本指南“配置 WMSVC 和 IIS 管理器权限”和“为 Web 部署用户创建委派规则”解决了问题。

笔记:
使用“网络部署错误代码”进行诊断:
http://www.iis.net/learn /publish/troubleshooting-web-deploy/web-deploy-error-codes
并最终使用“配置 Web 部署处理程序”中的流程进行配置:
http://www.iis.net /learn/publish/using-web-deploy/configure-the-web-deployment-handler

I had the same problem. Talk about jumping through hoops...
The solution requires set up of user and deployment permissions etc.

  1. after getting the error 'NOT FOUND' as predicted by Cihan Yakar
    above, I had to change webdeploy (for me it required re-download search for 'WebDeploy_x64_en-US.msi')
    enabling all options.
  2. got a new error, always good, ERROR_USER_NOT_AUTHORIZED_FOR_CONTENTPATH. for this I looked at the web deploy errors (see below for link).

Diagnosis - A non-administrative user attempted to perform an
operation with a Web Deploy provider for which the user is not
currently authorized. Resolution - Web Deploy 2.0 setup, by default,
creates Management Service Delegation Rules which allow
non-administrators to perform operations with this provider. It is
possible that a delegation rule required for this provider has not
been setup correctly. Workaround: From the Programs Control Panel, run
Repair on Web Deploy 2.0. Alternatively, create the delegation rule
manually.

It turns out I had to create it manually from 'Configure the Web Deployment Handler'(see below for link), using this guide to 'Configure WMSVC and IIS Manager Permissions' and 'Create Delegation Rules for Web Deploy Users' sorted the problem.

notes:
Diagnosed using 'web deploy error codes' from:
http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes
and eventually configured using processes from 'Configure the Web Deployment Handler':
http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

星星的轨迹 2024-12-25 21:26:20

就我而言,在启用远程连接复选框后,我需要重新安装 Web Deploy 才能使其正常工作。

In my case, after Enable remote connections checkbox, I need to reinstall Web Deploy to make it work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文