System.Runtime.InteropServices.ComException Loading ASP.NET Web Application in Visual Studio 2008

Another day, another fun error message.  Thanks to all the fun I’ve been having with – I’ve given up and created a new virtual machine with XP Pro to run Visual Studio in.   So I grab the latest revision from source control and load the solution in Visual Studio.  Boom.  Sytem.Runtime.InteropServices.ComException.  That’s it. No more details.  This is one of those errors where it could be just about anything.  A gives way too many results.

So I’m going to add one more search result on this error message.  After much muckery – I’ve resolved my instance of the problem.  The background is simple.  I have an ASP.NET web application with a few DLL projects and a deployment project.  As stated, I’ve created a new install of Windows XP.  First ensure that you have the add-on installed.  That can also cause this error (in some cases).

The key thing in this case was the lack of IIS on the machine.  On my primary development machine (the one where Oracle is a massive pain) I do have IIS installed, and the last time I ran this project from that machine – Oracle was working OK with the data access hack.  But apparently something has changed on that box and now I’m getting the evil "Oracle client and networking components were not found." error.  So I gave up.

First obvious work around is to install IIS.  I’m sick of messing around today, and just want to work.  So the quicker solution is to enable the built in development web server.  This can be accomplished by right clicking the unloaded project in the Visual Studio solution explorer and choosing "Edit <projectname.whateverlanguateyouuseproj>".  This will bring up the XML view of the project.  Find the ProjectExtensions section of the config and change UseIIS to be False.  Setting this up could also prevent problems when you have a larger, or more dynamic team accessing the project.

Page 1 of 3 | Next page