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

    Domanda

  • 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.

    mercoledì 22 agosto 2012 09:24

Risposte

Tutte le risposte

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

    martedì 28 agosto 2012 21:05
  • Sorry, I forgot to mention it was a web application, so the user is te "IUSR".
    mercoledì 29 agosto 2012 08:46
  • Does it work if you run under an administrative account?
    mercoledì 29 agosto 2012 21:31
  • No, same behaviour...
    giovedì 30 agosto 2012 09:27
  • A Process Monitor trace would probably be useful in tracking down why this problem is occurring.
    martedì 4 settembre 2012 15:03
  • 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.

    sabato 24 novembre 2012 01:39