c# - Calling C++ DLLs from ASP.NET 4 -


I am trying to call C + + DLL from ASP.NET 4.0 web application but a DLL import Receiving error - Unable to load Library 'Library Name' .

I have read a lot of blogs, where developers experience the same problem and what most people think of working for unmanaged DLLs for the PATH environment variable

I did this on the server and double, triple checked that I left the path correctly and in C ++ DLLs that folder, but when I see the application in the browser So I still get the same error I have entered the code and it is definitely coming from the part of the code which calls the unmanaged DLL.

  • IIS 6.0
  • .NET Framework 4.0
  • ASP. Net MVC 4.0
  • C #

    This works on the Dev Machine if I mimic unmanageable DL C: \ Program Files \ IIS Express

    Tried to copy C ++ DLL to bin folder, but as far as I understand ASP.NET, in the Inetpub \ wwwroot \ sitename \ bin copies the DLL from bin folder to a dynamic location when this code But unmanaged DLLs are not included in this process. What can I try on any other advice?

    Edit:

    The terms of the code, it is the same as any other interop code, I have a cover class where I have all the necessary functions I use DllImport to define the call and in my code I create a new example of the wrapper and call the required function. Unless the C ++ DLL is the iSExpress folder, but as long as I'm posted on the server, it throws the above error:

      [DllImport ("My3rdparty.dll", Calling Convention = Calling Convention. CDEcl)] Private static extern int myfunction (integer handle, int * response, int timer); After weeks of conflict I came with a job. The unity that I was implementing was for credit card processing. They also have a compiled configuration file called System DNA with C + + DLL and I suspect that when you add a folder containing the interop DLL in the Path Enterprise Variable, this system does not raise the .dna file.  

    As a workaround I created a WCF service which is installed as a Windows service on the server and I have argued to pay in this service and the web application only talks to the service I hope this is the other developers who are facing the same problem

  • Comments

    Popular posts from this blog

    ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

    Matlab transpose a table vector -

    c# - Textbox not clickable but editable -