Visual Studio unable to open Web site error

2020-07-22 19:47发布

I work with Visual Studio 2008 and work on a web project which contains a web site. When opening the solution file, I receive the error message: "Unable to open the Web site http://localhost/myWebsite.de. The Web site http://localhost/myWebsite.de does not exist." I can see the web site greyed out, with the remark "unavailable", in the solution folder.

It is possible to add the web site to the solution, but after relaunching Visual Studio, it´s gone again.

Has anyone had this problem in a similar way?

4条回答
我想做一个坏孩纸
2楼-- · 2020-07-22 20:11

Question was probably not general enough to answer it... Must have been some problem with my SourceSafe, after I copied the web site to a local folder, I had no problems any more.

查看更多
Emotional °昔
3楼-- · 2020-07-22 20:14

Please Check with the host file located in "C:\Windows\System32\drivers\etc" directory. There might be chances for redirecting localhost to some other host environment by you or someone else. If you remove the line for localhost configuration it will work for you.

查看更多
男人必须洒脱
4楼-- · 2020-07-22 20:31

I think KB 326497 has your answer. Setting up an IIS virtual directory to point to the location the site is running from corrected this error for me.

查看更多
等我变得足够好
5楼-- · 2020-07-22 20:32

Open the existing Solution file using notepad, Copy the actual project Directory path and update the solution file content with respect to following options alone

Debug.AspNetCompiler.PhysicalPath = "update the path here"
Release.AspNetCompiler.PhysicalPath = "update the path here"
SlnRelativePath = "update the path here"

leave the remaining config untouched

查看更多
登录 后发表回答