1

I have a large web application in ASP .NET (not that the technology matters here) that does not currently have a way to be locked down for maintenance without current users losing their work. Since I have not implemented something like this before, I would like to hear about some of the standard precautions and steps developers take for such an operation.

Here are some of the questions that I can think of:

  • Should each page redirect to a "Site down for maintenance" page or is there a more central way to prevent interaction?
  • How to centralize a scheduled maintenance such that user operations lock down before the site is locked down. Thus preventing loss of unsaved work.

The application is data-driven and implements transaction scopes at the business layer. It does not use load balancing or replication. I may be wrong, but it does not 'feel right' to have the BLL handle this. Any suggestions or links to articles would be appreciated.

4

2 回答 2

0

一个可能有帮助的无答案的答案:设计应用程序,以便可以对其用户透明地即时升级。然后,您永远不会有用户真正需要担心的维护窗口。无需锁定应用程序,因为一切正常。如果事务被丢弃,那是应用程序中的一个错误,因为有一个明确的要求,即应用程序可以使用正在进行的事务进行升级,所以它被编码来支持它,并且有验证该功能的测试。

以 Netflix 为例:它是否有锁定的维护窗口?不是一般公众知道的。:-)

于 2013-11-10T11:21:30.300 回答
0

制作维护页面的一种方法是使用 IIS 的 app_offline.htm 功能。使用此功能,您将能够向所有用户显示相同的 html 页面,通知他们有关维护的信息。

StackOverflow 中有一篇关于它的好帖子。ASP.NET 2.0 - 如何使用 app_offline.htm

您可以做的另一件事是通知您的用户有计划的维护,以便他们也知道并停止使用该应用程序。

这一切都取决于您需要升级应用程序的时间。如果升级是上传新文件并且不超过一两分钟,那么您的用户很可能甚至看不到它。

于 2013-11-10T11:32:41.133 回答