I am using a COM object that I am able to create/destroy on a given virtual
as long as the virtual has at least one request every 15 minutes. If more
than 15 minutes pass I receive the error message below when I attempt to
create this object:

Server object error 'ASP 0177 : c0000005'
Server.CreateObject Failed
/foo/bar.asp, line 2
c0000005

If the virtual (with application protection in high/medium/low) is unloaded
the script will work as stated above. Other pages in the virtual are able
to be served, as long as they don't attempt to create the given COM object.

I have looked at the threads in the dllhost.exe process before and after the
15 minute point and 4 threads go away.
Before:
asp.dll!HttpExtensionProc
asp.dll!HttpExtensionProc
collator.dll!NIMakeICommand
COMSVCS.DLL!CoCreateActivity
COMSVCS.DLL!DispManGetContext
dllhost.exe
kernel32.dll!FlsSetValue
kernel32.dll!FlsSetValue
kernel32.dll!FlsSetValue
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
msvcrt.dll!endthreadex
ntdll.dll!EtwRegisterTraceGuidsW
ntdll.dll!RtlRandomEx
ntdll.dll!RtlUpdateTimer
ole32.dll!CoGetMalloc
ole32.dll!CoGetMalloc
oledb32.dll!DllGetClassObject
oledb32.dll!DllGetClassObject
W3TP.dll
W3TP.dll
W3TP.dll
W3TP.dll

Missing after 15 minutes:
kernel32.dll!FlsSetValue
msvcrt.dll!endthreadex
ntdll.dll!EtwRegisterTraceGuidsW
ole32.dll!CoGetMalloc

This is experienced on Windows 2003 with IIS6 (in either IIS5 compatibility
mode or regular mode), however on Windows 2000 this isn't experienced.

Thanks
Dave

Re: Server.CreateObject failing after 15 minutes of inactivity on virtual by Egbert

Egbert
Sat Dec 11 01:31:35 CST 2004

"Dave B" <david_brisco@aotx._NOSPAM_uscourts.gov> wrote in message
news:eE5sP3w3EHA.2592@TK2MSFTNGP09.phx.gbl...
>I am using a COM object that I am able to create/destroy on a given virtual
> as long as the virtual has at least one request every 15 minutes. If more
> than 15 minutes pass I receive the error message below when I attempt to
> create this object:

So, basically are you caching the object in the application?
ps: Try to do this with CreateObject instead of Server.CreateObject.

Another issue, FlsSetValue is doing thread or fiber storage. A Both marked
component should not persist values in memory this way. It should have no
thread affinity.

Regards

> Server object error 'ASP 0177 : c0000005'
> Server.CreateObject Failed
> /foo/bar.asp, line 2
> c0000005
>
> If the virtual (with application protection in high/medium/low) is
> unloaded
>
> Thanks
> Dave
>
>


Re: Server.CreateObject failing after 15 minutes of inactivity on virtual by Dave

Dave
Mon Dec 13 16:51:30 CST 2004

"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
message news:%23AOkOP13EHA.1564@TK2MSFTNGP09.phx.gbl...
> "Dave B" <david_brisco@aotx._NOSPAM_uscourts.gov> wrote in message
> news:eE5sP3w3EHA.2592@TK2MSFTNGP09.phx.gbl...
> >I am using a COM object that I am able to create/destroy on a given
virtual
> > as long as the virtual has at least one request every 15 minutes. If
more
> > than 15 minutes pass I receive the error message below when I attempt to
> > create this object:
>
> So, basically are you caching the object in the application?
> ps: Try to do this with CreateObject instead of Server.CreateObject.

I am not caching the object in the application. Although the object may be
putting something in the application/session environment (it was written by
a third party). I have tried to create the object with creatobject over
server.createobject with the same outcome.

>
> Another issue, FlsSetValue is doing thread or fiber storage. A Both marked
> component should not persist values in memory this way. It should have no
> thread affinity.

The object is marked as 'Both' in its ThreadingModel registry key. I tried
setting it to 'Apartment', but it would not allow itself to be created,
stating invalid configuration/registration.

How would the typical application use FlsSetValue in a code sense?

Also do you know of a way to turn off whatever is setting this 15 minute
timer, and destroying things (or even what in IIS might be doing this)? Is
this configurable. I believe I have tried setting most of the configurable
properties that related to time (like session timeout, lifetime limit,
expiration timeout) through the IIS MMC snap-in or component services. None
of the changes, have appeared to change the stated behavior.

Should the component I am using be listed under the legacy components for
the COM+ Application virtual? The COM object I working with was written
about 5 or 6 years ago.

Thanks,
Dave
>
> Regards
>
> > Server object error 'ASP 0177 : c0000005'
> > Server.CreateObject Failed
> > /foo/bar.asp, line 2
> > c0000005
> >
> > If the virtual (with application protection in high/medium/low) is
> > unloaded
> >
> > Thanks
> > Dave
> >
> >
>



Re: Server.CreateObject failing after 15 minutes of inactivity on virtual by Egbert

Egbert
Tue Dec 14 12:05:57 CST 2004

"Dave B" <david_brisco@aotx._NOSPAM_uscourts.gov> wrote in message
news:%23LB1MZW4EHA.2288@TK2MSFTNGP11.phx.gbl...
> "Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
> message news:%23AOkOP13EHA.1564@TK2MSFTNGP09.phx.gbl...
>> "Dave B" <david_brisco@aotx._NOSPAM_uscourts.gov> wrote in message
>> news:eE5sP3w3EHA.2592@TK2MSFTNGP09.phx.gbl...
>> >I am using a COM object that I am able to create/destroy on a given
> virtual
>> > as long as the virtual has at least one request every 15 minutes. If
> more
>> > than 15 minutes pass I receive the error message below when I attempt
>> > to
>> > create this object:
>>
>> So, basically are you caching the object in the application?
>> ps: Try to do this with CreateObject instead of Server.CreateObject.
>
> I am not caching the object in the application. Although the object may
> be
> putting something in the application/session environment (it was written
> by
> a third party). I have tried to create the object with creatobject over
> server.createobject with the same outcome.
>
>>
>> Another issue, FlsSetValue is doing thread or fiber storage. A Both
>> marked
>> component should not persist values in memory this way. It should have no
>> thread affinity.
>
> The object is marked as 'Both' in its ThreadingModel registry key. I
> tried
> setting it to 'Apartment', but it would not allow itself to be created,
> stating invalid configuration/registration.

This is not making sense. It is marked as both or apartment, but how it was
compiled and programmed really makes the difference.

> How would the typical application use FlsSetValue in a code sense?

Not quite sure. I believe the component is compiled as 'both' but in fact,
it still uses Thread Local Storage (TLS) which is a bad thing. Ask the
builder of the component if he knows about it.

> Also do you know of a way to turn off whatever is setting this 15 minute
> timer, and destroying things (or even what in IIS might be doing this)?
> Is

You can configure IIS6 using the console for IIS. In the application pool,
the default one, you can set not to destroy the pool. By default it destroys
the pool after x minutes idle time.

> this configurable. I believe I have tried setting most of the
> configurable
> properties that related to time (like session timeout, lifetime limit,
> expiration timeout) through the IIS MMC snap-in or component services.
> None
> of the changes, have appeared to change the stated behavior.
>
> Should the component I am using be listed under the legacy components for
> the COM+ Application virtual? The COM object I working with was written
> about 5 or 6 years ago.

A little tricky. You might even not need COM+. Just avoid the COM+ stuff and
register the component using regsvr32. But only do this, if you are sure,
the component has no dependencies on COM+.


>
>