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:
- Make sure you have IIS installed – This sounds silly, but since I had just rebuilt my box, I had forgotten to turn it on
- 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…
- 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.
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.
Thanks a lot. it solved my issue.
It’s amazing how many problems can be solved by selecting “Run as administrator…” Thanks.