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

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.

Leave a Comment