-
Type: Bug
-
Resolution: Duplicate
-
Priority: Critical - P2
-
None
-
Affects Version/s: 2.23.0
-
Component/s: API, Configuration, Logging
Summary
updated to the latest version 2.23.0 from 2.22.0. An exception is thrown during the call to
// code placeholder _dbSettings1.ClusterConfigurator = builder => { builder.Subscribe<ConnectionPoolAddedConnectionEvent>(e => { connectionAdded++; //Console.WriteLine("Total Added Connections: " + connectionAdded); }); builder.Subscribe<ConnectionPoolRemovedConnectionEvent>(e => { connectionRemoved++; //Console.WriteLine("Total Removed Connections: " + connectionRemoved); }); }; _mongoClient = new MongoClient(_dbSettings);
// code placeholder Value cannot be null. Parameter name: factory Source: Microsoft.Extensions.Logging.Abstractions Thread started: <Thread Pool> #21 at Microsoft.Extensions.Logging.LoggerFactoryExtensions.CreateLogger[T] (Microsoft.Extensions.Logging.ILoggerFactory factory) [0x00003] in <d7a3ca84869f48e0aa5c354ee22cb1ee>:0 at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfExternalEnvironment|9_2 (System.String host, System.String environment, System.String documentationUrl, System.String[] suffixes) [0x00022] in <9a38b6dbb2264f9885b4250438ce22a4>:0 at MongoDB.Driver.Core.Clusters.ClusterFactory.<ProcessClusterEnvironment>g__LogIfCosmosDB|9_0 (System.String host) [0x00000] in <9a38b6dbb2264f9885b4250438ce22a4>:0 at MongoDB.Driver.Core.Clusters.ClusterFactory.ProcessClusterEnvironment (MongoDB.Driver.Core.Configuration.ClusterSettings settings) [0x0002b] in <9a38b6dbb2264f9885b4250438ce22a4>:0 at MongoDB.Driver.Core.Clusters.ClusterFactory.CreateCluster () [0x00007] in <9a38b6dbb2264f9885b4250438ce22a4>:0 at MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster () [0x00006] in <9a38b6dbb2264f9885b4250438ce22a4>:0 at MongoDB.Driver.ClusterRegistry.CreateCluster (MongoDB.Driver.ClusterKey clusterKey) [0x000cf] in <6926c8350547439997c522a25b1c60d3>:0 at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster (MongoDB.Driver.ClusterKey clusterKey) [0x00021] in <6926c8350547439997c522a25b1c60d3>:0 at MongoDB.Driver.MongoClient..ctor (MongoDB.Driver.MongoClientSettings settings) [0x0003e] in <6926c8350547439997c522a25b1c60d3>:0
Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).
the working version is 2.22.0
- duplicates
-
CSHARP-4870 CreateCluster throws NullReferenceException when not setting LoggingSettings
- Closed