This page contains frequently asked questions about dotConnect for MongoDB. When you have a question, first of all please browse through this list. If this page does not contain the answer, refer to the support page. For questions about the license agreement, see License Agreement FAQ.

Installation and deployment

What are the system requirements for dotConnect for MongoDB?

dotConnect for MongoDB requires .NET Framework 4.5.1 or later, or a supported version of .NET Core or .NET, running on Windows (x86 or x64). The required MongoDB client libraries are included in the installer and the NuGet packages, so nothing else needs to be installed.

How do I upgrade to a newer version of dotConnect for MongoDB?

Close all running IDEs and help collections, then run the installation package of the newer version. You will be prompted to uninstall the previous version; agree and then proceed to installing the newer build. If you use NuGet packages, update the Devart.Data.MongoDB package (and Devart.Data.MongoDB.EFCore, if used) to the new version.

How do I deploy my application?

To deploy an application written with dotConnect for MongoDB, you need to:

  • deploy the Devart runtime assemblies used by your application: Devart.Data.MongoDB.dll and Devart.Data.dll, plus Devart.Data.MongoDB.EFCore.dll for Entity Framework Core applications. Also deploy the native libraries libmongoc-1.0.dll, libbson-1.0.dll, sqlite3.dll, and vcruntime140.dll for the platform of your application, from the Native\win-x86 or Native\win-x64 folder of the dotConnect for MongoDB installation. If you reference the provider via NuGet packages, these assemblies are copied to the output folder automatically;
  • provide the license key (see the Technical licensing section below);
  • in case your application uses provider factories, you also need to register dotConnect for MongoDB in the system.

For the detailed description of each of these steps, refer to the Deployment and Licensing topics in dotConnect for MongoDB help.

How to install dotConnect for MongoDB on a machine that does not have Visual Studio installed?

Select the Minimal installation type when prompted by the installer. Alternatively, do not run the installer at all and add the Devart.Data.MongoDB NuGet package to your project.

Can I use dotConnect for MongoDB in Visual Studio Code, JetBrains Rider, or other IDEs?

Yes. Add the Devart.Data.MongoDB NuGet package (and Devart.Data.MongoDB.EFCore for Entity Framework Core) to your project and specify the license key. Design-time features (Server Explorer integration, toolbox components, and component editors) are available only in Visual Studio.

Are there any restrictions for Visual Studio Express editions?

Visual Studio Express editions are not supported.

I have received a message that Devart.Data is incompatible...

Devart data providers use a common assembly (Devart.Data.dll), so it is necessary to install compatible versions of the providers. We release our ADO.NET data providers in a single pack, thus releases from the same date should be compatible. Also, Devart data providers should warn you before installation if an incompatible version of Devart.Data.dll was detected.

Subscriptions and upgrades

I have a registered version of dotConnect for MongoDB. Will I need to pay to upgrade to future versions?

All upgrades to future versions are free to users with an active dotConnect for MongoDB Subscription.

What are the benefits of the dotConnect for MongoDB Subscription Program?

The dotConnect for MongoDB Subscription Program is an annual maintenance and support service for dotConnect for MongoDB users.

Users with a valid dotConnect for MongoDB Subscription get the following benefits:

  • Access to new versions of dotConnect for MongoDB when they are released
  • Access to all dotConnect for MongoDB updates and bug fixes
  • Product support through the dotConnect for MongoDB Priority Support program
  • Notification of new product versions

Priority Support is an advanced product support program which offers you expedited individual assistance with dotConnect for MongoDB-related questions from the dotConnect for MongoDB developers themselves. Priority Support is carried out over email and has a two business day response policy.

Can I use my version of dotConnect for MongoDB after my Subscription expires?

Yes, you can. dotConnect for MongoDB version licenses are perpetual.

Technical licensing

What is the licensing you use?

dotConnect for MongoDB uses activation key licensing. To work, the provider requires a valid activation key: either a trial key or a key of the purchased license. If no valid key is available, dotConnect for MongoDB does not work.

How do I get and activate the license key?

You can get a trial or activation key on the Devart website or in Visual Studio: on the Tools menu, point to MongoDB and then click Get Activation or Trial Key. To activate the product on the development machine, enter the key in the installer or click Activate or Get License Information in the same menu. If you use only NuGet packages, use the console activator that is included in the tools folder of the Devart.Data.MongoDB package.

How do I provide the license key to a deployed application?

Specify the key in the License Key connection string parameter, for example:

Host=localhost;Port=27017;User Id=your_username;Password=your_password;Database=your_database;License Key=your_license_key

Alternatively, call the static MongoDBConnection.LoadLicenseKey method before opening the first connection.

On opening the connection, I get a licensing exception. What should I do?

This means that a valid license key cannot be found, or that it has expired. Check the following:

  • the License Key connection string parameter contains the full key without extra characters;
  • the trial key has not expired: if you have purchased the product, replace the trial key with the key of your license in the connection string and in the product activation;
  • the key belongs to dotConnect for MongoDB and not to another Devart product.
I am having problems with the licensing in my project... What am I to do?

Use the License Information dialog box to resolve them. To open it, on the Tools menu, point to MongoDB and then click Activate or Get License Information.

Do end-users need a license?

No, end-users of your application do not need their own license. However, to distribute your application to third parties, you need the OEM license.

Connection pooling

I call MongoDBConnection.Open(), then Close(). Is the connection really closed?

The connection is returned to the pool. This is the Connection Pooling feature: the connection object is kept to be reused later by your application, so the next Open() does not have to establish a new connection to MongoDB. This boosts performance.

I get the following exception: "Timeout expired. The timeout period elapsed..." What to do?

The full text of the exception is "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." It states that you have run out of connections available. To solve the problem, increase the value of the Max Pool Size connection string parameter or make sure your code closes connections after use. You can also turn connection pooling off with the Pooling connection string parameter.

How to prevent possible pooling problems?

Make sure your code closes connections after use. If problems remain, disable the pool completely (set Pooling=false in the connection string). If this does not help, the problem is not caused by pooling.

Documentation problems

How to open documentation on dotConnect for MongoDB?

There are several ways to open dotConnect for MongoDB documentation:

  • Use the appropriate shortcut in the Start menu, for instance, Start > Programs > Devart dotConnect for MongoDB > Documentation.
  • Use the online documentation.
  • Open it from Visual Studio: on the Tools menu, point to MongoDB and then click dotConnect for MongoDB Help.
All topics in the CHM file are blank.

Downloaded CHM files are blocked on Windows operating systems by default. In most cases, it is enough to right-click the CHM file, select Properties, click Unblock, and click Apply to show the contents.

ORM solutions

Is Entity Framework supported?

dotConnect for MongoDB supports Entity Framework Core 3.1, 8, 9, 10, and 11 via the Devart.Data.MongoDB.EFCore NuGet package. Classic Entity Framework (EF6) is not supported.

What are the limitations of Entity Framework Core support?

The following limitations apply when you work with MongoDB through Entity Framework Core:

  • migrations cannot change, rename, or delete columns;
  • migrations cannot change primary keys and constraints;
  • migrations cannot rename tables and indexes;
  • sequences are not supported.

Miscellaneous

How are embedded documents, arrays, and Decimal128 values returned?

By default, the SQL engine returns each nested field of embedded documents and arrays as a separate column, for example, address.city or tags.0. To get an embedded document or an array as a single column containing JSON, use the Complex As String or Json Fields connection string parameter. Decimal128 values are returned as String without loss of precision. To get them as Decimal or Double, use the Decimal128 Mapping connection string parameter; the Double mapping may lose precision.

Are stored procedures supported?

No. CommandType.StoredProcedure is not supported.

No components can be found in the toolbox.

This can happen if the installation encountered some problems. You can add the components to the toolbox manually. This procedure is described in the Installation article in the documentation.

Can I use dotConnect for MongoDB assemblies in the x64 process?

dotConnect for MongoDB assemblies are built with the /platform:anycpu option. So, you can use the provider's assemblies on any platform (x86 or x64).