Reputation: 2637
Hi this is the total workflow of this project
we have a application which is written in cobol, wee can communicate to that application using only a C DLL
, the method which we have to call in the dll
is given below
[DllImport(@"C:\CCExpert\haz450cp.dll", EntryPoint = "HAZ450CP", CallingConvention = CallingConvention.Cdecl)]
unsafe public static extern void HAZ450CP(ref p45_control p45_controlx, out p45_clreturn p45_clreturnx, ref p45_clclaim p45_clclaimx);
what we did is we are invoking that C dll
from a C# DLL
, this C# dll
working fine with console application, it means we can give the input to it and we are getting proper output also from console application.
But when i try to call the same C#DLL
from the ASP.NET WebService
its giving error
Thanks
Upvotes: 0
Views: 1388
Reputation: 1008
I know this might sound a little stupid, but can your asp.net user read contents from the directory where the DLL is located?
You can do this test by copying you DLL to the bin directory of your web application folder and changing the DLL path from C:\CCExpert\haz450cp.DLL to just haz450cp.DLL
Upvotes: 1