Miniprofiler error Asp.net mvc 5

Asked

Viewed 64 times

1

I’m trying to use the Mini-profiler

I made the following configuration:

PM> Install-Package MiniProfiler

PM> Install-Package MiniProfiler.MVC4 (According to the Doc also attends the MVC5)

PM> Install-Package MiniProfiler.EF6

After that, in my View Layout, I put the following render

@StackExchange.Profiling.MiniProfiler.RenderIncludes() //here that surrenders the JS file

In my Global.asax the following configuration:

protected void Application_BeginRequest()
{
    if (Request.IsLocal)
    {
        MiniProfiler.Start();
    } 
}

protected void Application_EndRequest()
{
    MiniProfiler.Stop();
}

and in the Application_Start the following codes:

  ViewEngines.Engines.Clear();
  ViewEngines.Engines.Add(new ProfilingViewEngine(new RazorViewEngine()));

  MiniProfilerEF6.Initialize();

And last I registered a Filter in Filterconfig

  filters.Add(new ProfilingActionFilter());

But when I went to put in my main project, I get the following error in the page, which is the JS loading that is in MiniProfiler.RenderIncludes() as shown above in the settings.

Well, it does not load the script completely, causing this error, I do not know the reason, it loads the JS only by half.

Uncaught Syntaxerror: Unexpected end of input

On my Web.Config, within the system.webserver>handlers I also put the following:

   <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
  • How is the JS file? What other modifications have you made to the project to work?

  • @Ciganomorrisonmendez, I edited my question, is now complete with the step by step I did, in another test app I had done, it worked all right that

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.