问题
I have created a httpModule for my Web Application which basically is triggered by a timer on specific schedules, it runs fine and the method I want is invoked after I publish it in IIS but what happens if there is no request it seems like the Web Application stops to a stand still making any scheduled events not to run, It will only run again only if I make a new request. What am I doing wrong? Can I make my website not sleep so that during times where there is no request the schduled httpModule would run as required? I hope I made this clear.
回答1:
You should check you Application Pool setting there to make sure it does not recycle the working process
EDIT Not sure what version is your IIS, but take IIS7.5 as an example, in the advanced setting of an application pool, there is a setting named like 'Idle Time-out(minutes)' which means after your application idle for that time it will be shut down, also a setting named as Regular Time Interval(minutes) in Recycling section, says it means Period of time the pool will be recycled.
来源:https://stackoverflow.com/questions/12926615/iis-seems-like-to-sleep-until-the-next-request