Rename Website Project in Visual Studio 2013

Introduction

You cannot rename a website type project in Visual Studio 2013 by simply right click and rename...!!

This issue is caused by IIS Express. You can solve it by changing the site name in applicationhost.cofig of your IIS Express. While changing the name, make sure that this name is unique.

Rename website in IIS Express

Steps to modify applicationhost.cofig

  1. Find the applicationhost.cofig of your IIS Express, usually it should be listed in Folder C:\Users{username}\Documents\IISExpress\config

  2. Locate the corresponding site section of your project in the cofig file, shown below.>
    1. <sites>    
    2.   <site name="WebSite1" id="1" serverAutoStart="true">    
    3.     <application path="/">    
    4.       <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />    
    5.     </application>    
    6.     <bindings>    
    7.       <binding protocol="http" bindingInformation=":8080:localhost" />    
    8.     </bindings>    
    9.   </site   
  3. Rename "WebSite1" to "WebSite2" and make sure that "WebSite2" is not already in use. Save the file.

  4. Close and Reopen your solution in Visual Studio, you'll found that the specif name for your website project has been renamed.

Thank you