首页 新闻 会员 周边 捐助

配置MiniProfiler报错,不知道怎么解决,Unable to define EFProfiledDbProviderServices class of type '

1
悬赏园豆:10 [已关闭问题] 关闭于 2017-03-14 13:04
“/”应用程序中的服务器错误。

Unable to define EFProfiledDbProviderServices class of type 'ProfiledDbProviderServices'. Please check that your web.config defines a <DbProviderFactories> section underneath <system.data>.

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.Exception: Unable to define EFProfiledDbProviderServices class of type 'ProfiledDbProviderServices'. Please check that your web.config defines a <DbProviderFactories> section underneath <system.data>.

源错误: 


行 242:            if (info != null) return info;
行 243:
行 244:            var user = userRepo.Entities.FirstOrDefault(t => t.ID == userID);
行 245:
行 246:            this.SetLogin(user, false);

源文件: f:\我的网站\雷人网MVC版\Gouleide\GLD.Service\Admin\UserService.cs    行: 244 

堆栈跟踪: 


[Exception: Unable to define EFProfiledDbProviderServices class of type 'ProfiledDbProviderServices'. Please check that your web.config defines a <DbProviderFactories> section underneath <system.data>.]
   StackExchange.Profiling.Data.EFProfiledDbProviderServices`1..ctor() in d:\Files\GitHub\miniprofiler\dotnet\StackExchange.Profiling.EntityFramework6\EFProfiledDbProviderServices.cs:52
   StackExchange.Profiling.Data.EFProfiledDbProviderServices`1..cctor() in d:\Files\GitHub\miniprofiler\dotnet\StackExchange.Profiling.EntityFramework6\EFProfiledDbProviderServices.cs:24

[TypeInitializationException: “StackExchange.Profiling.Data.EFProfiledDbProviderServices`1”的类型初始值设定项引发异常。]

[TargetInvocationException: 调用的目标发生了异常。]
   System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized) +0
   System.Reflection.RtFieldInfo.UnsafeGetValue(Object obj) +158
   System.Reflection.RtFieldInfo.GetValue(Object obj) +29
   StackExchange.Profiling.EntityFramework6.MiniProfilerEF6.WrapProviderService(DbProviderServices services) in d:\Files\GitHub\miniprofiler\dotnet\StackExchange.Profiling.EntityFramework6\MiniProfilerEF6.cs:78
   System.Data.Entity.Infrastructure.DependencyResolution.WrappingDependencyResolver`1.GetService(Type type, Object key) +123
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +102
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +116
   System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key) +41
   System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService(IDbDependencyResolver resolver, Object key) +105
   System.Data.Entity.Infrastructure.<>c__DisplayClass1.<ResolveManifestToken>b__0(Tuple`3 k) +25
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +84
   System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +89
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +63
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +91
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +227
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +898
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +25
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +77
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +59
   System.Linq.Queryable.FirstOrDefault(IQueryable`1 source, Expression`1 predicate) +61
   GLD.Services.UserService.GetCurrLoginUserInfo() in f:\我的网站\雷人网MVC版\Gouleide\GLD.Service\Admin\UserService.cs:244
   GLD.Web.Common.UIBaseController.OnAuthorization(AuthorizationContext filterContext) in f:\我的网站\雷人网MVC版\Gouleide\GLD.Web.Common\Common\UIBaseController.cs:17
   System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +157
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +1167
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +455
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +42
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +67
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +897
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +711
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +94
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +67
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +575
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +923
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157
虚若影的主页 虚若影 | 初学一级 | 园豆:193
提问于:2017-03-04 14:34
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册