COM interop object throws InvalidCastException in one project but not in other

后端 未结 2 1324
一生所求
一生所求 2021-01-07 02:11

I have a COM object I imported in my test C# solution. Everything works fine and continues to do so.

Then I imported the same COM object in my actual solution and as

2条回答
  •  耶瑟儿~
    2021-01-07 02:46

    Since your COM component is working in a WinForm app but not in ASP.NET I'm thinking that you may be hitting some permission issues. Can you temporarily elevate the permissions that ASP.NET is running under (e.g. Administrator) and see if you can execute the component?

提交回复
热议问题