尽管启动了Web部署服务,msdeploy仍无法到达目标 [英] msdeploy cannot reach destination despite having web deployment service started

查看:139
本文介绍了尽管启动了Web部署服务,msdeploy仍无法到达目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在部署到远程IIS时遇到了一些麻烦. 到目前为止,这是我所做的:

as you can see from the title I am experiencing some trouble deploying to a remote IIS. Here is what I have done so far:

  • 我已经设置了在Windows Server 2008上运行IIS7的虚拟机.
  • 我已经桥接了VMs网络适配器.
  • 我已经安装并启动了"Web Deployment Agent服务"以及"Web管理服务".

  • 我还创建了一个新的IIS管理器用户,并授予他访问所涉及网站的权限.

例如,当我像这样进行部署时,现在就可以部署自身了:

Now deploying itself works when I do it like this for example:

msbuild D:\Path\ToProject\DeployVariation01\DeployVariation01.csproj
        /p:Configuration=Debug;
        Platform=AnyCpu;
        DeployOnBuild=true;
        DeployTarget=MSDeployPublish;
        MSDeployServiceURL="Some.IP.-.Address";
        DeployIisAppPath="DeployAppDebug/DeployThis";
        MSDeployPublishMethod=WMSVC;
        AllowUntrustedCertificate=true;
        Username=Administrator;
        password=<thinkOfAPassword>

然后部署了应用程序,我可以从浏览器中调用它.

Then the application is deployed and I can call it from my browser.

更新:此命令也可以使用,因此应该回答詹姆斯·伍尔芬登(James Woolfenden)有关我是否可以访问msdeploy网络服务的问题:

UPDATE: It also works with this command, so that should answer James Woolfenden's question of whether I have access to the msdeploy webservice:

msbuild D:\Path\ToProject\DeployVariation01\DeployVariation01.csproj
        /p:Configuration=Debug;
        Platform=AnyCpu;
        DeployOnBuild=true;
        DeployTarget=MSDeployPublish;
        MSDeployServiceURL="https://some.ip.-.address:8172/MsDeploy.axd;
        DeployIisAppPath="DeployAppDebug/DeployThis";
        MSDeployPublishMethod=WMSVC;
        AllowUntrustedCertificate=true;
        Username=Administrator;
        password=<thinkOfAPassword>

但是,我想使用 PackageWeb-Approach (也介绍了此处).
因此,我想从Visual Studio 2012中创建一个WebDeploy-Package. 通常,部署它似乎也没有问题,因为我可以在本地计算机上运行它.

But, I want to use the PackageWeb-Approach (also described here).
So I create a WebDeploy-Package from Visual Studio 2012, which I want to deploy. Deploying this generally seems to be no problem, too, since I get it to run on my local computer.

我的本​​地IIS和VM中的本地IIS都具有相同的WebSite-Structure,因此在调用Publish-Interactive.ps1时,我只需要更改计算机名",用户名"和密码". -script以使其正常工作,但是当我这样做时,我不断收到错误消息

Both, my local IIS as well as the one in my VM have the same WebSite-Structure, so I just should have to change "Computer name", "Username" and "Password" when calling the Publish-Interactive.ps1-script in order to get it to work, but when I do that I keep getting the error message

Could not connect to the remote computer ("Some.IP.-.Address")
On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)

但这使我感到困惑,因为实际上我已经通过WebPlatformInstaller安装了Web Deploy,并且Web管理服务正在运行. 我还尝试从主机对我的VM执行ping操作,并且一切顺利. 为了进行测试,我也完全关闭了VM中的防火墙.

But that confuses me, because I actually have Web Deploy installed via WebPlatformInstaller and the Web Management Service is running. I also tried to ping my VM from my host machine and it is getting through. For testing purposes I switched off the firewall in my VM entirely, too.

但是我仍然收到相同的错误消息.

But still I get the same error message.

有人可以引导我朝正确的方向前进吗?我想念什么?

Can anyone guide me towards the right direction? What am I missing?

推荐答案

原来,我在这里遇到的问题与远程计算机上的服务器配置,服务帐户或任何其他帐户配置无关.

It turned out, the problem I am having here has nothing to do with my server configuration, service account or any other account configuration on my remote machine whatsoever.

服务确实可以正常工作.

The services DO work as they should.

似乎我以错误的方式设置了脚本或脚本无法正常工作. 在查看脚本的执行过程时,我看到最终该命令已创建并尝试执行:

It seems that I either set up my script in the wrong way or it is not working properly. As I looked into the execution of the script I saw that at the end this command was created and tried to execute:

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
    -verb:sync -source:archiveDir="C:\Users\someName\AppData\Local\Temp\DeployDBVariantion00_zip" 
    -dest:auto,includeAcls='False',ComputerName='some.ip-.address?site=DeployApp/DeployThis',Username=someOtherName,Password=haveAnotherGuess,AuthType='BASIC'
    -disableLink:AppPoolExtension
    -disableLink:ContentExtension
    -disableLink:CertificateExtension
    -setParamFile:"C:\Users\someName\AppData\Local\Temp\DeployDBVariantion00_zip\SetParameters.xml" 
    -skip:objectName=dirPath,absolutePath="_Deploy_"
    -skip:objectName=filePath,absolutePath=web\..*\.config
    -skip:objectName=dirPath,absolutePath=_Package
    -skip:objectName=filePath,absolutePath=.*\.wpp\.targets$
    -allowUntrusted

但是,要使此命令正常工作,ComputerName-Parameter需要包括目标服务的完整地址,并且必须不包括IIS站点下的应用程序名称,因此请对其进行一些修改

But for this command to work the ComputerName-Parameter needs to include the full address to the target service AND the application name under the IIS site must not be included, so modifying it a bit into this

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe"
    -verb:sync
    -source:archiveDir="C:\Users\someName\AppData\Local\Temp\DeployDBVariantion00_zip" 
    -dest:auto,includeAcls='False',ComputerName='https://some.ip.-.address:8172/msdeploy.axd?site=DeployApp',Username=someOtherName,Password=haveAnotherGuess,AuthType='BASIC'
    -disableLink:AppPoolExtension
    -disableLink:ContentExtension
    -disableLink:CertificateExtension
    -setParamFile:"C:\Users\someName\AppData\Local\Temp\DeployDBVariantion00_zip\SetParameters.xml"
    -skip:objectName=dirPath,absolutePath="_Deploy_"
    -skip:objectName=filePath,absolutePath=web\..*\.config
    -skip:objectName=dirPath,absolutePath=_Package
    -skip:objectName=filePath,absolutePath=.*\.wpp\.targets$
    -allowUntrusted

然后完成了部署到我的远程计算机上的实际工作. 我还更详细地发布了有关此内容的信息

then did the actual job of deploying to my remote machine. I also posted about this in more detail here, because my problem now went from a server configuration problem to a script configuration problem ;)

这篇关于尽管启动了Web部署服务,msdeploy仍无法到达目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆