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



