The database mode configuration has two options: ReadWrite and ReadOnly.
## ReadWrite mode
The ReadWrite mode is the default mode and the application works as normal.
## ReadOnly mode
In the ReadOnly mode, the application can only load data from the database. The saving and updating operations by `
EPiServer.Data.IDatabaseHandler` throw exceptions, which is why some modules are disabled or work differently. The following modules and functions are affected in the ReadOnly mode:
Scheduler Service is disabled.
Model synch is disabled.
Indexing of content is disabled.
User, role and claims synch are disabled.
Automatic database updating throws exception if updating is needed.
Statistics Logger is disabled.
Saving web.config file into database is disabled.
You can configure the database mode by the `
databaseMode `attribute on the **episerver.dataStore** section or by the `
episerver:DatabaseMode` setting under the **appSettings ** section.
Example of setting ReadOnly mode by **appsetting.json** section:
Example of setting the ReadOnly mode by **episerver.dataStore** section:
Example of setting ReadOnly mode by **appsetting** section:
## Find Database mode by code
Use the `
IDatabaseMode` to find and detect the database mode by code:
## Access Protected Module in the ReadOnly mode
By default, `
HttpException` returns status code 503 when accessing a protected module in the ReadOnly mode. You can override this behavior by monitoring the `