Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Project using IIS, but I get error about configuration of IISExpress

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

like image 323
Brian Avatar asked Jan 11 '13 18:01

Brian


People also ask

How do I fix IISExpress?

Open the control panel and try to uninstall IIS express first. Then download IIS Express from this link. If it still cannot work, please open visual studio installer and repair it. VS will reset all environment path and variables.

Where is the IIS Express config file?

IIS Express uses a default, user-specific ApplicationHost. config file to allow many users to share the same computer without interfering with other user's settings. This file is located in the %userprofile%\Documents\IISExpress\config folder or %userprofile%\My Documents\IISExpress\config folder, depending on your OS.


2 Answers

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.

like image 114
Melissa Avery-Weir Avatar answered Oct 23 '22 19:10

Melissa Avery-Weir


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

like image 17
sree Avatar answered Oct 23 '22 19:10

sree