Nelson Correia

.NET Thinking Machine

My Links

News

Search



Blog Stats

Archives

Post Categories

.NET

Links

Login
    u:
    p:
    Remember Me:
     

Visual Studio 2008 COMException when loading a web project from source control

Today I had an issue loading a web project from source control: when I open the solution file, I get an error about a System.Runtime.InteropServices.COMException:

COMException1

And when I try to reload the project:

COMException2

These errors occured somewhere in the communication between Visual Studio and IIS (By the way, I'm using Visual Studio 2008 and IIS 7, in a Windows Vista machine).

I could remove this error by simply editing the .csproj file, specifying that I don't want to use IIS:

<Project ...>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{...}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
...

But although on this machine I optionally could not use IIS, in my other development machine, I want to use it.

This error was occuring because I don't have the website configured on this machine. This is most likely to occur when we are first downloading a source controlled web project and don't have IIS configured yet.
So, I've configured IIS for having the URL specified in the .csproj pointing to my project directory. And now, everything should work ok!

Wrong! I get the same error...
Apparently I have to run VS2008 with administrative privileges for it to access IIS metadata. I don't like it, but at least until find a better solution, everything works as expected! :)

posted on Monday, February 18, 2008 10:05 PM

Feedback

# re: Visual Studio 2008 COMException when loading a web project from source control 2/19/2008 12:29 AM Joao Cardoso [MVP]

Não é o IIS que tens de correr em Administrator mode. É o VS.NET. Tive este problema também ao converter projectos asp.net de versões antigas para o VS2008. Ao acabar de converter e ao tentar-se ligar ao IIS7 dava esse erro. Isto tanto quanto sei só acontece no Vista. Não testei o VS2008 no XP.

# re: Visual Studio 2008 COMException when loading a web project from source control 2/19/2008 1:10 AM Nelson Correia

Exactamente! Erro meu no post, já corrigi.

Obrigado! :)

# re: Visual Studio 2008 COMException when loading a web project from source control 3/25/2008 1:41 AM Sónia Moreira

Nelson,

No meu caso a solução foi instalar o IIS 6.0 Metabase Compatibility.

Consulta este link http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-70/

Title  
Name  
Url
Box Code
Protected by FormShield
Comments