asp.netvisual-studioiiswebmatrix-2

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?


Solution

  • I had the exact same problem, and after a lot of hair pulling realized that IIS Express (as you said) somehow was the culprit. However, I couldn't find out where the site name was stored.

    This is what I ended up doing (in addition to renaming directories and replacing the old project name with the new one in the solution file):

    Hope this helps someone!