c# - Invoke-Command to remote machine leads to COMException (0x80040154) -


i have c#.net application uses com.

when call application locally (machine1), com object created should.

when start application remotely machine (machine2) using

invoke-command -session $session -scriptblock {path\theapp.exe} 

the application starts (on machine1 of course) fails bind com object:

 system.runtime.interopservices.comexception (0x80040154): retrieving com class factory component clsid {c4dbe1c1-0608-48df-ad9d-f34284fe7040} failed due following error: 80040154 class not registered (exception hresult: 0x80040154 (regdb_e_classnotreg)).    @ system.runtimetypehandle.createinstance(runtimetype type, boolean publiconly, boolean nocheck, boolean& canbecached, runtimemethodhandleinternal& ctor, boolean& bneedsecuritycheck)    @ system.runtimetype.createinstanceslow(boolean publiconly, boolean skipcheckthis, boolean fillcache, stackcrawlmark& stackmark)    @ system.runtimetype.createinstancedefaultctor(boolean publiconly, boolean skipcheckthis, boolean fillcache, stackcrawlmark& stackmark)    @ system.activator.createinstance(type type, boolean nonpublic)    @ system.activator.createinstance(type type) 

i not understand how possible -- since com connection works if execution started locally, why runtime find out later class not registered?

thanks hints , pointers!

problem solved.

reason (1) mismatch of debug/release versions of components , (2) component not run service wehen should have.

thanks reading , posting!


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -