开发者

COM Interop issue in IIS - object creation failing

开发者 https://www.devze.com 2023-03-10 01:47 出处:网络
I am consuming an activex/com object (generated by Unify Vision application) in one of my asp.net application. I am getting the following error.

I am consuming an activex/com object (generated by Unify Vision application) in one of my asp.net application. I am getting the following error.

System.InvalidCastException: Creating an instance of the COM component with CLSID {9C2D0002-3A17-11E0-8000-FC9865BE5C68} from the IClassFactory failed due to the following error: 80004002.

I tried the following approaches

  1. I tried to consume the activex/com object in console application. There I am able to create the object and got the result (though the app is hanging after that)

  2. If I run the asp.net app in visual studio with built in web server (casino) and file system as the option(without deploying it to IIS) , it's working.

  3. But when I deploy it to IIS,it's failing. Even I tried impersonation , registry permissions and gave aspne开发者_运维技巧t account/iis launcher account the admin privileges. But no use. I tried unistalling and reinstalling of the activex/com object but nothing is working.

I am currently running out of ideas. Please help.

Thanks, sveerap


Your COM component may require an STA thread to run on. Try starting up an STA thread and running the code on there. Just to test.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号