Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:31:27+00:00 2026-06-04T03:31:27+00:00

I have an MVC 4 project using EF 5 Code First. I am trying

  • 0

I have an MVC 4 project using EF 5 Code First. I am trying to install MiniProfile at no avail.

I pulled MiniProfiler 2.0.1 and MiniProfiler.EF 2.0.2 from NuGet, added the following on the Global.asax.cs:

protected void Application_Start()
{
    MiniProfilerEF.Initialize(); 
}

Immediately upon run, I get this error:

The provider did not return a DbSpatialServices instance.

Line 58:   if (user != null)
Line 59:   {
Line 60:>>>    if (user.Places != null)
Line 61:       {
Line 62:            var place= user.Places .OrderByDescending(x => x.CreationTime).FirstOrDefault();

[ProviderIncompatibleException: The provider did not return a DbSpatialServices instance.]
   System.Data.Common.DbProviderServices.GetDbSpatialDataReader(DbDataReader fromReader, String manifestToken) +62
   System.Data.Common.DbProviderServices.GetSpatialDataReader(DbDataReader fromReader, String manifestToken) +101
   System.Data.Spatial.SpatialHelpers.CreateSpatialDataReader(MetadataWorkspace workspace, DbDataReader reader) +70
   System.Data.Common.Internal.Materialization.Shaper.CreateSpatialDataReader() +12
   System.Data.Common.Utils.Singleton`1.get_Value() +25
   System.Data.Common.Internal.Materialization.Shaper.<GetSpatialPropertyValueWithErrorHandling>b__d(DbDataReader reader, Int32 column) +12
   System.Data.Common.Internal.Materialization.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal) +149
   System.Data.Common.Internal.Materialization.Shaper.GetSpatialPropertyValueWithErrorHandling(Int32 ordinal, String propertyName, String typeName, PrimitiveTypeKind spatialTypeKind) +269
   lambda_method(Closure , Shaper ) +942
   System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly(Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) +239
   lambda_method(Closure , Shaper ) +221
   System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) +163
   System.Data.Common.Internal.Materialization.SimpleEnumerator.MoveNext() +88
   System.Data.Objects.DataClasses.RelatedEnd.Merge(IEnumerable`1 collection, MergeOption mergeOption, Boolean setIsLoaded) +222
   System.Data.Objects.DataClasses.EntityCollection`1.Load(List`1 collection, MergeOption mergeOption) +218
   System.Data.Objects.DataClasses.EntityCollection`1.Load(MergeOption mergeOption) +25
   System.Data.Objects.DataClasses.RelatedEnd.Load() +37
   System.Data.Objects.DataClasses.RelatedEnd.DeferredLoad() +300
   System.Data.Objects.Internal.LazyLoadBehavior.LoadProperty(TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject) +85
   System.Data.Objects.Internal.<>c__DisplayClass7`2.<GetInterceptorDelegate>b__1(TProxy proxy, TItem item) +105
   System.Data.Entity.DynamicProxies.User_C006B0EF9498157C70250EEE038C6BEADB719A2D5BDC4AA1FB567FB579AECEB5.get_Places() +55
   Project.Web.Controllers.PlaceController.Ribbon() in c:\Project\Project.Web\Controllers\PlaceController.cs:60
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +204
   System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +30
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +45
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +47
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +42
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +54
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +44
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +9
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__4(IAsyncResult asyncResult) +25
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +47
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +22
   System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +10
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +27
   System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +64
   System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +71
   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1121

I have a couple of DbGeography types in my Places POCO.

public class Places 
{
    public Guid PlacesId { get; set; }
    ...
    public DbGeography Location { get; set; }
    public DbGeography Area { get; set; }
    ...
}

I have tried searching for that error but it does not show up in google anywhere.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:31:28+00:00Added an answer on June 4, 2026 at 3:31 am

    This looks like a bug in MiniProfiler, it should be reported at: http://community.miniprofiler.com

    In particular profiling EF is very tricky, a lot of the work is done by wrapping every “provider” it uses. It seems that EFProfiledDbProviderFactory needs some special logic to locate, intercept and wrap the spatial services.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a project in MVC 3 using code first and nugget ,
I am using MVC-Viewmodel, EF model first on my project. I have 3 DropDonLista
Im using MVC-Viewmodel, EF Model first on my project. I have a foreach loop
I'm trying to create a many-to-many relationship using EF code first in my MVC
Trying to get my first MVC + EF code first project to run. The
I'm using Entity Framework 4 Code First in my .net MVC 2.0 project and
I'm using EF 4.1 and code-first in an MVC project, and AutoMapper to map
I'm using .NET MVC 3 Code-First approach. My domain have a entity called Question
I am working on a project in ASP.NET MVC using EF4 Code-First for the
I have a problem when i using Mschart on my MVC project, when i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.