Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

426
Views
.NET en OSX (Mono): no se puede conectar a MongoDB

Estoy desarrollando un servicio tranquilo con Visual Studio para Mac. Para conectarme a mi instancia local de MongoDB (que está en funcionamiento), instalé el paquete MongoDB NuGet. Las clases se referencian correctamente en el código, sin embargo, una vez que intento realizar una conexión, responde con el siguiente error:

 { "Message": "An error has occurred.", "ExceptionMessage": "An error occurred when trying to create a controller of type 'BalanzaController'. Make sure that the controller has a parameterless public constructor.", "ExceptionType": "System.InvalidOperationException", "StackTrace": " at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create (System.Net.Http.HttpRequestMessage request, System.Web.Http.Controllers.HttpControllerDescriptor controllerDescriptor, System.Type controllerType) [0x000f3] in <f99f496cb0d249c1a945c1fcabce1695>:0 \n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController (System.Net.Http.HttpRequestMessage request) [0x00028] in <f99f496cb0d249c1a945c1fcabce1695>:0 \n at System.Web.Http.Dispatcher.HttpControllerDispatcher+<SendAsync>d__1.MoveNext () [0x000a9] in <f99f496cb0d249c1a945c1fcabce1695>:0 ", "InnerException": { "Message": "An error has occurred.", "ExceptionMessage": "ntdll.dll", "ExceptionType": "System.DllNotFoundException", "StackTrace": " at (wrapper managed-to-native) Interop+NtDll:RtlGetVersion (Interop/NtDll/RTL_OSVERSIONINFOEX&)\n at Interop+NtDll.RtlGetVersion () [0x0001a] in <f13660f89d0d419fba4e315693dd26ea>:0 \n at System.Runtime.InteropServices.RuntimeInformation.get_OSDescription () [0x00007] in <f13660f89d0d419fba4e315693dd26ea>:0 \n at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateOSDocument () [0x00042] in <2c531fdd26874b5eb450bd126d409101>:0 \n at System.Lazy`1[T].CreateValue () [0x00075] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/Lazy.cs:437 " } }

De alguna manera falla al ubicar el archivo dll correcto (o su correspondiente en el entorno Mono).

¿Cómo puedo arreglarlo?

Gracias

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Obtuve exactamente la misma excepción en Raspberry PI 3 (ARMV7) usando el compilador Mono JIT versión 4.6.2. La degradación de los controladores MongoDB C# de 2.4.X a 2.3.0 me resolvió el problema.

También hay un problema abierto aquí: https://jira.mongodb.org/browse/CSHARP-1875

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!