Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename an IIS Express website in Visual Studio 2012

I initially created a site in Webmatrix 2. I just called it website1. I've now been working on the site in Visual Studio 2012 and I would like to rename it. It doesn't appear you can rename it directly, but in the .sln file there is a project entry which contains the string "website1". I renamed it and re-started VS. The new name briefly displays but then gets overwritten with the original name. So now I have the .sln file with the new name and nowhere within the folders does it reference the old name - i've searched every file. But yet VS insists on calling the site website1. So i'm totally confused.

Any ideas where VS stores the name of websites? The only thing I can come up with is how VS integrates with IIS Express. Perhaps it is taking the name from IIS instead?

like image 359
Neil Dobson Avatar asked Jan 17 '13 01:01

Neil Dobson


People also ask

How do I rename a website in IIS?

You can rename the website by changing the "path" in applicationHost. config. The applicationHost. config file in this path: C:\Windows\System32\inetsrv\config.

How do I edit IIS Express in Visual Studio?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.


1 Answers

I just encounter the same problem with you during using VS 2013, it turned out that it's caused by IIS Express, finally I solved it by following steps:

  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
  3. Remove all those site section with simillar site name like ProjectNameABC and ProjectNameABC(1)
  4. Close and Reopen your solution in vs, you'll found that the spefic name for your web project come back
like image 186
Haobo Avatar answered Sep 16 '22 15:09

Haobo