17

I'm trying to load a project that uses port host header names. My host file has 127.0.0.1 mysite

I get the following error when attempting to load the project in VS2010.

The URL 'http://mysite' for Web project 'Client.Web' 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.

The issue is is that I'm not using IIS Express and the web site is configured to use IIS. I have a site created within iis to use host header names.

I have other web projects that are running as an application on port 81 ex http://mysite/MyService, that do not cause this issue.

What can I do to get the project to run under port mysite root using IIS and still use VS2010?

The same thing happens if I just use a port number, ex: 127.0.0.0:81

3 Answers 3

24

Old question, but here's an answer:

In either your Client.Web.csproj or Client.Web.csproj.user file, search for "UseIISExpress" and set that value to false. It'll be in one of those two files.

Then VS2010 should be able to open and run/debug the project.

Sign up to request clarification or add additional context in comments.

2 Comments

Sometimes you also have to set the element "UseIIS" to true
the sneaker user file was getting me
17

In my case, the .csproj.user file was overriding the .csproj file. Solution is to delete .csproj.user file and reload the project

2 Comments

This was the case for me as well. Another Dev checked in the project after changing their Web Settings around. Deleting my *.user file allowed the project to open. Thank you @sree
This was also the fix for me.
0

Old question but this came up for me.

What worked for me was to edit the .csproj.user file and set the element UseIIS to true.

Clearly this is similar to deleting the .user file but this way you keep all the other settings

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.