Microsoft JScript runtime error: 'MiniProfiler' is undefined

Hi There,

I am using MiniProfiler.MVC for MVC4, but I am getting following error.

ERROR: Microsoft JScript runtime error: ‘MiniProfiler’ is undefined

I have already put

@StackExchange.Profiling.MiniProfiler.RenderIncludes();

into _Layout.cshtml.

Is there anything that I am missing??? Please help me. Thank you.

I found a solution for this error in http://odetocode.com/Blogs/scott/archive/2012/09/11/elmah-and-miniprofiler-in-asp-net-mvc-4.aspx

I forgot to put handler in my web.config

<system.webServer>
  ...
  <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" 
         type="System.Web.Routing.UrlRoutingModule"
         resourceType="Unspecified" 
         preCondition="integratedMode" />
  </handlers>
</system.webServer>

After that everything is working in MVC 4.

have not seen this, can you include a screenshot of your network tab in chrome, are there any errors there

I have a same error too.