I used DLLImport[absolute path of the C++ dll] in my asp.net C# code to call a method that is inside a C++ dll. And that works perfectly.
I then published the website on IIS and it says it cannot load the dll.
Can you please suggest how to resolve this issue?
I use a Native LoadLibrary to load the DLL from a specific location. The below URL talks about how this can be done.
I am assuming you have the right permission set’s available to work with unmanaged code, you use something on the lines of:
Where Label1 is :
Next thing is to check the bitness of you asp.net environment to ensure it matches you .dll… as x86 DLL cannot be loaded via a x64 environment.
How to call C++ DLL from ASP.NET (C#) code?
http://msdn.microsoft.com/en-us/library/ms684175