Convert file system website to IIS website

We recently switched from VS 2008 to VS 2010. The migration went perfectly, except for our web project. Previously, in VS 2008, the site appeared as http: // localhost / Website . Now it looks like C: ... \ Website. It seems that when we did the migration, VS began to consider it as a file system site.

I tried to delete the existing site and re-add it as an existing website, but it still displays it as C: ... \ Website. Is there a way to convert it to show it as http: // localhost / Website and run it through IIS, unlike the standard ASP.NET Development Server?

+6
visual-studio-2008 visual-studio-2010 iis
source share
2 answers

Special thanks to John Dundon at Microsoft for helping solve this problem. Here is what he said:

Thanks for all the details. This actually looks like fancy behavior in VS, I think I can help you work around.

I believe that the reason for remembering it is to use the local development server because it is stored in the SUO file. Thus, there are two possible ways to fix this:

  • Re-open the solution from the source control as an administrator on machines with IIS installed and everything should be loaded in its correct place
  • If you close VS, delete the SUO file (note - this will erase some state settings of your solution, but there should be no data loss), and then reopen the solution, it should ask you to reload this particular website and try to make it IIS website again.

Please note, however, since the virtual directory already exists in your machine, and it will ask you if you want to use it - I assume that you do, but it will overwrite any files when it does.

Let me know if this works for you (and so far you don’t technically need to, it might be a good idea to back up any work done on it that has not been verified before trying it).

I followed his advice and deleted my SUO file and reopened the solution. The website was automatically committed as http: // localhost / Website , and it also checked the .SLN file, and when I checked it, it fixed the release for other developers. Hope this solution helps others as well as with this unusual problem.

+8
source share

View the project properties on the Web tab. You can choose whether to use IIS or the development server and which virtual directory to use.

+2
source share

All Articles