Re: Calling unmanaged code from ASP.NET in IIS7
- From: "Trevor Benedict" <trevornews@xxxxxxxxx>
- Date: Tue, 25 Aug 2009 09:29:42 -0700
Did you restart IIS after making changes to the security settings.
Without the actual DLL, I'm running short of ideas. You may want to ask in
the ASP.NET forum too to see if anyone there has ideas.
Regards,
Trevor Benedict
"Colin426" <Colin426@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:48B02686-AE18-4AF6-95FF-26478E364A9B@xxxxxxxxxxxxxxxx
Hi Trevor
Thankyou for your reply.
It works on my dev box if I run the website through Visual Studio using
Visual Studio's internal webserver. When I publish it to IIS 7 on the
same
dev box, it doesn't work and all I get is the event log error in my first
post and a popup saying "IIS Worker Process stopped and was closed". I
assume any dependencies would still be available as I'm still on the same
box, so I guess it must be a permissions thing. I've set the anonymous
authentication on the site to be a domain administrator account, but this
has
not helped.
Strange thing is if I try to reference a system dll, such as kernel32.dll
or
advapi32.dll, that works fine.
Any further help would be greatly appreciated!
Col.
"Trevor Benedict" wrote:
Since it works in your DEV box, I would assume there is nothing wrong
with
the DLL for now.
With this assumpion, the first thing I would check is security in the
2008
box.
1. Make sure all the dependencies for the Delphi DLL are present in the
2008
box.
2 .I use a combination of tools from SysInternals (like FileMon etc) to
see
if there are any issues reading files. Check permissions etc and see if
that
resolves the issues.
Let us know if you find anything or any errors you might have envountered
in
this process.
Do you have anything in the EventLog etc.
Regards,
Trevor Benedict
"Colin426" <Colin426@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3D8C8F50-D688-4600-8E55-2BC689110418@xxxxxxxxxxxxxxxx
I have a website written in ASP.NET which uses DllImport to reference a
dll
written in Delphi. On a server running IIS 6 this has been working
without
issue, but now I need to move this website to Windows 2008 and IIS 7.
Under
this environment, webpages that reference the unmanaged dll return the
error
"Page cannot be found" and this error pops into the Application log
when
the
dll is accessed:
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
0xda0, application start time 0x01ca2273cadd227e.
I try this same website on my Vista dev machine using the ASP.NET
Development Server and the website works as expected and accesses the
dll
without issue. I then publish this website to IIS 7 on my Vista dev
machine
and I get the error above again. I've tried calling the dll from and
standard dotnet app on the Windows 2008 machine and it works fine, so
seems
to be an issue in that a ASP.NET website hosted by IIS 7 cannot
reference
unmanged dll's. However, in testing I've found that if my ASP.NET
website
references kernel32.dll, that works fine on IIS 7. The Application
Pool
is
running in Classic mode and I've looked around for any setting that
might
help but with no success.
Any help would be appreciated.
.
- References:
- Calling unmanaged code from ASP.NET in IIS7
- From: Colin426
- Re: Calling unmanaged code from ASP.NET in IIS7
- From: Trevor Benedict
- Re: Calling unmanaged code from ASP.NET in IIS7
- From: Colin426
- Calling unmanaged code from ASP.NET in IIS7
- Prev by Date: Re: increasing web service responsiveness
- Next by Date: IIS 6 Directory browsing not working like it should...?
- Previous by thread: Re: Calling unmanaged code from ASP.NET in IIS7
- Next by thread: increasing web service responsiveness
- Index(es):
Relevant Pages
|