Question

In asp.net, there is app_offline.htm which let you shutdown website gracefully.I want to implemet similar function in client. There is a flag to set to maintenance mode,if flag is on:

  • When user start the client, user will be prompted something like "system is under maintenance, try again after 30 mins".
  • Any new update/delete/add operations, similar message prompted.
  • Ongoing requests will be processed.

How to implement this?

Was it helpful?

Solution

Given the differences in application architecture, this is not something that is going to have a "one-size-fits-all" type solution that is going to work for everyone.

app_offline.html for web applications is truly a "sledgehammer" approach. The app is down, yes it is graceful but it is a 100% hard stop.

A primitive way of doing this within your application could be to have a service call that you make on a regular basis for "Is online" or similar. If it returns false, force quit your current form and show a splashpage.

But this is really going to depend on architecture.

OTHER TIPS

You can put a condition when starting the client, but you if you want the same behavior like app_offline.htm, you may also want to put under maintenance an already opened client.

In this case, you can install a MessageFilter in order to intercept any event across the whole Winforms app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top