RAHUL KATE
RAHUL KATE

Reputation: 29

How to Automate ASP.NET Website Downtime message

I have a requirement where I want to Automate a message when the (ASP.Net) website is down for scheduled maintenance on specific times throughout the week.

E.g. Mon - 09:00 am to 11:00 am, Sat: 01:00 am to 03:00 am.

At the moment we have the message hard-coded. We uncomment it when we need the downtime and comment it out again when we don't need it.

What is the best options to take care of this.

Its a ASP.NET C# web application.

Any good suggestions. Bring them on....

EDIT

I think my requirement was not clear to you guys. Right now we display a Downtime message 24 hrs before the scheduled downtime. I want to automate that part. Windows Service / Scheduled job is definitely in my radar. I want to check if there are any decent / sophesticated ways of doing that. I am a Windows Developer so not that strong on ASP.NET.

Upvotes: 2

Views: 1633

Answers (1)

Jeff S
Jeff S

Reputation: 7484

ASP.NET applications will be automatically taken down when a file named app_offline.htm is added to the root folder of the application. Any request for the web site will display the app_offline.htm. ScottGu posted more information in his blog.

To automate this, you can have a Windows scheduled batch process add and remove the file or you can have your CI build server do it.

Either way, I believe this is the simplest way to bring down an ASP.NET application.

Upvotes: 7

Related Questions