Re: IIS-bug - CGI-applikation terminates when loading standard DLL

From: Erik Knudsen (erikk_at_c2i.net)
Date: 07/01/04


Date: Thu, 01 Jul 2004 15:59:27 +0200

Johan van Zyl wrote:

> I'm not a CGI developer, more of a Microsoft one, but are currently trouble
> shooting an issue that we are experiencing with a new Perl application that
> we've purchased which are running on an win2k3 IIS 6.0 server.
>
> Scenario:
> - User logs into maintenance application via a web page, and a form are
> displayed to capture details regarding the request.
> - Some of the data on the form are pulled from a MS SQL 2000 server via an
> ODBC connection, therefore it is using odbc32.dll
> - web site makes use of a frameset
>
> During testing the application behaved fine with no issues, but when it was
> deployed into production on a Quad Processor box with 8 GB of RAM the "CGI
> application misbehaved" message started appearing randomly within minutes of
> going life. Hit refresh and the page will load fine second time round.
>
> Going back to the test environment we configured some macro software to
> emulate 15- 20 users logging on within seconds of one another (from a
> workstation, not on the web server). Well, at least 2-3 out of every 15
> page loads displayed the error message! Refresh would then load the page
> fine.

Yes, this sounds like the same problem. I have found lots and lots of
similar problem descriptions on the net, but no one seems to have
bothered digging all the way to the bottom of this issue before.

We raised an issue with MS tech support people the other day. They have
now reproduced the problem with the source files etc. I provided, and
they are working to find the root cause. However, they have come up with
a possible work around - setting the CGI's to run as System, so they are
not executed with the CreateProcessAsUser() API call by IIS anymore.
However, this has security implications - but some may want to try this
work around while the MS engineers are working on this, especially for
intranet apps, or just for some of the CGI apps or directories.

Here is a description of how to set the metabase property which control
this aspect of process creation:

Start a console window, navigate to c:\inetpub\adminscripts or where
ever you have installed IIS, and run the command:

---
cscript adsutil.vbs set /W3SVC/1/ROOT/bin/CreateProcessAsUser "False"
---
...if you are using the default web site, and the CGI lives in "bin". If 
not, check out:
----
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_createprocessasuser.asp
----
...for a description of the CreateProcessAsUser metabase property and 
adjust the string according to your setup.
If the command is successful, it will tell you it updated the setting, 
otherwise display an error. You can check the current setting with this 
command, if you wish:
---
cscript adsutil.vbs get /W3SVC/1/ROOT/bin/CreateProcessAsUser
---
Again, change the property path according to your IIS setup.
I intend to update this thread when the issue is resolved, but if I 
forget it, feel free to email me in a week or so:-)
Regards,
Erik Knudsen


Relevant Pages

  • Re: HDD driver low memory condition
    ... the newsgroups are staffed weekdays by Microsoft Support professionals to ... be typed in a command prompt. ... To your IIS settings issue, do you have the IIS matabase backup file? ... newsgroups so that they can be resolved in an efficient and timely manner. ...
    (microsoft.public.windows.server.sbs)
  • Re: iis6 w3wp.exe thread count gets high and wp becomes sluggish
    ... objects which do not have the right apartment model and threading ... IIS is a high performance web server ... I have a website that has 6 app pools. ... *** In order for this command to work properly, ...
    (microsoft.public.inetserver.iis)
  • Re: where is it hiding?
    ... processed without the filter loaded. ... The messages that you see in the UrlScan log are just there to indicate when ... Assuming that a filter is properly installed, it is possible for IIS to fail ... fail to load the filter prior to calling any entry points (due to ...
    (microsoft.public.inetserver.iis.security)
  • Re: UserForm Is A Class
    ... I have a simple userform with one command button. ... I see the behaviour that you point out about Load and Show and wil then ... Load myForm ... the Unload is done implictly when then routine ends and the ...
    (microsoft.public.word.vba.general)
  • RE: IIS Problems???? Companyweb and Default Web Sites will not St
    ... Every name in IIS must be ... you must have the Microsoft Windows Support ... To determine whether any IP addresses are listed, open a command prompt, ... Companyweb and Default Web Sites will not Start ...
    (microsoft.public.windows.server.sbs)