Missing Method Exception : Method not found: 'System.TimeSpan, MongoDB.Driver.Core.Configuration.ServerSettings.get_DefaultHeartbeatInterval()'.

625 views
Skip to first unread message

Taz Uddin

unread,
Nov 22, 2016, 10:45:13 AM11/22/16
to mongodb-csharp
I'm getting this 'Missing method exception' which I have no idea of. Anybody have any ? 

Robert Stam

unread,
Nov 22, 2016, 11:19:42 AM11/22/16
to mongodb...@googlegroups.com
Which version of the driver are you using?

Can you provide a stack trace?

On Tue, Nov 22, 2016 at 10:45 AM Taz Uddin <getl...@gmail.com> wrote:
I'm getting this 'Missing method exception' which I have no idea of. Anybody have any ? 

--
You received this message because you are subscribed to the Google Groups "mongodb-csharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-cshar...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Taz Uddin

unread,
Nov 22, 2016, 11:35:45 AM11/22/16
to mongodb-csharp
Hello Robert, 

Thanks for your reply, I am using 2.3.0 stable version and .Net version 4.6.1 

here is my stack trace : 

{
  "Message": "An error has occurred.",
  "ExceptionMessage": "Method not found: 'System.TimeSpan MongoDB.Driver.Core.Configuration.ServerSettings.get_DefaultHeartbeatInterval()'.",
  "ExceptionType": "System.MissingMethodException",
  "StackTrace": "   at MongoDB.Driver.MongoUrlBuilder..ctor()\r\n   at MongoDB.Driver.MongoUrl..ctor(String url)\r\n   at MongoDB.Driver.MongoClient..ctor(String connectionString)\r\n   at ClipRecruitment.Domain.DbContext.get_Jobs() in E:\\VisualStudio2015\\Projects\\cliprecruitment\\ClipRecruitment.Domain\\DbContext.cs:line 23\r\n   at ClipRecruitment.Common.Services.CommonService.GetPositions(String inputString) in E:\\VisualStudio2015\\Projects\\cliprecruitment\\ClipRecruitment.Common\\Services\\CommonService.cs:line 32\r\n   at ClipRecruitment.Web.Controllers.JobController.GetPositions(String inputString) in E:\\VisualStudio2015\\Projects\\cliprecruitment\\ClipRecruitment.Web\\Controllers\\JobController.cs:line 140\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}

Robert Stam

unread,
Nov 22, 2016, 2:20:22 PM11/22/16
to mongodb...@googlegroups.com
Perhaps you have multiple projects that use the MongoDB driver and the projects are not all using the same version of the driver?

One thing you could try is to drop all references to the MongoDB driver and add them back making sure they are all referring to the same version.

To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-csharp+unsubscribe@googlegroups.com.

Taz Uddin

unread,
Nov 23, 2016, 2:20:03 AM11/23/16
to mongodb-csharp
I did exactly same....and it worked!


Thanks Robert.

Robert Stam

unread,
Nov 24, 2016, 10:38:19 AM11/24/16
to mongodb...@googlegroups.com
Glad you got it working and things for letting me know.

To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-csharp+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages