tags:

views:

253

answers:

3

I think my Webapplication gets shut down after a while.

It returns a new session if I haven't used the application in maybe 5 minutes. The session timeout is set to 720 minutes so that can't be the issue.

Is it maybe a setting in the Application Pool or something like that? I figure it is some sort of resource management. I use IIS 7.0

I am a dork with servers so please bear with me if I am missing the obvious here.

+2  A: 

The simplest way is to use a script to open a connection to the website and request your page. See Joel Oleson's Blog for more information.

You can use windows scheduler to run every x minutes.

This maybe Sharepoint specific but you can adapt to your requirements.

Update: Try this version: WarmUpServer.zip

Wayne
the files no longer exists in that blogpost... otherwise seems to be what I was looking fore, anyone have a script that can do this for me?
The real napster
A: 

Application pools do recycle, and they do restart after achieving some limits in terms of execution time or number of requests etc, that can be set on IIS.

IIS 7 actually runs in pipeline mode so its something new which we dont know yet for sure, but all you can do to make your app alive is to set a trigger from some other machine which will connect your server in every 5 or 10 or 60 minutes and try to fetch one html page.

There can be various server monitors for http as well.

Akash Kava
well I most likely wont experience this problem once we go live because there will be a lot more usage but still it is annoying as hell... It seems so stupid to set up a ping from another server though, I refuse to believe that is the best solution :)
The real napster
+2  A: 

We had the same issue with a web service that had to stay online in such a way that we couldn't afford the latency involved in starting it up if it went stale.

We wrote a very simple Windows Service that woke up every 3 minutes and requested a page as @Wayne suggested. Worked like a charm.

Andrew
Totally forgot about windows services, that would be pefect for this... Let me know if you have it and want to send it over as I haven't created a windows service for years :)
The real napster
I must admit, for our sites I actually use a minimised winform with embedded .NET browser control that read's a list of URL's from a txt file and requests each one into the browser
Wayne
Sorry, napster. No can do. As much as I'd like to, the powers that be would NOT be impressed. There are plenty of samples around the 'net, so it won't be hard to put one together.
Andrew
If anyone reads this and have the same needs you can find information on how to make HTTP Requests from C# here:http://www.codeproject.com/KB/cs/Browsing_the_WEB_with_C_.aspx
The real napster