Further to the other replies - if you want something that fires when
your web app starts, then you might look at "global.asax"; you can
place code in here, for instance "Application_Start". This is
comparable* (but not equal) to Main(). However; this Application_Start
method should only be used to perform any initial startup operations
(perhaps more comparable to the code for starting a winnt service); it
shouldn't block etc.
You aren't guaranteed to get any shutdown notification - app-pools can
be torn down without notice.
The following isn't the best walkthrough of global.asax I've seen, but
it is the first I can find (via google) at the moment:
http://samples.gotdotnet.com/quickst...lobalasax.aspx
*=actually, it is perhaps more closely compared to an IHttpModule, if
you are familiar with that
Marc