Overview

For IIS based Web Applications, you are not allowed to edit the application alias from IIS Manager Interface directly. If you go to editing , The alias of an application has the gray color (not admitted to change). But in this article we provide some ways to Change Web Application Name in IIS.

But there are an another ways to do it:

  1. Create a new application / virtual directory
  2. Use the Appcmd to rename the web application name
  3. Change the Alias or URL by  Migrating the Web Application

First consider a scenario that you have the original URL as https://mycompany.com/SpiraTest  and now you want it to Change it to https://mycompany.com/SpiraTeam , then you have the following options:

1. Create a New Application

Create a new IIS Application[Virtual Directory] named SpiraTeam under the Root "Default web Site". Give the Physical path same as SpiraTest(Original URL). Use the same Application Pool and other settings [ This is Applicable if  it does not have nested Virtual Directories/Applications]. Once this is done, you can delete the original SpiraTest application [virtual directory].

2. Use the AppCmd Command

You can use Appcmd command  to Rename the Web Application Name [ Applicable if the nested web application is not much high , usually 3 to 4 web Applications].

%systemroot\%system32\inetsrv\appcmd set app "Default Web Site/SpiraTest/InstanceA" -path:/SpiraTest/InstanceB [ Renaming the Parent Web App]
%systemroot\%system32\inetsrv\appcmd set app "Default Web Site/SpiraTest" -path:/SpiraTeam [ Renaming the Child Web App]

In this case you have to start renaming process from the web application from Child node, otherwise all the nested web application be lost in oblivion. If there are lot of nested web applications then it would be very tough to rename all of them.

3. Change the Alias or URL by  Migrating the Web Application

Changing the Alias or URL path by  Migrating the Web Application under  the desired Alias Name/ Web Application

The Best way which i have discovered is to migrate the   web Application under  new Alias Name  using Web Deploy Command Line Utility

The Best way which i have discovered is to migrate the web Application under new Alias Name using Web Deploy Command Line Utility. This can be said as Hybrid Method as this is Inplace Migration.

Few Words about Web Deploy Tool

The Web Deployment Tool (Web Deploy) is a command-line tool that deploys content and configuration from a user-specified Web site or Web server to a user-specified destination.

Before using this tool ,it has to be downloaded and installed on both the source and destination web servers

Download options and locations

You can install Web Deploy by using the Web Platform Installer, by running the Web Deploy Windows® Installer, or from the command line by using Msiexec.exe. The Web Platform Installer requires fewer steps, while the other methods allow you to customize your installation. In all cases, you should perform the installation only if you are logged on as an administrator.

Web Deployment Tool Download Locations

PlatformLocation

x86 (32–bit)

Web Deployment Tool (x86) Jump

x64 (64–bit)

Web Deployment Tool (x64) Jump

Once the web Deploy tool is installed, note down your deployment objective.It will be then easier to formulate the web deploy command

Deployment Objective:-

Current URL Path: https://mycompany.com/SpiraTest

Requested URL Path: https://mycompany.com/SpiraTeam

Capture the web application in the form of package via web deploy command

First Step is to Capture the Web Application  in the form of package using Web Deploy command line. Before Running the command please capture the web Application ID from IIS.

msdeploy -verb:sync -source:metakey=lm/w3svc/1/SpiraTest -disableLink:ContentExtension -dest:package=c:\SpiraTest.zip,encryptPassword="password" -enableLink:AppPool >c:\SpiraTest.log

Deploy the package to perform in-place Migration

Then Run the below Command to Migrate the web Application Named SpiraTest under new Alias SpiraTeam

msdeploy -verb:sync -source:package=c:\SpiraTest.zip,encryptPassword="password" -dest:metakey=lm/w3svc/1/SpiraTeam >c:\SpiraTeam.log

After the deployment is completed.Read the deployment log(c:\iis1.log)  to see if there  are any errors.If no errors logged , your deployment is completed successfully.

Start using your new URL https://mycompany.com/SpiraTeam