VS2005 IIS Binding Can be removed

In Visual Studio 2005 SP1, the new “web-application” project type was introduced. This project type allowed us to have a csproj for the website project and suddenly we were in control of the content of a project and integrating it into an automated build process became simple.

However the best reason for wanting to ditch the old school website project in favour of the web-application project was not needing to bind the project to an IIS website. With an ASP.NET website project, the website project itself needs to be bound to a corresponding website under IIS, which is a real PITA, particularly when you don’t have the necessary environment set up.

So with VS2005 SP1 and web-application projects, all these problems are a thing of the past, right? Wrong, it seems.

I was opening one of our projects written by a contractor and it looks like he’s somehow managed to re-introduce project-website binding in a web-application project. Don’t know how, but whenever the project is opened, if it couldn’t connect to the project’s website running on localhost, it would throw a COM Interop Exception.

Simple solution - remove IIS website binding. It’s unnecessary and provides no benefit if your deployment process is handled outside Visual Studio. Open up the .csproj file, and remove the <ProjectExtensions> element and its children.

Problem solved.


Related posts:

  1. XBAP Is Cached When Running Without Debugger I'm digging deeper into WPF and learning more about XAML,...
  2. 10 Must Know Visual Studio Shortcuts Found this article on DNK consisting of shortcuts for Visual...
  3. Some LINQ and WPF Basics This evening I wanted to get back to my old...
  4. MissingMethodException: ? Sometimes though when you're changing interfaces across several projects, you...
  5. Converting an ASP.NET Website to Web-Application I've had to do this so many times in the...

Leave a Reply


The Tomes Of Experience - powered by WordPress (themed by selder) 0.919 seconds.
16:37:23 06-01-2009