部署小组正在返回403禁止

我们有一个 Web 应用程序在一个内部网上工作,我正在尝试使用 VisualStudio2010将其发布到互联网上。目标服务器正在运行 iis7,Web 管理服务正在运行。

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

Https://xxx.xxx.xxx.xxx:8172/msdeploy.axd

网站/申请表格如下:

默认网站/WebApp

在目的地标记为 IIS 应用程序,并允许不受信任的证书被检查,我正在使用一个管理帐户。

VisualStudio 返回以下错误:

启动 Web 部署将应用程序/包发布到 Https://xxx.xxx.xxx.xxx:8172/msdeploy.axd?site=default%20web%20site. C: 程序 文件 MSBuild Microsoft VisualStudio v10.0 WebMicrosoft.Web.Publishing.target (3588,5) : 错误: Web 部署任务失败 Https://xxx.xxx.xxx.xxx:8172/msdeploy.axd?Site=default 网站) 确保远程代理服务已安装,并且 在目标计算机上启动。)

远程代理(URL Https://xxx.xxx.xxx.xxx:8172/msdeploy.axd?Site=default 网站) 确保远程代理服务已安装,并且 在目标计算机上启动。收到一个不支持的响应。 响应头‘ MSDeploy.Response’为“ ,但预期为‘ v1’。 远程服务器返回一个错误: (403)禁止。

有没有办法在没有有效 SSL 证书的情况下发布它?

34423 次浏览

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.

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

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".

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