HTTPApplication behavior.

A

AinO

Hi,

- I've created a webservice in VS2003/c# wich relies heavily on cache. It
has a cache manager wich loads
resources (triggered by requests) and wich has also a built in timer wich
triggers every 5 mins a check on
the unused lifetime of all cached resources and frees them if they exceed
their idle time limit. I made also a
log object wich logs HTTP application level (triggered from global.asax) and
web method level events (triggered
from the various webmethods). From the results of this log i'm fine tuning
the behavior of my cache manager. -

This works quite well, but i don't understand fully the behavior of a
HTTPApplication and i think it is the key to
understand and counter following problems :

1. When VS loads my project and connects to the web service IIS starts up an
HTTPApplication, and it
generates an application error event. Is this normal (to ignore) ?

2. My service is heavily used at office hours. So at 9am users starts to hit
it. At that time my cache
manager is very busy loading resources and it takes about 2 minutes before
the first user can comfortably work
with his client. Is it possible to wake a service at server side (i
considered building a small client wich wakes
the service at 8.45am and 12.45pm (end of lunchbreak) but i don't like the
idea because i prefer compact system architectures) ?

3. I notice the HTTPApplication class instance gets shuts down daily (a
while after the last request) twice. Maybe
there is a way to prevent this (wich makes 2. obsolete) ?

I'm aware these issues may relate more to fine tuning IIS then to .NET/c#
but i can't find any good directions...

Thanks in advance for your comments,

AinO.
 
P

Peter Bromberg [C# MVP]

AinO,
Regarding your Application error event, without knowing what exactly the
even is, I'd be guessing. Perhaps somebody else could expand on it.

As far as "waking up" the service is concerned, you could have a simple VBS
script that runs from Task Scheduler that makes the required request to get
everything going, before business hours.

Addressing the third issue, you could run the IISState tool to create a dump
that would provide more insight into what and from where your application is
quitting.

Hope the above gives some ideas.

--Peter
 
A

Alvin Bruney [MVP - ASP.NET]

the application object will shut down after inactivity, for health reasons,
you should accept that behavior and not muck with it. follow bromberg's
advice and write an application warmer that fires every so often to keep the
application nice and toasty. .net 2.0 fixes this problem with some
specialized tools by the way

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top