# MiniProfiler + EfProf doesn't work

**URL:** <https://community.miniprofiler.com/t/miniprofiler-efprof-doesnt-work/239>\
**Category:** .NET\
**Created:** [March 14, 2014, 1:04pm UTC](https://community.miniprofiler.com/t/miniprofiler-efprof-doesnt-work/239 "2014-03-14T13:04:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fujiy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/fujiy/32/969_2.png) [@Fujiy](https://community.miniprofiler.com/u/Fujiy)\
**Post date:** [March 14, 2014, 1:04pm UTC](https://community.miniprofiler.com/t/miniprofiler-efprof-doesnt-work/239/1 "2014-03-14T13:04:09Z")

</div>

I am using MiniProfiler beta6 + MiniProfiler.EF6 beta 4 + EfProf 2.0.2233.0. When EFProf is active, MiniProfiler generates this error:

Unable to define EFProfiledDbProviderServices class of type ‘ProfiledDbProviderServices’. Please check that your web.config defines a section underneath.

MiniProfiler is trying to access the Instance field/property of class ProfiledDbProviderServices. What doesn´t exists.

MiniProfiler.EF6 uses the old interception method with reflection or the new Interception/Log API?

If using the old method, maybe you need to unwrap ProviderServices in loop, until find the real one. For example in MiniProfilerEF6, WrapProviderService method. If I register MiniProfiler first, it works. The problem is, EFProf by default register it using WebActivator, what happens first

---

<div class="post-metadata">

**Author:** ![Yaakov\_Ellis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/yaakov_ellis/32/961_2.png) [@Yaakov\_Ellis](https://community.miniprofiler.com/u/Yaakov_Ellis)\
**Post date:** [March 17, 2014, 7:25pm UTC](https://community.miniprofiler.com/t/miniprofiler-efprof-doesnt-work/239/2 "2014-03-17T19:25:57Z")

</div>

Interesting. We would be happy to receive a [Pull Request](https://github.com/MiniProfiler/dotnet/pulls) that would fix the problem for EfProf (keeping it working for non-EfProf as well, of course).

---

<div class="post-metadata">

**Author:** ![Fujiy](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/fujiy/32/969_2.png) [@Fujiy](https://community.miniprofiler.com/u/Fujiy)\
**Post date:** [March 27, 2014, 2:11am UTC](https://community.miniprofiler.com/t/miniprofiler-efprof-doesnt-work/239/3 "2014-03-27T02:11:28Z")

</div>

_Its hard to use this forums (I cant reply at another post, cant post links, cant add image…)_

I sent the pull request

[github.com/MiniProfiler/dotnet/pull/44](http://github.com/MiniProfiler/dotnet/pull/44)

Image: [blog.fujiy.net/Upload/Post10210/example.png](http://blog.fujiy.net/Upload/Post10210/example.png)
