开发者

Configuring MvcMiniProfiler

开发者 https://www.devze.com 2023-03-14 05:45 出处:网络
I\'m trying to configure mvc miniprofiler with my asp.net mvc 3 application. The problem is that I can\'t access MiniProfiler class in my views (I\'m using webforms viewengine). I have tried a few thi

I'm trying to configure mvc miniprofiler with my asp.net mvc 3 application. The problem is that I can't access MiniProfiler class in my views (I'm using webforms viewengine). I have tried a few things

  • Added namespace under page directive in web.config (mai开发者_StackOverflow社区n web.config)
  • Added namespace under page directive in web.config (web.config in views folder)
  • import namespace in view

But when I write

<%var profiler = MiniProfiler.Current;%>

in my view it announces that MiniProfiler does not exist in current context.


Did you include the proper namespace in your views:

<% var profiler = MvcMiniProfiler.MiniProfiler.Current; %>
0

精彩评论

暂无评论...
验证码 换一张
取 消