I'm calling unmanaged dll in my web applicatrion and its works fine but if I run the web application in IIS its crashes when calling dll function. I cant catch the exception there its only ie error message "page cannot be displayed" and in event viewer there is an error:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8 Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58 Exception code: 0x4000001f Fault offset: 0x000ce625 Faulting process id: 0x2084 Faulting application start time: 0x01cc9eb290740fe8 Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: e0fc374f-0aa5-11e1-88bd-00224d5137ef
IIS settings: Enable 32-bit applications: True Managed Pipeline Mode: Integraded Identity: LocalSerice (tried every option)
I'm working on Windows 7 and C# VS2010 Framework 4.0
try this,
wrap the function call with
try {
// Call your delphi dll function here
} catch {
Console.WriteLine("error");
}
Now set a breakpoint on the Console.WriteLine
part.
Debug your application by making the Visual Studio to run the application through IIS (not the VS development webserver).
When you have hit your breakpoint inside the catch block, goto the Watch Window
and check what is stored in the $exception
variable.
This could give you more clues.
User contributions licensed under CC BY-SA 3.0