Willkommen bei bytebang » The blog about all and nothing » How to rename an application within IIS7

How to rename an application within IIS7

Feb 09 2016

The problem

Our customer runs a reverse proxy server that connects to an in-house helpdesk system. This setup suddenly stopped working after an upgrade of th helpdesk system to a new version. It turned out that the problem is that the webapplication has changed its name and was therefore not reachable for the reverse proxy any more.

The upgrade of the web application changed the name /helpdesk to /Helpdesk (notice the upper case letter H).

iis7_original.png

Of course - the obvious solution is to reconfigure the reverse proxy to the new URL but sometimes this is not possible, and you have to rename the webapplication. After fiddeling around for another 20 minutes it turned out that this is not possible to change the webapplication name within the management interface of IIS7.

The solution

The solution is to change it via the commandline. Just fire up a command window and do the following:

C:\Users\company>%systemroot%\system32\inetsrv\appcmd list vdir
VDIR "Default Web Site/" (physicalPath:%SystemDrive%\inetpub\wwwroot)
VDIR "Default Web Site/Helpdesk/" (physicalPath:C:\inetpub\wwwroot\helpdesk)

C:\Users\company>%systemroot%\system32\inetsrv\appcmd set app "Default Web Site/Helpdesk" -path:/helpdesk
Das APP-Objekt "Default Web Site/Helpdesk" wurde geändert.

C:\Users\company>%systemroot%\system32\inetsrv\appcmd list vdir
VDIR "Default Web Site/" (physicalPath:%SystemDrive%\inetpub\wwwroot)
VDIR "Default Web Site/helpdesk/" (physicalPath:C:\inetpub\wwwroot\helpdesk)

C:\Users\company>

The command %systemroot%\system32\inetsrv\appcmd can be used to list the current virtual directories and to change them.

Finally we ended up with the following configuration:

iis7_renamed.png

From there on everything worked as designed !

Get Social


(c) 2024, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen
-