EBDN - Community - Question & Answers

  Saturday, 16 April 2022
  1 Replies
  804 Visits
0
Votes
Undo
Hello. I need to start a custom Eb assistant inside WCF service hosted in IIS. The case is some client calls the service and pass as json parameter some drawings info which should be updated in EB. I have implemented all my update functionality in the assistant and I just want to start it from c# application adding the json as automation parameter then it's being read by the assistant which performs requested update. It works perfectly when the assistant is started from some console test application for example, but when I create Aucotec.EngineeringBase.Interop.Application instance inside the web service I get exception:

" Retrieving the COM class factory for component with CLSID {101E3ABD-E1D8-11D2-B72E-00805F52B443} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). "

If I remember right I have read it's impossible to create EB instance from different user than the one who's currently using the active EB application. My WCF service is hosted on IIS so actually it tries to create Interop.Application instance from code as "DefaulAppPool" user account. The exception occurs regardless if EB is currently open or not. I hope there's some way to run my assistant from my service or maybe some user permission for DefaultAppPool should be set in EB. Any ideas and solutions are welcome.