I have an ASP.NET project which uses IIS. IIS site is configured to use custom binding host name. Project file contains following settings:
...
<UseIISExpress>false</UseIISExpress>
...
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>8662</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://custom.host.name/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl></CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
...
When project is configured in such a way, I can access the site from http://custom.host.name/
and VS automatically attaches to IIS worker process when debugging.
When I reload project (either by closing/reopening solution or by unload/reload in project context menu), something unexpected happens. Project fails to load, (load failed)
is displayed to the right of project name in solution explorer and message box is shown with the following message (it's also displayed in the Output window):
The URL 'http://custom.host.name/' for Web project 'Some.Asp.Net.Project'
is configured to use IIS Express as the web server but the URL is currently
configured on the local IIS web server. To open this project, you must use
IIS Manager to remove the bindings using this URL from the local IIS web server.
I have tried removing project site configuration from IIS Express applicationhost.config
file, but it didn't help.
I don't encounter this problem when mapping project to IIS Application under default site.
VS version is Ultimate 2012 Update 3.
I have set "SaveServerSettingsInUserFile" as True and it worked for me.
Source : click here
If your project is part of a solution, Open the solution file (.sln) and edit the project section.
It Worked for me.
The solution is: delete
*.csproj.user
file!I had the same issue, running as administrator didn't work for me.
Setting
<UseIIS>True</UseIIS>
to false in project's ".csproj" file temporarily could load the project, but value was returning to True after restarting or closing the solution.Completing @Cyrus 's answer (that worked for me) for a more neat answer, I focused more on project's csproj.user file and found the exact source of problem: setting
<UseIISExpress>true</UseIISExpress>
to false, then reloaded the project. working good, without deleting csproj.user file. result is like this:For me combination of both worked for Visual Studio 2015 Preview with Windows 7 64 bit:
1. delete *.csproj.user file and
2.
<UseIISExpress>false</UseIISExpress>
in Solution File.Steps for Step 2:In Visual Studio Right Click on Project==> Unload ===> Edit the Solution
I landed here when a project, configured to use IIS, wouldn't load because it couldn't find the web site (myproject.mycompany.local)--even though the web site loaded fine in my web browser.
The solution was to make sure the site's binding in IIS 7 had the host name set to "myproject.mycompany.local". To get to your site's bindings:
If you site doesn't load in the web browser either, it's probably because you don't have an entry for it in your hosts file: