System Flags

System Flags are an important mechanism allowing you to detect the state of Sitefinity CMS in your code and act accordingly. This section contains a description of the system flags available in Sitefinity and what scenarios you should use them for.

IsReady

The IsReady flag is exposed by the Telerik.Sitefinity.Abstractions.Bootstrapper class and is the recommended way to ensure whether the application is ready to serve your requests. The flag is set to true once Sitefinity CMS has finished the bootstrapping process, and this basically means the system has initialized and started. This is important because in certain scenarios you’d need to ensure Sitefinity CMS has not only initialized, but also prepared the database and warmed up, prior to submitting requests to it. IsReady=true means exactly that. If the flag is set to false this indicates Sitefinity is still in the process of initialization and preparing to serve requests. Some parts of your code might depend on this, so you will want to set a condition and execute your code only when IsReady=true. A typical example can be a background task that reads some information from Sitefinity and processes it. If Sitefinity is not ready you wouldn’t want to request any data from it yet. For example:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?

Next article

Webhook