The MongoDB C# Driver is the 10gen-supported C# / .NET driver for MongoDB.

learn more… | top users | synonyms (1)

3
votes
0answers
185 views

MongoDB and Multiple C# Client Threads

I have a single primary instance of a MongoDB to connect to. I am using the C# driver (latest revision) to connect and utilise MongoDB. My client application is multi-threaded whereby processes will ...
2
votes
0answers
46 views

Properly using / handling DateTimeOffset in MongoDB

public class ScheduledEvent : Event { public DateTimeOffset StartDateTime { get; set; } } StartDateTime = 5/27/2013 2:09:00 AM +00:00 representing 05/26/2013 07:09 PM PST What's recorded in ...
1
vote
0answers
17 views

Iterating MongoDB cursor blocks forever

I'm using the MongoDB C# driver 1.8.1.20 with Mongo 2.4.3. I use the following infinite loop to poll new messages from a capped collection and process them as they come (with a tailable cursor and ...
1
vote
0answers
16 views

MongoDB with paged result set sorted by distance

I have a large collection of events and am wondering if there is any way to sort them by distance in a paged fashion. I am using the geoWithin operater to find events within a certain radius but need ...
1
vote
0answers
25 views

Bitwise enum (flags) query using MongoDB's official C# driver

When I try to run a LINQ query of the form: MongoCollection<MyEntity> collection; collection.AsQueryable().Where(entity => (entity.Flags & MyFlags.AFlag) != MyFlags.None); I get ...
1
vote
0answers
41 views

Any official MongoDb session state provider available for C# .NET

I am just looking for session state provider for .net with MongoDb, actually i do not find any official Nuget packages, or better reliable production quality one. Please advice if we have any ...
1
vote
0answers
157 views

Why does sending files from GridFS via MVC4 take so much time?

I want to send images stored in MongoDB using GridFS via a MVC4 Web app to the browser via my LAN environment, but it take ~500ms until the image is sent to the browser. Google Chrome network ...
1
vote
0answers
65 views

C# MongoDB “Near” Query

I have a mongo collection that look like that: { "_id": { "$oid": "50e9f38fbd7680c8090bcb4" }, "guid": "D3G5wQ8RZL", "lat": 37.503287248864, "lng": -121.97620341421, } I want to preform "NEAR" ...
1
vote
0answers
126 views

Integrating Autofac and MongoDB C# driver

.NET 4.0 latest autofac version and latest C# driver We are in the process of integrating the Autofac DI container into our MongoDB app and things have been going swimmingly with one exception which ...
1
vote
0answers
93 views

Connection to remote host MongoDB breaks after a certain number of inserts to the collection

I have my Mongo DB v2.1.2 hosted on remote server. After inserting 58070 records i am getting the following message exception more often Message = "A transport-level error has occurred when sending ...
1
vote
0answers
74 views

How to duplicate/clone a database in MongoDB with C#

At some events, I want to call a function, that should make a copy of the database and save it as a new MongoDB database with it's name as current Date time. I just need the C# syntax to ...
1
vote
0answers
273 views

MongoDB C# Socket Exceptions in IIS 7.0 Web Garden (Ex: Only one usage of each socket address (protocol/network address/port) is normally permitted)

I have an ASP MVC app using the 10gen Mongo C# driver (github) to connect to a database server on a specific port. I have this deployed in an IIS 7.0 web garden with 3 worker processes. Every few ...
1
vote
0answers
649 views

C# Mongodb get cursor count

I am trying to find out if a document exists in a collection using the code below. Whenever the query doesn't find any documents I get a StackOverflowException. What am I doing wrong with this? ...
0
votes
0answers
17 views

use safe cast (as) with mongoDb C# driver and linq

I'm attempting to use Odata and web-api with mongoDb. The web-api library applies linq queries across an IQueryable in order to query it. One of the queries I'm required to support involves a cast. ...
0
votes
0answers
18 views

MongoDb C# normal property to versioned property automatically

I have this implementation of versioned property public class VersionedProperty<T>: Dictionary<int, T>, IParentEntityTracker //where T:IComparable<T> { [BsonIgnore] public ...

1 2 3 4 5 9
15 30 50 per page