none
Javascript Launched C# ActiveX Assembly Gets System.DllNotFoundException: Unable to load - 0x80070005 (E_ACCESSDENIED) When Making Call to DLL RRS feed

  • Question

  • Hi,

    I have created a C# ActiveX server which is started from Javascript running on a web page. The C# library displays a form and when the user clicks a button on the form, the C# library calls a DLL. When the DLL is called, the following exception occurs:


    ************** Exception Text **************

    System.DllNotFoundException: Unable to load DLL 'RivetzDemoWsyLibrary': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Notes:

    * The resulting .DLL was registered for COM using regasm.exe DLL_PATH_AND_NAME /codebase /tlb and seems to be called without any issues from the Javascript running in Internet Exploroer.

    * Using Visual Studio 2012 Professional.

    * Running local server IIS Express.

    * Running under my user account which has admin privileges.

    * Error occurs regardless of running from Visual Studio debug web server hosting or if IIS Express is started and Internet Explorer is used to navigate to the http:\\localhost URL.

    * The DLLs can be accessed without issue if I change the C# control library to an application (exe) and run it as a standalone application.

    Can anyone please provide any background on the issue and what to look for to solve this problem?


    Thank you very much.

    AJV 

    Wednesday, August 20, 2014 2:36 PM

All replies

  • Hi Ajv,

    Make sure you have adjusted IE ActiveX settings correct. Please refer to the following link to see more information. http://windows.microsoft.com/en-HK/windows/help/genuine/ie-activex.

    If you app doesn’t work again, try this steps from http://www.codeproject.com/Articles/24089/Create-ActiveX-in-NET-Step-by-Step.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 21, 2014 2:42 AM
    Moderator
  • Hi.

    Thank you very much for the help and the information. The IE security settings are correct and align with the suggested settings in the link you provided. I am actually able to create an ActiveX control and successfully call it from javascript. The ACCESS_DENIED issue occurs wen the ActiveX control tries to call functions of a helper DLL (which call a Windows Service).

    I suspect the error is due to the fact that ActiveX controls running in IE are not supposed to be calling services, opening files, communicating across processes, etc. for security purposes.

    Is there any documentation you can point me to that explains some of IE's security architecture as well as what IE-based ActiveX controls are permitted to do or not do - or if there is someway of building trusted DLLs that Windows will allow to be called when running under IE (i.e. getting the helper DLLs being called by the IE-based ActiveX component certified and signed by Microsoft) ?

    Thank you again.

    AJV

     

    Thursday, August 21, 2014 10:14 PM
  • Hello,

    It seems that your issue is more related with IE development, it is better to post issues regarding IE to:

    http://social.technet.microsoft.com/Forums/ie/en-US/home?category=internetexplorer

    Friday, August 29, 2014 10:02 AM