All Questions
Tagged with mongodb-atlas c#
19 questions
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
...
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 ...
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 ...
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(...
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 ...
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 ...
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 <> ...
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 ...
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,
...
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 - ...
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 ...
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(&...
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 ...
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 ...
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....