Create a MongoDB Data Source
Prerequisites
- Install the MongoDB.Driver NuGet package.
Register a data connection string provider.
The Web Dashboard control does not expose connection strings from the configuration file (appsettings.json or Web.config) when used in Designer mode. You need to use a data connection string provider to avoid data leaks and pass connection parameters safely. You can use a predefined data connection string provider or implement a custom provider.
For additional information, refer to the following help topics:
Create a MongoDB Data Source via the Web Dashboard UI
In the Dashboard Data Source Wizard, select MongoDB and click Next.

Specify the data connection and click Next:

For instructions on how to register data connections in your application, refer to the following help topics:
Configure queries and click Next.

Select data fields and click Finish.

API
| Page Name | Page ID | Class |
|---|---|---|
| Choose Connection | MongoDBDataSourceWizardPageId.ChooseMongoDBDataConnectionPage | ChooseMongoDBDataConnectionPage |
| Choose Schema | MongoDBDataSourceWizardPageId.ChooseMongoDBSchemaPage | ChooseMongoDBSchemaPage |
| Choose Collections | MongoDBDataSourceWizardPageId.ChooseMongoDBCollectionPage | ChooseMongoDBCollectionPage |
See Also