Unable to cast COM object of type 'WMSServerLib.WMSServerClass' to interface type 'WMSServerLib.IWMSServer'

Answered Unable to cast COM object of type 'WMSServerLib.WMSServerClass' to interface type 'WMSServerLib.IWMSServer'

  • Wednesday, August 22, 2012 9:24 AM
     
      Has Code

    Hi,

    I have a program running in windows 2003 and windows media services.

    Now I need to migrate this program to windows web server 2008 R2 64 bits.

    I make it work on a virtual machine with windows server 2008 R2 Standard 64 bits, but now i'm trying to do the same on the web server and doesn't work.

    When i create the server object with this code:

    WMSServer server = new WMSServer()

    All the properties of "server" have this error message:

    "Unable to cast COM object of type 'WMSServerLib.WMSServerClass' to interface type 'WMSServerLib.IWMSServer'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{845FB958-4279-11D2-BF23-00805FBE84A6}' failed due to the following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

    Set permissions on dcomcnfg even for "everyone" user, but nothing.

    Is there a difference between web server 2008 and 2008 standard?

    Thanks.

All Replies

  • Tuesday, August 28, 2012 9:05 PM
    Owner
     
     

    Did you just copy the binary over or install it?  Also, what level of user account are you running the application under?

  • Wednesday, August 29, 2012 8:46 AM
     
     
    Sorry, I forgot to mention it was a web application, so the user is te "IUSR".
  • Wednesday, August 29, 2012 9:31 PM
    Owner
     
     
    Does it work if you run under an administrative account?
  • Thursday, August 30, 2012 9:27 AM
     
     
    No, same behaviour...
  • Tuesday, September 04, 2012 3:03 PM
    Owner
     
     Answered
    A Process Monitor trace would probably be useful in tracking down why this problem is occurring.
  • Saturday, November 24, 2012 1:39 AM
     
     

    We experienced this very thing.  As it turns out, you can install the role on a 2008 R2 64-bit server but not all of its functions were probably ever tested specifcally API access.  I continuously got this error until I watched with Sysinternals tools to see that when new WMServer() was called it was looking in SYSWOW64\Windows Media instead of System32\Windows Media for the appropriate supporting files.  I ended up copying the entire System32\Windows Media folder to SysWow64\Windows Media and my API magically started working.  This could be an issue down the road if the bits are ever patched, you would need to manually keep the folders in sync (if) until MS fixes the path issue.  Seems like this was never intended to be 64-bit specifically.