This does happen in IIS, and the simplest way of solving this can be to ping your application at constant interval of time if you want to keep the application active.
Another way of handling this problem is by changing the idle time in the application pools, see this thread for more on that,
Preventing IIS from "falling into sleep"[
^]. This is the efficient way of handling the problem, since you can handle it from the control panel without having to add an extra service in the game.