27

I've a problem with loading Web Application project in VS2013. This project depends on IIS Express, but I wouldn't install IIS Express because I already installed IIS.

What I can edit in .csproj file to load this project? I've tried to set to false, but it's wouldn't help me to solve problem.

Thank you for advice.

Upd.1: Also, I cannot create new web projects - VS tell me same things.

5 Answers 5

62

Happened to me too. My workaround:

  1. Right-click the (failed-to-load) project => edit web.csproj
  2. Find the line <UseIISExpress>true</UseIISExpress>, and change it to false.
  3. Save, close, reload project.

Result - different error:

The Web Application Project web is configured to use IIS. To access local IIS Web sites, you must run Visual Studio in the context of an administrator account. In addition, you must install the following IIS components:

ASP.NET

So:

  1. Edit again, change <UseIIS>True</UseIIS> to false
  2. Save, close, reload project.

Result - Great Success!

2
  • 2
    I had to do this in the ProjectName.csproj.user file, because I have "Apply server settings to all users (store in project file)" cleared in the project. Just deleting the .user file did not work.
    – Tom Winter
    Feb 17, 2016 at 21:28
  • 1
    Great success unless you actually don't want to use IIS, but were wanting it to use IIS Express. In my case it was changing settings stored in the csproj (on the insistance of others in the team) from IISExpress to IIS. Deleting the user file as recommended in the answer below was the solution.
    – Mick
    Oct 16, 2020 at 4:44
31

Try to delete user config file "ProjectName.csproj.user" then reload project.

VS 2012 can't load project which uses IIS with custom binding host - thinks it's using IIS Express

3
  • My issue was not related to IIS Express but pointing to IIS. The delete worked, thanks. Feb 2, 2016 at 12:57
  • This file contains a copy of the settings referenced in Jonathan's answer. This file can get out of sync if you switch the .csproj to IIS, then undo the file in git. The .csproj still wants to use IIS but the .csproj wants to use IIS express.
    – Moby Disk
    Apr 8, 2019 at 21:04
  • This happens when you have changed the "Apply server settings to all users (store in project file)" from disabled to enabled and the settings for the server are in both the user file and the csproj file and those settings conflict.
    – Mick
    Oct 16, 2020 at 4:49
0

It happened to me today. Changing "UseIIS" to false allowed to load project, but not use IIS. After some tests I've found the cause of the problem:

On previous CheckIn to VSS somehow the UAC (user account control) was switched on. So actually there were two alternatives: (i) Always use "Run as administrator" ; (ii) switch UAC off. I prefer (ii).

0

I had a custom host file setup up with foo.localhost -> localhost bound on both ports for HTTP/HTTPS

checking on something i removed the host header for the binding on port 80. once reloading solution is when everything started crashing.

found a really old post that reminded me that i removed that host name from the binding.

adding foo.localhost header back to the binding and all my projects started reloading.

-2

If nothing works, try removing following two lines from .csproj file. (always worked for me)

<ProjectGuid>{3AA499DF-4A65-43B7-8965-D08A4C811834}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1
  • Before I remove a project guid, I would like to understand what it is I'm removing first. If it works, why? If unknown...this is guessing and unsure answers are likely to get me into more trouble. Sorry.
    – PHenry
    Oct 17, 2020 at 23:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.