Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio Web Deploy 3.0发布时引发401错误_Visual Studio_Iis_Webdeploy - Fatal编程技术网

Visual studio Web Deploy 3.0发布时引发401错误

Visual studio Web Deploy 3.0发布时引发401错误,visual-studio,iis,webdeploy,Visual Studio,Iis,Webdeploy,我似乎无法将一个简单的应用程序部署到我是其管理员的IIS服务器上。以下是我从VS2010(修改域名以保护无辜者)收到的错误消息: 到目前为止,我已经: 在IIS服务器上安装了Web Deploy 3.0 安装了Web管理服务,尽管我认为我还没有尝试使用它,但我想暂时通过端口80(而不是8172)来完成这一切 确保服务MsDepSvc以管理员成员的用户身份运行 确保部署期间我在VS2010中使用的凭据是作为管理员成员的用户 确保我输入的站点和应用程序与IIS服务器上已有的相匹配 其他详情:

我似乎无法将一个简单的应用程序部署到我是其管理员的IIS服务器上。以下是我从VS2010(修改域名以保护无辜者)收到的错误消息:

到目前为止,我已经:

  • 在IIS服务器上安装了Web Deploy 3.0
  • 安装了Web管理服务,尽管我认为我还没有尝试使用它,但我想暂时通过端口80(而不是8172)来完成这一切
  • 确保服务MsDepSvc以管理员成员的用户身份运行
  • 确保部署期间我在VS2010中使用的凭据是作为管理员成员的用户
  • 确保我输入的站点和应用程序与IIS服务器上已有的相匹配
其他详情:

  • IIS服务器是远程的,在防火墙后面,不在我工作站的域上。我假设我应该使用Basic Auth来实现这一点,尽管如果它还不是默认值,我找不到指定它的方法
  • 如果我打开浏览器并导航到,肯定会提示我输入凭据。如果我输入有效的管理员凭据,我会得到一个空白屏幕-网络跟踪显示服务器响应401

    • 我设法让它工作起来。我返回到一个疑难解答文档:

      大约有三分之一的数据引用了401个错误,我更仔细地阅读了它:

      试图以非管理员身份访问远程代理服务 症状

      Microsoft.Web.Deployment.DeploymentException:

      根本原因

      远程代理服务要求调用方是Administrators组的成员或来自已添加到Administrators组的域帐户由于Web Deploy 2.0中的错误,非内置帐户的本地管理员将无法使用远程代理服务。

      修复/解决方法

      提供管理凭据


      所以,我不需要使用“管理员”帐户,我需要使用“管理员”帐户。如果它没有使用令人困惑的双重否定,并且清楚当前版本(即撰写本文时的3.0)中也存在的错误,我可能第一次注意到这一点。

      这个错误令人愤怒!从2.0到3.0修复这个bug有多难?!!!因此,我必须彻底改变我的持续整合过程!!!!!更令人恼火的是,它仍然没有被修补,因为我正在做设置刚刚!!!
          ------ 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 ==========
      
      Could not complete the request to remote agent URL 'http://DestinationServer/msdeployAgentService'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.