Rename Applications and Virtual Directories in IIS7
Posted
by AngelEyes
on Geeks with Blogs
See other posts from Geeks with Blogs
or by AngelEyes
Published on Sun, 05 Dec 2010 14:47:32 GMT
Indexed on
2010/12/06
16:57 UTC
Read the original article
Hit count: 766
from http://lanitdev.wordpress.com/2010/09/02/rename-applications-and-virtual-directories-in-iis7/
Rename Applications and Virtual Directories in IIS7
September 2, 2010 — Brian GrinsteadHave 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.
1C:> %systemroot%\system32\inetsrv\appcmd list app23APP"Default Web Site/OldApplicationName"4APP"Default Web Site/AnotherApplication" - Run a command like this to change your “OldApplicationName” path to “NewApplicationName”. Now you can use http://localhost/newapplicationname
1C:> %systemroot%\system32\inetsrv\appcmdsetapp"Default Web Site/OldApplicationName"-path:/NewApplicationName23APP object"Default Web Site/OldApplicationName"changed
Renaming Virtual Directories In IIS7
- Open a command prompt to see all of your virtual directories.
1C:> %systemroot%\system32\inetsrv\appcmd list appcmd23VDIR"Default Web Site/OldApplicationName/Images"(physicalPath:\\server\images)4VDIR"Default Web Site/OldApplicationName/Data/Config"(physicalPath:\\server\config)We want to rename /Images to /Images2 and /Data/Config to /Data/Config2. Here are the example commands:
1C:> %systemroot%\system32\inetsrv\appcmdsetvdir"Default Web Site/OldApplicationName/Images"-path:/Images223VDIR object"Default Web Site/OldApplicationName/Images"changed45C:> %systemroot%\system32\inetsrv\appcmdsetvdir"Default Web Site/OldApplicationName/Data/Config"-path:/Data/Config267VDIR object"Default Web Site/OldApplicationName/Data/Config"changed
© Geeks with Blogs or respective owner
