I have a application written in ASP.NET which uses DllImport to reference a dll written in Delphi. On my Windows 7 dev machine using the asp.net Development Server accessing the ddl works as expected.
However on a Windows Server 2008 Production Server running IIS 7 the dll return the error "Page cannot be found" and the following error pops into the Application log:
Faulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e023cf, faulting
module ntdll.dll, version 6.0.6002.18005, time stamp 0x49e03821, exception code
0xc0000374, fault offset 0x000afaf8, process id 0xab8, application start time
0x01cc6947b1bb081b.
How to solve this or how can I find a deeper cause?
“Faulting module name” refers to the component that causes the crash.
“An Internet Information Services (IIS) worker process is a Windows process (w3wp.exe) which runs web applications, and is responsible for handling requests sent to a web Server for a specific application pool.”
At the command prompt type “taskkill /IM w3wp.exe /F”. Press Enter.
Open Visual Studio in Administrator Mode, then Debug -> attach to process -> tick the check box "Show processes from all user", select w3wp.exe.
Just a hunch but you could try enabling 32bit worker process. It's more compatible that 64bit and might help. Is your local server 32bit?
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true
Failing that this might help debug the issue.
Troubleshooting IIS7 Worker Thread Crashes (w3wp.exe) with a Faulting Module of ntdll.dll
There's also a thread here with an identical issue. They suggest that adding a reference to kernel32.dll
resolved the issue.
Calling unmanaged code from ASP.NET in IIS7
Update
Some people report that copying your dependencies to Windows\System32\Inetsrv
resolves the issue. It's worth a try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With