530
Views
4
Comments
Solved
Disable application and show maintenance page

I want to Disable my application and show maintenance page, without impacting other applications.

referring to https://www.outsystems.com/forums/discussion/70883/global-maintenance-page-for-the-factory/

I tried the option  - Service center -> Factory -> Application -> Disable

But I do not see "Application temparory unavailble message", rather I see 503 error

Kindly help:



2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Rajkiran,

Hope you're doing well.

Are you working with a Traditional Web Application (TWA) or Reactive Web Application (RWA)?

My guess is that you're working with a RWA.


When you disable an app via Service Center, you should see that "Application Temporarily Unavailable" message:

However, I believe that this is working only for TWAs.

If I disable a RWA or a Mobile App in Service Center, they are working normally and no message is displayed.


As such, my first suggestion is that you take a look at this Forge Component.


Another alternative would be the creation of a customized "Temporarily Unavailable" page of your own and change the Default Screen property of the module and set it to that new page:

Of course, this will only change the entry point of the module. This means that you will not be redirected if you specify a page in the URL.

Let's say that you have a module called Test like me, so your entry will be https://<your-hostname>/Test/.

If you enter the URL like this, you will be redirected to your Default Screen, which is your customized page.

But if you specify a page in the URL, like https://<your-hostname>/Test/Screen1, then you will not be redirected to your page, you will go to Screen1.


Márcio's suggestion will also work, but only if an Exception is thrown. I don't know your app lifecycle, maybe you want it to be disabled even if it is not throwing an Exception.


Kind regards,

Rui Barradas

2021-06-02 20-50-04
Márcio Carvalho

If you want to change the feedback message to show a maintenance page you can do that on the OnException.

you just need to choose the type of exception and put a destination if that exception is triggered.

Then you just need to pick the 503 error on the exception, in this case, is the communication exception.

you have your answer here too.

https://www.outsystems.com/forums/discussion/68131/how-to-customize-the-error-message-for-application-disable/

Kind regards,

M´árcio

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Rajkiran,

Hope you're doing well.

Are you working with a Traditional Web Application (TWA) or Reactive Web Application (RWA)?

My guess is that you're working with a RWA.


When you disable an app via Service Center, you should see that "Application Temporarily Unavailable" message:

However, I believe that this is working only for TWAs.

If I disable a RWA or a Mobile App in Service Center, they are working normally and no message is displayed.


As such, my first suggestion is that you take a look at this Forge Component.


Another alternative would be the creation of a customized "Temporarily Unavailable" page of your own and change the Default Screen property of the module and set it to that new page:

Of course, this will only change the entry point of the module. This means that you will not be redirected if you specify a page in the URL.

Let's say that you have a module called Test like me, so your entry will be https://<your-hostname>/Test/.

If you enter the URL like this, you will be redirected to your Default Screen, which is your customized page.

But if you specify a page in the URL, like https://<your-hostname>/Test/Screen1, then you will not be redirected to your page, you will go to Screen1.


Márcio's suggestion will also work, but only if an Exception is thrown. I don't know your app lifecycle, maybe you want it to be disabled even if it is not throwing an Exception.


Kind regards,

Rui Barradas

2021-01-19 14-07-32
Tom Zhao

Hi Rui Barradas,

Sorry, I have another question. I am woking on traditional web, The disable function works for me.
But I wonder may I replace the default "Application Temporarily Unavailable"  page to  other page that I created.

Any sugesstion will be apreciated.

Kind Regards,


2024-04-16 12-56-13
Roshan Choudhary
AI Generated

Disabling an application and displaying a maintenance page can be achieved in various ways depending on the technology behind your application. Here are some general approaches:

1. Server-Side Implementation:

  • This method involves modifying your server-side code to handle maintenance mode.
    • You can create a flag or configuration variable to indicate maintenance mode.
    • When maintenance mode is enabled, your server code can return a custom HTTP status code (e.g., 503 Service Unavailable) along with a pre-designed maintenance page content.

2. Web Server Configuration:

  • Many web servers like Apache or Nginx allow you to configure specific functionalities using configuration files.
    • You can create a separate maintenance page (HTML file) and configure the server to display it when maintenance mode is activated.
    • Activating maintenance mode might involve modifying specific configuration files or creating rules that trigger the maintenance page based on certain conditions.

3. Application Framework Features:

  • Some application frameworks might offer built-in functionalities for maintenance mode.
    • Explore the documentation of your framework to see if it provides features for enabling maintenance mode and displaying custom pages.

4. Third-Party Tools:

  • Depending on your application environment, you might consider third-party tools that manage application lifecycle and deployment.
    • Some tools might offer functionalities to put your application in maintenance mode and display custom messages.


This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.