locked
Unable to load DLL RRS feed

  • Question

  • Unable to load DLL '..\ACR120U.DLL': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Try To Open Like This

    [DllImport("ACR120U.DLL")]
        public static extern int ACR120_Open(int ReaderPort);

    This Method on Local Host Working Fine. When Host To Webserver Then Throws This Error 


    ASP.NET

    Thursday, January 9, 2014 10:06 AM

Answers

  • Can you run the client from the Web Server?  This may help isolate the issue. Getting the StackTrace may provide additional error info.  You also may want to check the Control Panel : Administrative Tools : Event viewer on both the client and server to see if there are any useful errors around the time of the probelm.  Sometimes I have to use a sniffer like wireshark or fiddler to learn more informatioin about the failure.  

    jdweng

    Thursday, January 9, 2014 11:04 AM

All replies

  • First, don't assume the code is working properly on the Local Host.   Any error that starts with 0x8 is an invalid access to memory or a file.  It can be an invalid pointer to a memory location outside the bounds of your program, or an access to a file that doesn't exist or you don't have permission to access.  There are hundreds of reasons for this error.  Here a some basic categories of these type issues.

    1)  There is a different version of Net library on the two PCs.  Did you install the code on the server or just copy the executable.  If the two PCs have diffferent versions of Net you need to publixh application and install using setup.exe

    2) Do you have windows 7 on webserver?  The permisions my not bve set properly to run code

    3)  The webserver may have settings in correct to pass network credentials.  For a user to access files on a remote PC the logon credentials havve to rcognized by the server.

    4) Are the PC using the same type microprocessor.  One process may be x32 and the other x64.  You may need to compile in x86 compatiable mode.

    5) Does the code work if you recompile on the Server?

    6) Do the files use or create any other files?  The path of dependency files may be different on the client and host PC.

    7) The parameter list may not have the correct sizes for some parameters or all parameters or a parameter pased by referrence may not of been setup properly.

    Thursday, January 9, 2014 10:49 AM
  • Hi Joel Engineer

    Thanks For Ur Reply. When i Use This on Local Host It' Working And Also Working on IIS

    But Host on Web server Then Throws The Error.  


    ASP.NET

    Thursday, January 9, 2014 10:53 AM
  • Can you run the client from the Web Server?  This may help isolate the issue. Getting the StackTrace may provide additional error info.  You also may want to check the Control Panel : Administrative Tools : Event viewer on both the client and server to see if there are any useful errors around the time of the probelm.  Sometimes I have to use a sniffer like wireshark or fiddler to learn more informatioin about the failure.  

    jdweng

    Thursday, January 9, 2014 11:04 AM