Re: Calling unmanaged code from ASP.NET in IIS7

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.





.



Relevant Pages

  • Re: Calling unmanaged code from ASP.NET in IIS7
    ... It works on my dev box if I run the website through Visual Studio using ... post and a popup saying "IIS Worker Process stopped and was closed". ... the DLL for now. ...
    (microsoft.public.inetserver.iis)
  • Re: VS.NET Q: where to put common DLLs in a multi project solution, web vs. web application Q
    ... all it does is make an additional project file for the code behind files (which are built into a dll, the ide then has hide the source files from the aspnet compiler). ... all dlls not in the gac or the framework folder must be copied to the bin folder. ... vs will this copy for you if the web site or web application project has a reference to the dll or class project. ... msbuild supports website solutions, and deployment projects, so you can do commandline builds of the site and have a deployment folder built. ...
    (microsoft.public.dotnet.framework.aspnet)
  • trying to write script to add application mappings in IIS5 / 5.1, but not doing well, help.
    ... - Map .asp to the ASP.NET DLL instead of the ASP DLL ... By searching with Google groups I found reference to an adsutil.vbs IIS ... %1 is the website or virtual root. ... mapping for the extension entered as %2 by my batch file. ...
    (microsoft.public.inetserver.iis)
  • Many, many thanks
    ... Assuming that you instantiate the object in the dll on a .asp page, ... if you want to keep a dll loaded in IIS you have a couple ... my ole server dll was exposed. ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... we will be introducing the ability to configure IIS to run under ... and under the 32bit command line no error is thrown. ... the problem must be to do with how the dll is registered. ... > You should be able to reproduce your situation outside of ASP by creating ...
    (microsoft.public.inetserver.iis)