I have a web project in my solution file that is \"unavailable\" when I open the solution. When I right-click on the web project and reload the project, I get the following
In my case, this problem was caused by broken IIS bindings. Specifically, my 'http' binding had been deleted. Recreating it fixed the problem.
For DNN users my issue was I needed a binding for dnndev.me at port 80. I have multiple installs that run on different ports and VS requires that that particular Url to exist on port 80 (not 86 like mine was).
This may help some people in 2020. The main issue is that the IIS settings in the CSPROJ file don't match with the configuration for the machine. For example, if you had the Web Application Project pointing to localhost:12345, and a virtual directory isn't set up on the machine on that port, you'll get this error.
Using VS2019, I had this same issue, and the IIS settings in the CSProj file were being ignored. The reason for this is a new property in the CSProj file called "SaveServerSettingsInUserFile":
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties UseAjaxifiedTemplates="True" UseJQuerySupport="True" />
</VisualStudio>
</ProjectExtensions>
When this is set to TRUE, the IIS/Web server properties are in the
.CSPROJ.User file of the same project name.
This allows individual users of a project to have their own IIS settings, provided this file is not checked into source control.
You can control where the settings are stored using Visual Studio GUI in the properties for the project under "Web", "Apply server settings to all users"
When this is on, the IIS settings are stored in CSPROJ, when off, they are stored in CSPROJ.User
You will not believe that, start
visual studio as Administrator
as obvious from the message
The Web Server 'http://localhost/MyWebApp' could not be found.
could not be found because may it has no privileges to see it
so Just restart
visual studio as Administrator
I fixed this simply by reinstalling IIS Express after downloading from below link:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48264
Open the project folder and delete {Project}.csproj.user, then reload the project on Visual Studio.