Visual Studio 2008 – ASP.NET “System.Runtime.InteropServices.COMException”
The Issue
When openning an existing ASP.NET project for the first time in Visual Studio 2008 it returns the error “System.Runtime.InteropServices.COMException” without any HRESULT code. The problem I experienced was specificly on a Windows 7 machine, but the same solutions should work on Vista as well.
1.Administrator – Visual Studio has to be “run as administrator” to acccess IIS applications, in Windows Vista and Windows 7. This is true even if you are logged into the computer as an Administrator. To run as an administrator, right click the Visual Studio shortcut and select “Run as Administrator”
You can also setup Visual Studio to always run as Administrator
- Right click the Visual Studio shortcut.
- Select properties
- Click the advanced button
- Check “Run as Administrator”.
- Click OK
2.只需要打开项目配置文件*.csproj,将<UseIIS>True</UseIIS> 改为 False,然后可以正常加载项目,接着重新配置为正常的IIS