Try our conversational search powered by Generative AI!

Is there a way to detect the zero downtime deployment to prevent forms from being submitted in EPiServer 11 CMS?


Our team uses the down time page at the moment, but we want to be able to keep the site up using read only mode. But we're worried about how forms would be handled. We rely on them heavily and won't want to miss submissions. Would they jsut get an error if they tried to submit? Is there anyway to detect downtime so we can disable just those pages programmatically?

Sep 05, 2023 18:37

When the site is in ReadOnly mode, then IDatabaseMode.DatabaseMode can be read in code.

So you could maybe customize the rendering of the FormContainerBlock. To either show a warning, disable the fields, or not render the fields completely, when DatabaseMode is ReadOnly.

Sep 05, 2023 19:29

Remember that you also need to manage the case where a form is loaded when the application is normal, but the customer finished the form when the site is in readonly mode… this could be tricky, the site I'm working with is in the readonly mode for waaaay to long for a user to wait with their form being submitted. Now I haven't used Forms in a while and not in this situation, but investigate if you could hijack the form submission and handle it yourself. You could then store the data somewhere else that is accessible even though you are deploying.

Sep 06, 2023 8:14
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.