Rename Applications and Virtual Directories in IIS7
Note: this is a cross posting from my article at the foliotek devblog. This improves some of the code formatting.
Have you ever wondered why the box to change the name or “Alias” on an application or virtual directory is greyed out (see screenshot below)? I found a way to change the name without recreating all your settings. It uses the built in administration commands in IIS7, called appcmd.
Renaming Applications In IIS7
Open a command prompt to see all of your applications.
Run a command like this to change your “OldApplicationName” path to “NewApplicationName”. Now you can use http://localhost/newapplicationname
Renaming Virtual Directories In IIS7
Open a command prompt to see all of your virtual directories.
We want to rename
/Data/Config2. Here are the example commands: