Visual Studio Web Deploy to IIS 6

MCS picture MCS · Nov 9, 2010 · Viewed 16.6k times · Source

Has anyone successfully used the new Web Deploy feature of VS2010 to deploy a web site to IIS 6 running on Windows Server 2003?

When I try I get the following error:

Web deployment task failed. Could not complete the request to remote agent URL 'https://myserver:8172/msdeploy.axd?site=mysite'. Unable to connect to the remote server. No connection could be made because the target machine actively refused it.

I can deploy locally (from VS installed on the server to IIS on the server) and the World Wide Web Publishing Service is running. However, there is no process listening on port 8172. Is there supposed to be one?

Answer

Troy Hunt picture Troy Hunt · Dec 6, 2010

Your question has been partially answered already but let me try and summarise it in one go. You're on Windows Server 2003 which means IIS6. Whilst IIS6 can be published to via Web Deploy, you must use the Web Deployment Agent which means the end point you're publishing to should look something like this:

http://myserver/MsDeployAgentService

Note this is not an HTTPS address and does not explicitly specify a port. Also, the account publishing to this endpoint must have admin rights on the server (nasty, but necessary). Finally, make sure the "Web Deployment Agent Service" is actually running because it's not set to start automatically by default.

Your example is for Windows Server 2008 running IIS7 where the IIS Deployment Handler can be used (incidentally, the Web Deployment Handler can also be used against IIS7).

Have a look at this post of mine: You're deploying it wrong! TeamCity, Subversion & Web Deploy part 3: Publishing with Web Deploy.