0

I have a windows service which tries to open a exe (COM component). The service is installed on Windows Server 2016. When the service tries to open the application, it is giving an error

"Cannot create ActiveX component"

. The opening of application is done by below line.

Interaction.CreateObject("Application.NewInstance")

I assume that service doesn't have permissions to open the application and that is why it is throwing an error. The same thing happened, when a web api is unable to open the application, it gave the same error. Then I gave permissions as below :

Go to "C:\Windows\SysWOW64\config\systemprofile" , give pull permissions to IIS APPPOOL\DefaultAppPool user to AppData folder.

Since this is a Windows service, for what username (similar to IIS username) should I give permissions?

halfer
  • 19,824
  • 17
  • 99
  • 186
CrazyCoder
  • 2,194
  • 10
  • 44
  • 91
  • https://stackoverflow.com/questions/5307968/how-can-i-run-an-exe-program-from-a-windows-service-using-c – Ben Jan 20 '20 at 13:52
  • Check this out. https://stackoverflow.com/questions/2532769/how-to-start-a-process-as-administrator-mode-in-c-sharp – LinkedListT Jan 20 '20 at 14:42

0 Answers0