Skip to main content

All Questions

Tagged with
0 votes
0 answers
61 views

Atlas Search C# patterns for building search query dynamically

I’m working on an application which has ONE search input value (one search text box) and it should be able to perform the following type of searches. Normal text search Phrase search Logical AND/OR ...
O'Neil Tomlinson's user avatar
1 vote
0 answers
221 views

Authentication Issue when Deploying ASP.NET Core 7 API with MongoDB on Azure App Services

I'm developing an API using ASP.NET Core 7 with MongoDB. I've set up a database on MongoDB Atlas and I'm using the connection string to access my database through the API. Locally, everything works as ...
Rafael Jordão's user avatar
1 vote
1 answer
396 views

Mongo DB Atlas database: MongoDB.Driver.Legacy driver is missing

In my C# application I'm not able to access my MongoDB Atlas database. After creating a database on Atlas, I generate the string to access it and add the following lines in my code: var client = new ...
Paslet87's user avatar
1 vote
1 answer
566 views

C# MongoDB check if array contains strings case insensitive

I'm new to MongoDB and I'm trying to check if an input array of strings has any values that matches with a nested array of strings on any document. public IEnumerable<Cocktail> FindByIngredients(...
Mike Johansen's user avatar
0 votes
2 answers
574 views

Is there any way to add metadata to MongoDB Aggregation Queries?

Having a lots of apps accessing the MongoDB cluster, slow queries are hard to track. especially when it's an aggregation pipeline. We're using MongoDB Atlas, where we have a profiler which shows the ...
Sunny Sharma's user avatar
  • 4,984
1 vote
0 answers
580 views

Failing to connect to Atlas from C#

We have a test Atlas database up and running. We can connect to it using Mongo Shell and list the collections from the database successfully. However, when we try and connect using C# (running the ...
Ian Hannah's user avatar
2 votes
1 answer
849 views

C# .Net + MongoDB Atlas connection string MongoDB.Driver.Legacy error when trying to run Client

I've set up a Cluster + Collection in a MongoDB Atlas database. I'm trying to follow tutorials such as this one: Bookstore | Using ASP.NET Core 5.0 and MongoDB my code is as follows, with <> ...
Yafim Simanovsky's user avatar
0 votes
0 answers
251 views

MongoDB Connecting to Atlas Cloud Database C#

I'm having some trouble getting my C# app connected to my MongoDB on Atlas. The documentation on the website wants me to do this: using MongoDB.Bson; using MongoDB.Driver; // Replace the uri string ...
Kris's user avatar
  • 37
5 votes
0 answers
1k views

MongoDB HeartbeatException: > "MongoDB.Driver.MongoConnectionException

System.TimeoutException: A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, ...
Aneesh's user avatar
  • 225
0 votes
0 answers
327 views

C# Mongo Client stuck forever with no primary after failover

C# MongoDb.Driver v2.11.4 After a failover we're seeing some servers get stuck forever without a primary and are therefore unable to complete any write operations. There's 10 servers in the farm - ...
alexs's user avatar
  • 1,856
1 vote
1 answer
381 views

Command aggregate failed: Remote error from mongot :: caused by :: \"origin\" must be a date, number, or geoPoint (from \"compound.should[1].near\")

I'm using MongoDB Atlas and creating search pipeline using C# dictionary object then serializing it to json and then parsing the json string to BsonDocument. In $search stage I'm using near object in ...
Waleed Nasir's user avatar
1 vote
2 answers
911 views

Dot Net Core 3.1 - Unable to implement Mongo Atlas healthcheck

I am unable to add the Mongo Atlas health check in dot net core 3.1 using the AspNetCore.HealthChecks.MongoDb nuget package. Added below code into the startup.cs services.AddHealthChecks().AddMongoDb(&...
Charan Ghate's user avatar
  • 1,394
7 votes
2 answers
1k views

InvalidOperationException: Record reader index out of sync

I have asp.net core application which uses mongodb as backend. Recently I have started getting this error without any changes in database or code. Here is complete error I am getting when I browse ...
Krunal Parmar's user avatar
5 votes
1 answer
2k views

Mongo Atlas - Low connection limit?

I am currently testing a free tier of mongo atlas, however I am repeatedly running into issues with the connection limit (100 on the free tier). I am using the database in an Azure Service Fabric ...
QTom's user avatar
  • 1,531
1 vote
1 answer
482 views

C# MongoClient throws DnsResponseException after second request

I have a MongoDB on Atlas which I'm querying from my ASP.NET Core MVC app. In my Context class I'm initializing the MongoClient from the constructor like this: var client = new MongoClient(settings....
kalbsschnitzel's user avatar

15 30 50 per page