I have a Silverlight application hosted on an ASP.NET page. I need to do some processing when the application starts up first and starts some background processes (various periodic checks).
I thought that the Global.asax Application_Start event would be a good place for this, but I found Application_Start to fire several times, which I did not expect. From what I read, it seems that when the last user exits my application, their session disappears and IIS unloads my application. When it is requested, it will load again, and Application_Start will start again, which I do not want.
Is this the expected behavior? Is there a way to keep the application loading and not restarting it?
Secondly, I have these periodic background processes that I want to start. Perhaps the Windows Service will be the best place for them, but using a timer from a static class in my application will be convenient. Is there a way to preserve these features, even if there are no active users?
source share