Visual Studio Runtime Interop Exception

Recently I was working on a Project in Visual Studio 2008 that has some Web Services in it. Every time I opened the project I would get the error:

System.Runtime.InteropServices.COMException

According to a blog post by Marocanu2001, he was receiving this error because he did not have IIS installed.  However in my case this was not the issue. In my case it was because I was running Visual Studio in limited user mode, and not as an administrator. Without Administration rights, when Visual Studio tries to configure the web services in IIS it will throw this exception.

The solution in short:

  • Make sure IIS is installed on your machine

Make sure Visual Studio is run in Administrative mode. (Right-click “Run as Administrator”)

 

Hope this works for you as well. Happy coding!

Related posts: