Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the web deploy agent run on a port other than 80 on IIS6?

I've got a bit of a challenge with a Windows 2003 machine where I need to run the web deploy agent on a port which isn't 80. By default, MsDepSvc will expose an endpoint at http://[server]/MsDeployAgentService which obviously implicitly listens on port 80.

The problem I have is that the machine is also running Visual SVN Server which is using port 80 and as a result, the web deployment agent service refuses to start. (At least this is the only logical conclusion I can draw.) I have a small SVN management app on the same machine which I'd like to publish over web deploy hence the conundrum.

Is it possible to run the agent on another port? Obviously if this was IIS7 we'd be on 8172 and everything would be fine but unfortunately that's not the case here. Any suggestions?

like image 782
Troy Hunt Avatar asked May 03 '11 09:05

Troy Hunt


People also ask

What ports need to be open for web deploy?

By default, the Web Deployment Agent Service (MsDepSvc) listens on port 80, and the Web Management Service (WmSvc, also called the "handler") listens on port 8172 by default. You must run MsDepSvc by using the built-in Administrator account, or from a domain account that has been added to the Administrators group.

What is web Deployment Agent Service?

When you deploy a package from a remote computer, the Web Deployment Agent Service is responsible for extracting and installing the contents of the package. The service is started by default when you install the Web Deployment Tool and runs under the Network Service identity.

What is web deploy IIS?

What is Web Deploy? Web Deploy is an extensible client-server tool for syncing content and configuration to IIS. Web Deploy is used primarily in two scenarios: Developers use it to sync (aka 'publish') a compiled web applications (ASP . Net, PHP etc) from developer tools (Visual Studio, WebMatrix, etc) to IIS.

How do I know if web Deploy is running?

Is Web Deploy installed? You can verify web deploy is installed by going to the "Programs and Features" control panel and looking for "Microsoft Web Deploy 2.0" in the list of installed programs. If it is not there, you can install it via the Web Platform Installer by going to the "Products" tab.


1 Answers

There's a couple of ways to do this:

Option 1: Uninstall and re-install Specifying a different port:

msiexec /I WebDeploy_x86_en-US.msi /passive ADDLOCAL=ALL LISTENURL=http://+:8172/MsDeployAgentService 

The command line installs the MsDeployAgentService and configures it to listen on port 8172 just like on IIS7.

Option 2: Re-configure Existing Service to listen on port 8172:

  1. Stop the msdepsvc (net stop msdepsvc)

  2. Edit the following registry value:

    HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters\ListenUrl 

    It'll look something like:

    http://+:80/MsDeployAgentService 

    Change to:

    http://+:8172/MsDeployAgentService 
  3. Query HTTP listeners:

    httpcfg query urlacl 

    Your should see the following entry listed in the results:

    URL : http://+:80/MsDeployAgentService/ ACL : D:(A;;GX;;;NS) 
  4. Modify listener:

    httpcfg delete urlacl /u http://+:80/MsDeployAgentService/ 

    This should respond with: HttpDeleteServiceConfiguration completed with 0.

    httpcfg set urlacl /u http://+:8172/MsDeployAgentService/ /a D:(A;;GX;;;NS) 

    This should respond with: HttpSetServiceConfiguration completed with 0.

    The ACL specified in the /a switch should match the ACL reported by the httpcfg query urlacl command

  5. Restart the msdepsvc (net start msdepsvc).

  6. You can confirm that the service is listening on port 8172 by doing:

    netstat -an 

    You should see the following:

    TCP    0.0.0.0:8172           0.0.0.0:0              LISTENING 

Warning:

I would try this on a non-production machine first to ensure this works as you expect.

like image 85
Kev Avatar answered Oct 01 '22 11:10

Kev