1
In the case of a webforms . NET application that is being deployed, there is some way to warn the user that the system is being updated?
1
In the case of a webforms . NET application that is being deployed, there is some way to warn the user that the system is being updated?
0
If you are working with the IIS
simply add your maintenance page with the following name app_offline.htm
. As long as this file is at the root of your website all requests will be redirected to it. Once you deploy, remove the file and the website will respond again with your application.
But bear in mind that at the exact moment you publish this file at the root of your site, your application will be stopped and will "take down" all users, sessions, and application variables defined in Runtime.
The great advantage is that any requested url will be redirected to that page.
Edit
It was a long time since I applied this technique and there was never repaired that if the website is stopped you will receive an error 404 and during the re-cycle of the pool, you will receive a 503.
So if the expected result is to show no errors under any circumstances for the user. You may need to make it available on a another structure to its screen of unavailability, using the
app_offline.htm
, with a new application pool and point that root directory of your site, while deploying the new version.
I didn’t quite understand, every time I deploy, that I should put this page there?
When you put that file there, all requests will be answered with the content of that page. While the pool is being restarted the site will not respond. But for overwriting files beyond binaries, it is a good solution, avoiding displaying error messages 500 and 404
I have to create outside the application, that’s it?
This is a common html file, you mount it as you want the screen to be displayed during your deployment process. Take a test on your site to see
It worked here! Vlw @Leandro Angelo
Browser other questions tagged javascript c# .net webforms
You are not signed in. Login or sign up in order to post.
Make a redirect, on the condition that any page the user accesses it falls on the warning page, saying: "The system is being updated, wait a minute, bla bla".
– Alex
I have had some contacts with c# but never deploy on the web. I use PHP and NODEJS, a
.htaccess
would solve my problem– Alex
@Germanosampaio, He managed to solve?
– Leandro Angelo