ASP/.NET 网站在闲置一段时间后停用

ASP/.NET web sites to inactivate after a certain time of inactivity

我正在为我的网站使用共享主机,它建立在 ASP.NET 网络表单上并托管在 IIS 服务器上。本网站的目的仅用于 IOS 应用程序的重置密码和管理面板更改。现在我们面临一个问题,当用户点击它时,通过电子邮件发送给用户的重置密码 link 有时需要 2-3 分钟。我们向我们的托管服务提供商提出了同样的问题并得到了这个答案:

it is standard in ASP/.NET web sites to inactivate the application pool (where the code is run) after a certain time of inactivity (180 min) which means that the next visit requires the code the be compiled to memory from scratch every time the application is started by the web server.

我需要帮助来设置我们如何使网站正常运行而不是从头开始编译代码。任何 help/suggestion 将不胜感激。

当然您可以创建 windows 服务或调度任务到 运行 一个应用程序来调用您的服务器,但解决这个问题的最简单方法是设置一个免费的站点监控Uptime Robot 等服务。它会每 5 分钟或根据配置的频率对您的站点执行 ping 操作,并保持 运行ning。如果您的网站出现故障,奖金状态会更新。