10

My web apps created in VS 2008 on Windows Server 2003, refuse to open in VS 2008 on Windows Server 2008.

"The Web Application project 'MyProjectName' is configured to use IIS. To access local IIS Web sites, you must install the following IIS components: IIS 6 Metabase and IIS 6 Configuration Compatibility Authentication".

I want nothing to do with IIS 6, so I am not installing those components. I want pure IIS 7.

Is there an upgrade tool or something I can modify in the project file that will allow them to open in visual studio?

Triynko
  • 18,766
  • 21
  • 107
  • 173
  • That message is only about local IIS web sites, not the production site. – John Saunders Jul 08 '09 at 22:19
  • Yeah, I got it to open by removing the last section . In particular, the that specified the localhost URL. But, if I use the same URL, with the tag instead, and run visual studio as admin, it works! So wtf? It's the same local URL, but if I call it that, then it doesn't work? Omg. – Triynko Jul 08 '09 at 22:27
  • The production site IS local. If I put the local URL under the "Use Custom Web Server", it works. If I put the SAME local URL under the "Use Local IIS Web Server" option right above it, it gives me that error. That's rediculous. – Triynko Jul 08 '09 at 22:30

8 Answers8

13

This is bizarre. The only thing I replace is "<IISUrl> http://localhost/site </IISUrl>"; with "<CustomServerUrl> http://localhost/site </CustomServerUrl>" in the project file, and the project loads and debugs (as admin) just fine.

Why is this change in tag name, which seems to provide the same information -- the project URL -- enough to prevent the entire project from loading. Unacceptable.

Triynko
  • 18,766
  • 21
  • 107
  • 173
  • I had the same problem. Your patch works great!! I wish you would give a reference to where you found this info. – MattSlay Sep 16 '09 at 20:09
  • No reference exists, because I figured it out myself. Both tags were present, and I just tried moving the URL from one tag to the other and deleted the IISUrl tag, and it worked. It's just that if you use the IISUrl tag, it expects certain features to be present on the server that require the IIS 6 compatibility features. If you use CustomServerURL, then I imagine it uses generic features and avoids using any IIS specific features. The tags say it all, I'm just surprised this would cause a project load to fail without any kind of recovery options... just CRASH. – Triynko Sep 01 '10 at 01:12
  • I tried this, but I believe that it "works" only because Visual Studio just reverts to using the development web server, Cassini, and not IIS. If I then go into the project's properties >> Web, and try to make it use IIS again, it gives that same error about needing the IIS 6 ... Compatibility component. Can anyone confirm or dis-confirm that suspicion? – Jason Kleban Jan 25 '11 at 15:50
  • It "works" because the project opens instead of crashing Visual Studio. It also works because Visual Studio will not try to use IIS-specific features, which it cannot use with IIS 7 without the compatibility components. Modifying the project file as I suggested will in fact allow the project to open in Visual Studio 2008, on Windows Server 2008, WITHOUT IIS 6 compatibility components installed. That's all. To debug in IIS 7, guaranteed... compile the project, publish it (if necessary), attach the Visual Studio debugger to IIS 7's "w3wp.exe" process, and open the URL in your web browser. – Triynko Apr 17 '12 at 14:38
2

I ran into the same problem with a web app upgrading from VS2003 to VS2010. In the solutions file, there was a section that looked like this:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", "http://localhost/MyProject/MyProject.csproj", "{B5D94F04-9681-4391-8323-E39BE66CD0C1}"
    ProjectSection(ProjectDependencies) = postProject
    EndProjectSection
EndProject

I replaced the "http://localhost/MyProject/MyProject.csproj" with "MyProject.csproj". I also deleted the MyProject.csproj.webinfo file, because it had a reference to the same IIS virtual directory.

Once I did those two changes, the VS2010 conversion wizard seemed to work properly and my web app opened. My project was no longer dependent on IIS.

msergeant
  • 4,771
  • 3
  • 25
  • 26
1

Because one tag is saying that IIS is hosting the site, and the other is saying that a custom (other) web server is.

In the custom server, VS does not try to manage anything.

In IIS, it wants to be able to configure things like virtual directories, permissions, ASP.NET config, etc.

Judging from the error message, VS believes that your local machine is not set up with the components it needs to do that.

Roger Willcocks
  • 1,649
  • 13
  • 27
  • 1
    What web server, other than IIS, running on localhost (the same machine that Visual Studio is running on) would be hosting an "ASP.NET Web Application Project"? Yeah, that's what I thought, IIS. I agree that it seems to think IIS 6 components need to be installed, but does that mean Visual Studio 2008 is incapable of managing sites built for the version of IIS (7) made for Windows Server 2008? Anyway, Visual Studio should just point users to the IIS Management Application so they learn to use it well, rather than temporarily distract them with a h@lf-@ss3d subset of its functionality. – Triynko Jul 09 '09 at 19:28
  • MONO. Cassini. Roll your own (that's what the service end points can allow you to do). – Roger Willcocks Jul 12 '09 at 22:04
  • 1
    Screw "rolling your own". We shouldn't have to reinvent the wheel to run a simple site! We're simply trying to use IIS and run a fricking website! Simple! If we can't simply run a simple web site in IIS7 without this cornball crap with IIS 6 that's unreasonable and misleading. I had the same problem today and I think it's ridiculous that we can't open a WAP project in VS 2008 without having to install IIS 6 components. Isn't the entire purpose of IIS 7 to be "better"? I mean if we have a brand new .NET 3.5 project, why should we even have to touch IIS 6! It's not inferred and it's just weird. – PositiveGuy Aug 25 '09 at 01:38
1

I had a similar problem opening a Web Application Project that I had upgraded previously from .Net 1.1 Visual Studio 2008 prevented me from opening the project on the virtual guest server because on my host OS I have no IIS or related component installed the solution is to right click on the project name that fails to load - alternatively open the .csproj file within your filesystem - and change the UseIIS node to false

dc2009
  • 842
  • 1
  • 9
  • 7
1

Another poster posted the following:

You need to go to Control Panel, Turn Windows features on or off, expand Internet Information Services, and find check box "IIS 6 Metabase and IIS 6 configuration compatibility". This fixed issue in my case (but I'm on Windows 7)

Despite the fact that this checkbox in Windows 7 has the words 'IIS 6' in it, it doesn't seem to imply that you can't use IIS 7. In fact, the tooltip for the checkbox to enable "IIS 6 Metabase and IIS 6 configuration compatibility" says the following:

"Install IIS metabase and compatibility layer to allow metabase calls to interact with the new IIS 7 configuration store."

Seems to me this has little to do with IIS 6 and everything with configuring IIS 7 to interact with legacy applications. Besides, clicking this checkbox solved this issue for me.

GabeFC
  • 400
  • 2
  • 11
  • Whether it's a chunk of IIS 6 that interacts with IIS 7, or a old chunk of IIS 6 code running in IIS 7... the end result is that it allows legacy protocols to work. I don't want legacy protocols working. If it isn't functional purely on IIS 7, I want it to crash, so I know I have to upgrade it. – Triynko Sep 01 '10 at 01:18
0

Open the *.csproj file in notepad, and find all references to True, switch them to false.

Your project will then open. You can further edit the properties using the GUI if you so wish (port, url, etc.)

Steve Woods
  • 588
  • 4
  • 8
0

You need to go to Control Panel, Turn Windows features on or off, expand Internet Information Services, and find check box "IIS 6 Metabase and IIS 6 configuration compatibility". This fixed issue in my case (but I'm on Windows 7)

In detail here: http://msdn.microsoft.com/en-us/library/aa964620.aspx

algiecas
  • 2,108
  • 14
  • 13
  • +1 because despite the original poster's rejection of such an approach, it's a quick and practical alternative for a big shop where project configuration changes have more potential impact. – Jollymorphic Jun 03 '11 at 21:56
0

I found one simple blog post that explains a little bit about the problem, and how this particular poster solved it using basicallty the same rememdy that you offered (hacking the project file). http://dean-o.blogspot.com/2009/04/open-iis-hosted-visual-studio-project.html

MattSlay
  • 9,115
  • 5
  • 43
  • 52