mvc-mini-profiler

How to configure mvc mini profiler with Linq to SQL?

醉酒当歌 提交于 2019-11-28 04:47:47
问题 I have configured mini profiler with asp.net mvc application. I also want to profile my db so I hooked it with L2S datacontext as in this example. It is working fine for some queries but on other queries I find null reference exception. When I attached the source code to debug I found out that internal void AddSqlTiming(SqlTiming stats) { Head.AddSqlTiming(stats); } Head Property in above method is null in MiniProfiler.cs at line 198. Any idea why? EDIT: Following method returns me the

Mini profiler upgrade from 1.7 to 1.9 breaks existing code

半世苍凉 提交于 2019-11-28 00:05:10
问题 I have a asp.net project that uses mvc-mini-profiler. I was using version 1.7 of the NuGet package and I noticed that there is an updated package whose version is 1.9. I updated the package and now my code no longer compiles. The code that fails to compile is: public static T GetProfiledContext<T>() where T : System.Data.Objects.ObjectContext { var conn = GetStoreConnection<T>(); if (_enableProfiling) { conn = ProfiledDbConnection.Get(conn); } return ObjectContextUtils.CreateObjectContext<T>

ASP.NET Compiler complaining of mismatching framework versions with MiniProfiler

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 21:55:38
I have an MVC3 project that I upgraded from VS2010 to VS2012. The project also has a reference to MiniProfiler . Our application compiles and runs fine in VS2012 without any warnings/errors. Both assemblies load fine when running with IIS Express. When using the ASP.NET Compiler tool, however, I get the following warning: Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.17929 Utility to precompile an ASP.NET application Copyright (C) Microsoft Corporation. All rights reserved. (0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than

MiniProfiler not showing up on asp.net MVC

折月煮酒 提交于 2019-11-27 20:41:36
问题 I added this to my Global.asax.cs: protected void Application_BeginRequest() { if (Request.IsLocal) { MiniProfiler.Start(); } } protected void Application_EndRequest() { MiniProfiler.Stop(); } I added @MiniProfiler.RenderIncludes() just below the </body> tag in _Layout.cshtml. In my controller I'm using: public class HomeController : Controller { public ActionResult Index() { var profiler = MiniProfiler.Current; // it's ok if this is null using (profiler.Step("Set page title")) { ViewBag

MvcMiniProfiler profiling web app and lower layers

邮差的信 提交于 2019-11-27 20:34:20
问题 I have MiniProfiler set up and working in my ASP.NET MVC app. My controllers make calls via WCF to a BLL which in turn talks to the database. I would like to see profiling from the WCF service alongside the existing profiling I see from the web app. Is it a case of making MiniProfiler a parameter in all service calls? 回答1: In a recent release of the MvcMiniProfiler they added WCF support (version 1.8 or greater). This is a 3 step process to get this working: Add References First add

MvcMiniProfiler on EF 4.1 Code-First project doesn't profile SQL

。_饼干妹妹 提交于 2019-11-27 18:12:32
I have version 1.6 of the MvcMiniProfiler referenced (via Nuget) and have set everything up as described on the project homepage at http://code.google.com/p/mvc-mini-profiler/ . I have the following code in the Web.config: <system.data> <DbProviderFactories> <remove invariant="MvcMiniProfiler.Data.ProfiledDbProvider" /> <add name="MvcMiniProfiler.Data.ProfiledDbProvider" invariant="MvcMiniProfiler.Data.ProfiledDbProvider" description="MvcMiniProfiler.Data.ProfiledDbProvider" type="MvcMiniProfiler.Data.ProfiledDbProviderFactory, MvcMiniProfiler, Version=1.6.0.0, Culture=neutral, PublicKeyToken

Mini MVC profiler: appears to be displaying profile times for every static resource

不羁的心 提交于 2019-11-27 12:03:45
问题 I've just started using the mvc-mini-profiler (http://code.google.com/p/mvc-mini-profiler/) and I think it's awesome. However, I'm getting some odd behaviour while using it. I've got an ASP.NET Webforms site running on IIS7.5 and for some reason when I load a page with the profiler enabled, I not only get a time measurement for the aspx page, but I also get it for random css and js resources on the page. The aspx profile works correctly, with the SQL query also being profiled correctly.

Running MiniProfiler with runAllManagedModulesForAllRequests set to false

天涯浪子 提交于 2019-11-27 09:57:37
问题 Recently we upgraded to MiniProfiler version 2.0.1 from v1.7, and since then we have not been able to use it in our MVC3 website because when it tries to get its resources, it instead gets a 404. An example resource call is: /mini-profiler-resources/includes.js?v=tNlJPuyuHLy/d5LQjyDuRbWKa0weCpmO3xkO6MH4TtA= In searching around, most people are suggesting that simply setting runAllManagedModulesForAllRequests should be set to true . For giggles, I went ahead and set it to true, and yes it did

How can I make the ASP.NET MVC mini profiler work with Linq 2 SQL?

岁酱吖の 提交于 2019-11-27 02:09:16
问题 The ASP.NET MVC Mini Profiler looks awesome, but I don't get the Linq 2 SQL usage example. This is the Linq2SQL example from the profiler documentation: partial class DBContext { public static DBContext Get() { var conn = ProfiledDbConnection.Get(GetConnection()); return new DBContext(conn); // or: return DataContextUtils.CreateDataContext<DBContext>(conn); } } How do I use this in my actual application? I would have expected some kind of wrapper around my DataContext, but this seems to work

ASP.NET Compiler complaining of mismatching framework versions with MiniProfiler

微笑、不失礼 提交于 2019-11-26 20:49:54
问题 I have an MVC3 project that I upgraded from VS2010 to VS2012. The project also has a reference to MiniProfiler . Our application compiles and runs fine in VS2012 without any warnings/errors. Both assemblies load fine when running with IIS Express. When using the ASP.NET Compiler tool, however, I get the following warning: Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.17929 Utility to precompile an ASP.NET application Copyright (C) Microsoft Corporation. All rights reserved. (0):