Publishing VS 2010 Using Web Deployment

I am trying to deploy my ASP.NET MVC 3 web application using the VS2010 publish function. I use the Web Deploy method as Publish, but I get this error:

Error 1 The web deployment task failed. (Remote agent (URL) http://192.168.1.11/MSDEPLOYAGENTSERVICE ) could not be contacted. Make sure that the remote agent service is installed and running on the target computer.) Make sure that the site name, username and password are correct. If the problem is not resolved, please contact your local or server administrator. error detail: Remote agent (URL http://192.168.1.11/MSDEPLOYAGENTSERVICE ) could not be contacted. Verify that 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.

How can I get around this and make it work? My server is Windows 2008 R2.

+7
source share
3 answers

Take a look at this answer that I provided to someone facing another problem, WebDeploy has a few questions:

msdeploy (Web Deploy) with error 401 problems with answering machine

Also, make sure you upgrade to WebDeploy 2.0 if you have control over the development machine and server.

And finally, make sure that you configured the server correctly, believe that the time spent on this step can save your hair:

Configure Web Deployment

+5
source

For those still looking, I had to make sure:

  • Specify port 8172, use the default service name (msdeploy.axd), use https and check the box to allow untrusted certificates in the URL of the publishing service from Visual Studio: https: // serveraddress: 8172 / msdeploy.axd

In addition, I found this article in an IIS article very useful for configuring a service.

+1
source

I pulled my hair out for 4 hours. Here is what I used for configuration settings. In IIS (7.5 on Server 2008 R2)

I granted publishing permissions for the IIS account that I created (although I also used the server administrator account to eliminate permission problems, in the end both worked.)

I left everything else as it is. Destroyed I was a VPS, so the computer name had nothing to do with my application or domain, so I left the URL for publication as it was. I left the place to save the publication settings file as is.

In Visual Studio:

  • Publish Method: Web Deployment
  • Service url: https://myservice.com (no port or msdeploy here, just https url)
  • site application: mysitename / myapplicationname (for me they are both the same name)
  • Mark as IIS application: checked
  • Leave extra files: checked
  • Allow untrusted certificate: checked

For the username - I did not need to use the fully resolved name, so the user, unlike the server name \ user, worked fine.

This failed with error 404 - and if I tried to send it via http instead of https (the service url), it failed with a socket error (10054).

I checked that all the necessary services are running, and I restarted them all. I also restarted IIS (which is painful for my situation). Another nada.

Then I decided to reinstall the web deployment on the server (3.0 RC). I definitely used a custom installation, when I did this, I made sure that all components and handlers are installed (they are not installed by default). As soon as I did this, everything began to work fine.

I'm not sure I had a bad installation for the first time, but now it works fine.

+1
source

All Articles