我似乎无法将简单的应用程序部署到我作为管理员的 IIS 服务器上。这是我从 VS2010 得到的错误信息(域名被修改以保护无辜者):
------ Build started: Project: HelloWorldWeb, Configuration: Debug Any CPU ------
HelloWorldWeb -> D:\$Data\mhtest\HelloWorldWeb\bin\HelloWorldWeb.dll
------ Publish started: Project: HelloWorldWeb, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Account\Web.config into obj\Debug\CSAutoParameterize\transformed\Account\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to http://www.myserver.com/MSDEPLOYAGENTSERVICE ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Remote agent (URL http://www.myserver.com/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.)
Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
Error details:
Remote agent (URL http://www.myserver.com/MSDEPLOYAGENTSERVICE) 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 'V1' but 'v1' was expected.
The remote server returned an error: (401) Unauthorized.
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
到目前为止,我有:
- 在 IIS 服务器上安装 Web Deploy 3.0
- 安装了 Web 管理服务,虽然我不认为我正在尝试使用它,但我想暂时在端口 80 上执行所有这些操作(而不是 8172)。
- 确保服务 MsDepSvc 以管理员成员身份运行
- 确保我在部署期间在 VS2010 中使用的凭据是管理员成员的用户
- 确保我输入的站点和应用程序与 IIS 服务器上已经存在的内容相匹配
其他详情:
- IIS 服务器是远程的,位于防火墙后面,不在我工作站的域中。我认为我应该使用基本身份验证来执行此操作,尽管如果它还不是默认设置,我无法找到指定它的方法。
- 如果我打开浏览器并导航到http://www.myserver.com/MSDEPLOYAGENTSERVICE,肯定会提示我输入凭据。如果我输入有效的管理员凭据,我会看到一个空白屏幕 - 网络跟踪显示服务器以 401 响应。