开发者

How to setup ASP.NET application to always live

I have an ASP.NET web app, and I need it to be in a running state even if there are no sessions alive? As it is now, after last session is ended, the application is ending as well...

I have tried with invoking postbacks after 15 mins (since sessions are lasting for 20mins); The problem here is that after doing postback, somehow the running sessions a开发者_如何学Pythonre not properly ended, and only new sessions are stored; So, after it runs for aprox. 1 day, suddenly all sessions are ending and the applicaiton afterwards

Any other oppinion?


Here is the post that explains how this can be accomplished:

Forcing an ASP.NET Application to 'stay alive'

Although I wouldn't recommend doing so simply because ASP.NET wasn't designed for such behavior. As Jackson Pope suggested, you should try finding another solution to your problem.


It might make sense to separate the continuous functionality into a Windows Service and keep the session based UI as a ASP.Net web app/site. The two can converse using web services or a database.

Windows Services are designed to run all the time, and can be set up to run on machine restart as well.

Of course, if you're looking at remote hosting this won't be an option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜