SQL Server 2005: "Unable to cast COM object..."

If you get this:
Microsoft SQL Server Management Studio
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). (Microsoft.VisualStudio.OLE.Interop)

Run this:
regsvr32 c:\windows\system32\actxprxy.dll

7 comments:

Anonymous said...

Thanks...solved my issue.

HeroicLife said...

If you are running a 64-bit OS, you will need to register the dll, but under C:\Windows\SysWOW64!

TomDeleu said...

Aha, Old post I know. But I stumbled onto it in Google, and it resolved my issue immediatly! Thanks!

Alan said...

Don't forget to run the command prompt as Administrator ...

Dhruvin said...

Thanks a bunch man,

You solved my problem. Thanks thanks a bunch. :)

Anonymous said...

Thanks! this helped solved my problem!

Anonymous said...

Well I have the same issue: SSMS won't open any folder such as databases, security without this error: "Unable to cast COM object of type 'System.__ComObject' ...for the interface with
IID '{6D5140C1-7436-11CE-8034-00AA006009FA}'" I've tried everything and Management Studio just won't work. This happened (used to work) after adding .NET version 1.1, which another application had to have. I believe that messed with existing .NET 2.0 version, which is necessary for MSSQL 2008. Now I have a local instance of MSSQL 2008 running on my Windows 7 laptop, but no client utilities to connect to it, nor any remote server. All registry hacks found on i-net don't help.