≡ Menu

System.Runtime.InteropServices.COMException when opening an ASP.NET Project

This morning I was opening an ASP.NET project on my Win7 box in Visual Studio 2008, when a message popped up which only said:

System.Runtime.InteropServices.COMException

If you run into this, there are three things you need to do:

  1. Make sure you have IIS installed – This sounds silly, but since I had just rebuilt my box, I had forgotten to turn it on
  2. Make sure you are running VS as Administrator – if you haven’t mapped the ASP.NET Project to an IIS location, then Visual Studio will need Administrator privileges to modify the IIS metabase. Speaking of the IIS Metabase…
  3. Make sure you have “IIS Metabase and IIS6 Configuration Compatability” turned on – See Robert Boedigheimer’s article which was oh-so-handy.

There’s also a Microsoft Connect Bug that has already been filed and says it will be fixed in an upcoming service pack.

Comments on this entry are closed.

  • Reino Boonstra February 6, 2010, 8:53 am

    Thanks a lot. This solution worked out great for me. I indeed had some projects in my solution that required iis in order to run.
    Thinking of using visual studio’s built in web server, this makes the solution more portable.

  • Sudahkar August 16, 2012, 11:06 am

    Thanks a lot. it solved my issue.

  • Michael Sullivan December 19, 2012, 4:38 pm

    It’s amazing how many problems can be solved by selecting “Run as administrator…” Thanks.

Next post:

Previous post: