Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade IIS 6 web app, so it opens in visual studio on machine running IIS 7

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?

like image 796
Triynko Avatar asked Jul 08 '09 22:07

Triynko


People also ask

How do I enable IIS Express in Visual Studio?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL.

When Visual Studio creates a web project which is the port used for the Web server?

The publishUrl port is set to port 8172, which is the default for Web Deploy. The destinationAppUrl port is set to port 80, which is the default for IIS. If, in later steps, you are unable to connect to the remote host from Visual Studio using the host name, test the server's IP address in place of the host name.


5 Answers

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.

like image 117
Triynko Avatar answered Nov 09 '22 05:11

Triynko


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.

like image 20
msergeant Avatar answered Nov 09 '22 05:11

msergeant


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.

like image 1
Roger Willcocks Avatar answered Nov 09 '22 04:11

Roger Willcocks


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

like image 1
dc2009 Avatar answered Nov 09 '22 03:11

dc2009


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.

like image 1
GabeFC Avatar answered Nov 09 '22 03:11

GabeFC