locked
Deployment to a remote machine failed

    Question

  • Hi All,
        I am getting following error when I try to publish my app directly to another machine in same network..
    Error 1 Web deployment task failed.(Remote agent (URL http://vivek/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://vivek/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. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets 962 10 Illuminous
    Any ideas whats wrong here?
    The remote machine has MS deployment 2.0 installed & the Web Deployment Service running..
    This is getting over me now ..
    LS community helped me creating a wonderful application which I am not able to deploy on my client's server. 
    Its really urgent & I will really appreciate any help.
    Thanks & Regards

    Supreet
    Sunday, June 05, 2011 8:57 AM

Answers

  • Hi Supreet,

                    LS not only supports publish to Windows Server 2008,2008 R2 but also Win 2003 and Win 7 with IIS. If you are setting up an IIS server, it is highly recommended to install and use the Web Platform Installer. After install search for Lightswitch and select that for install.

     

    Thanks,
    Sandeep 

    Monday, June 06, 2011 6:26 PM

All replies

  • Hi,

    I'm having the same issue trying to deploy to a client's server. Also, I've tried to create the manual file for publishing, but the "Import Application" link is missing in IIS Manager.

    Any help would be appreciated.

    All the best,
    Rune

    Monday, June 06, 2011 3:08 PM
  • Hi All,
        I am getting following error when I try to publish my app directly to another machine in same network..
    Error 1 Web deployment task failed.(Remote agent (URL http://vivek/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://vivek/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. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets 962 10 Illuminous
    Any ideas whats wrong here?
    The remote machine has MS deployment 2.0 installed & the Web Deployment Service running..
    This is getting over me now ..
    LS community helped me creating a wonderful application which I am not able to deploy on my client's server. 
    Its really urgent & I will really appreciate any help.
    Thanks & Regards

    Supreet

    Please could you try "https://" as mentioned in the following thread: http://social.msdn.microsoft.com/Forums/en-AU/lightswitchgeneral/thread/2811366f-3688-4593-8fd5-cdbdac3ccb85

     

    Monday, June 06, 2011 4:08 PM
  • Hi,

    I'm having the same issue trying to deploy to a client's server. Also, I've tried to create the manual file for publishing, but the "Import Application" link is missing in IIS Manager.

    Any help would be appreciated.

    All the best,
    Rune


    Rune, please try to uninstall and reinstall 'WebDeploy_x64_en-US' on the IIS machine. This exe comes with the setup and will be under WCU\MSDeploy folder.
    Monday, June 06, 2011 4:14 PM
  • Hi Rune,

       We get this error is because LS only supports windows server 2008 when it comes to remote publishing. (even I need confirmation on this I've asked this on a couple of threads)

    You will see the Deploy-> Import Application link when you install web deployment tool, you can get it here

    http://www.iis.net/download/WebDeploy

    & Don't forget to start the Web Deployment Service after Installation (which should already be done after you install the tool, but good to crosscheck)

    Hope this helps.

    Supreet


    Supreet
    Monday, June 06, 2011 5:04 PM
  • Hi Ravi,

       Thanks for helping. I didn't know I had to mention https while publishing directly to the remote server. I will give it a try & let you now if it works. Also I read in some threads that remote publish is only possible in Windows Server 2008 (the thread was dated back to beta 1 release, thus i am not sure whats the scenario in Beta 2 )

    Still I will give it a try & will revert back to you.

    Thanks for your help.

    Regards

     


    Supreet
    Monday, June 06, 2011 5:09 PM
  • Hi Supreet,

                    LS not only supports publish to Windows Server 2008,2008 R2 but also Win 2003 and Win 7 with IIS. If you are setting up an IIS server, it is highly recommended to install and use the Web Platform Installer. After install search for Lightswitch and select that for install.

     

    Thanks,
    Sandeep 

    Monday, June 06, 2011 6:26 PM
  • Hi Supreet,

                     As of Beta2, publishing to Win 2008, Win 2003 and Win7 is supported. Hope this helps.

    Thanks,
    Sandeep 

    Monday, June 06, 2011 6:28 PM
  • Hi Sandeep,

       Thanks for the update. Yes I did install server prerequisite on a clean windows 7 machine but No it did not set everything for me as Beth has suggested in her blog.

    Even after installing the prerequisites I had to configure IIS, Web Deployment Services & firewall options manually.

    Any ways with your word & with what Ravi has suggested that I should use https instead of http while publishing remotely I am sure this will work.

    Let me give it a try & I will update this thread with my findings.

    Thanks & Regards


    Supreet
    Monday, June 06, 2011 7:24 PM
  • Hi all,

    Thanks for all the suggestions. Uninstalling and re-installing the Web Deployment Tool worked - it seems the LS prerequisites install an older version, but I might be mistaken about that.

    However, there were several other issues with that server, so in the end I ended up publishing to another server instead.

    All the best,
    Rune

    Tuesday, June 07, 2011 8:30 AM
  • Yes, you're correct, the prerequisites install version 1.1
    Plus ça change, plus c'est la même chose!
    Tuesday, June 07, 2011 8:53 AM
  • Hi Supreet,

                        The WPI doesn't configure security settings in firewall as different organizations will have different policies of what to allow and disallow. We leave the firewall configuration for the individual to configure. Please keep us posted about your findings and we'll try and help you out with the publish.

    Thanks,
    Sandeep 

    Wednesday, June 08, 2011 8:07 PM
  • Hi Sandeep,

       I mentioned about firewall settings because it was mentioned in one of Beth's blog about configuring a server to deploy LS apps. 

    As of now I tried with https:192.168.2.2 (my server's ip) & also with https://myServerName

    I also tried checking & unchecking the "Allow untrusted Certificate" but to no help. Still getting the same error.

    Any pointers on what might be wrong?

    Thanks & Regards

    Supreet


    Supreet
    Friday, June 10, 2011 5:02 PM
  • Hi All,

       After trying all solutions I still am not able to publish remotely to a machine in the same network.

    I can access the localhost of partner machine, cam also see the LS application that I deployed manually.

    Has any one really being successful in achieving this?

    Also when I am not in the same network I can use "HAMACHI" to create a network between the machines.

    I use HAMACHI very frequently & It works very well.

    Infect I was also able to see the deployed application & localhost using HAMACHI, so I believe a network is being established successfully.

    Still either with machines IP or IP provided by HAMACHI I was not able to publish the app remotely.

    This is really bad in our case as we are frequently getting clients who are located at different geographies & with time it would become impossible for us to provide them with updated software moreover I had to copy my entire code to Client's server for publishing.

    Any help is appreciated & despardely needed now. 

    Thanks & Regards

     


    Supreet
    Tuesday, June 28, 2011 4:05 PM
  • Have you considered publishing the app as a "desktop app"? This way you'd place the install files on a server somewhere accessible to your clients, & install from there. A desktop app is a Click-Once app that will automatically check, & update itself, each time that the clients start their app.

    It may not be the architecture that you wanted, but it might get you around the problems that you're having. Who knows, whatever's causing this may even be fixed in the RTM.


    Yann

    (plus ça change, plus c'est la même chose!)

    Tuesday, June 28, 2011 10:21 PM
  • When I was pulling my hair out trying to get remote deploy working, I posted this which worked for me both locally and in a Win2008Server VM. Also remember to remove Web deploy 2.0 if installed and reinstall LS prereq if so.

    http://social.msdn.microsoft.com/Forums/en-US/lightswitchgeneral/thread/bf03639c-7e89-4e27-b601-998f7d2c5bd1

    Wednesday, June 29, 2011 1:54 AM
  • I hope this helps Supreet with his problem!

    Yann

    (plus ça change, plus c'est la même chose!)

    • Marked as answer by Supreet tare Wednesday, June 29, 2011 10:35 AM
    • Unmarked as answer by Supreet tare Wednesday, June 29, 2011 10:35 AM
    Wednesday, June 29, 2011 2:46 AM
  • Hi Yann/ William

    I am publishing a desktop app in IIS.

    I tried all steps mentioned by William but to no luck.

    Here is the error I am getting

    "Error 1 Web deployment task failed.(Could not complete the request to remote agent URL 'https://5.58.252.179/:8172/msdeploy.axd?site=Default Web Site'.)

    This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.

    Error details:

    Could not complete the request to remote agent URL 'https://5.58.252.179/:8172/msdeploy.axd?site=Default Web Site'.

    The underlying connection was closed: An unexpected error occurred on a send.

    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    An existing connection was forcibly closed by the remote host C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets 962 10 Illuminous

    "

     

    Any help is appreciated

    Thanks & Regards


    Supreet
    Wednesday, June 29, 2011 10:38 AM
  • To answer a question you asked a few posts back, yes, I've been able to publish a desktop app to another server on the same network.

    Usually with a desktop app, you don't have as much to worry about, like having IIS set up correctly etc. It usually just "works". 

    I'm sorry, I'm going to have to leave this one for the team to respond to. I haven't had this kind of problem with publishing a desktop app (which is the only type of app I use btw), nor have I seen anyone else with this problem. It's usually web apps that have all the configuration problems etc.


    Yann

    (plus ça change, plus c'est la même chose!)

    Wednesday, June 29, 2011 11:46 AM
  • Things I would try:

    1) Turn off firewall on host machine to rule out fw ports not configed.

    2) Make sure Web Deployment Agent service started in services on host.

    3) In Programs and Features, Web Deployment Tool 1.1.x installed on client side?

     

    Thursday, June 30, 2011 4:30 AM