Re: IIS 6.0 -> Server.CreateObject of ('null') !

From: Benny Hauk (Hauk_at_discussions.microsoft.com)
Date: 10/19/04


Date: Tue, 19 Oct 2004 04:45:03 -0700

So the rule of thumb that's been around for a few years (use
Server.CreateObject in lieu of just CreateObject) is the other way around in
IIS 6?

I had the same problem originally described (web server would occasionally
go into a state of throwing ASP 0117 and ASP 0241 errors when certain apps
would run 'set conn = Server.CreateObject("ADODB.Connection")'). This
started happening only after migrating a web server from W2k to W2k3. To fix
the problem I changed IIS6 to run in IIS 5 Isolation Mode insead of using
Application Pools and worker processes. I sacrifice a lot to do this, but
I've gotta go with what works. I suspect it could have been an access issue.
 The application pools were running in the context of the Network Service
(the default), not the IWAM account.

I've run into similar conflicts when using application pools with more than
1 worker process (not the case in this instance). My own rule of thumb: If
it's legacy asp, only run it in an App Pool with 1 worker process otherwise
you will run into intermittent problems.

My experience thus far: Much easier to deal with IIS 5.x than IIS 6. I
guess it is understandable in a sense, but still unfortunate.

"Egbert Nierop (MVP for IIS)" wrote:

> First you should understand that server.createobject was meant for IIS 3.0
> and 4.0 backward compatibility.
> In short, it does a lot more code behind the scene that you don't need.
> So change that to
> Set Connection = CreateObject("ADODB.Connection")
>
> After that you might see other behaviour however, the problem you describe
> should not happen.
>
> --
> compatible web farm Session replacement for Asp and Asp.Net
> http://www.nieropwebconsult.nl/asp_session_manager.htm
>
> "Henrique Soler Albano" <henriquecns@consciencia.com.br> wrote in message
> news:uWmq1j9qEHA.4008@TK2MSFTNGP14.phx.gbl...
> > Hello there,
> >
> > I'm having problems with Server.CreateObject on IIS 6.0.
> >
> > When I start my app everithing works fine. The problem occurs after
> > using the app for many times.
> >
> > I tougth that was some kind of problem with ADODB.Connection but I saw
> > on web many friends having the same problem with different objects server
> > creations (file system object, adodb connections, cdonts mailer, etc).
> >
> > It ocurrs exactly in the adodb.connection creation line: Set Connection
> > = Server.CreateObject("adodb.connection")
> >
> > It's strange, the server is telling me that there is an instruction to
> > create a null object in my code.
> >
> > It seems to be a security limitation of IIS 6.0.
> >
> > Here is the error return page from the webserver (Brazilian
> > Portuguese):
> >
> > *******************************************
> >
> > CreateObject of '(null)' caused exception C0000005.
> >
> > Server Object error 'ASP 0177 : c0000005'
> >
> > Falha em Server.CreateObject
> >
> > /Online/Global/ini_x.asp, line 67
> >
> > c0000005
> >
> > *******************************************
> >
> > Does anybody has an idea about it?
> >
> > Thanks in advance.
> >
> > Henrique Piolho
> >
> >
>
>



Relevant Pages

  • Re: Does changing .NET version on one virtual directory force IIS to restart?
    ... does this force IIS to restart? ... IIS5 did not use Application Pools. ... only the particular Dllhost.exe process in which the app is running would ... be restarted, so the restart of IIS is -again- not required. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VS2008 HTTP 403 Help!!
    ... Check in your IIS Manager, and make sure you created a virtual directory ... for your app. ... Seems like the publish took away the projects web app status. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... CGIs, and ASP scripts onto a 64bit machine, and it just works after they ... The most confusing aspect of running 32bit app on a 64bit OS is that you ... System32 access is redirected, etc). ... we will be introducing the ability to configure IIS to run ...
    (microsoft.public.inetserver.iis)
  • Re: Cannot use MSAccess database on WorkGroup with ASP
    ... This is because your asp user account doesnt have permissions to access ... app works because it runs under the priveledges of the user currently signed ... > Our site doesn't allow me to map the IIS server so the database can't ... > the IIS sever. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: ASP.Net 1.1 and 2.0 Coexist?
    ... I ran IIS 6 in IIS 5 isolation mode and, you're right, changing the isolation ... > You will automatically get one aspnet_wp process for the 1.x app and one for the 2.0 ... > ASP application either run in inetinfo, a shared dllhost process ...
    (microsoft.public.dotnet.framework.aspnet)

Loading