views:

1614

answers:

6

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?

+4  A: 

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
I had the same problem. Your patch works great!! I wish you would give a reference to where you found this info.
MattSlay
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
A: 

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
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
MONO. Cassini. Roll your own (that's what the service end points can allow you to do).
Roger Willcocks
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.
CoffeeAddict
A: 

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
-1: he explicitly stated he wants nothing to do with IIS 6.
John Saunders
Sorry, misread it.
algiecas
+1  A: 

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
A: 

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
A: 

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.

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