mvc-mini-profiler

How could I instantiate a Profiled DataAdapter to use with MVC MINI PROFILER?

左心房为你撑大大i 提交于 2019-12-04 04:57:56
问题 None of the Command objects have Fill methods, but in the former way I was doing I could instantiate a new OracleDataAdapter. How could I instantiate a Profiled DataAdapter to profile my database activity with MVC MINI PROFILER? All I need is to use the Fill command with the profiled connection of MVC mini Profiler. [ UPDATE ] I think many must have done that before, unless they are using Entity Framework, which works nice and easy. In my case the query is loaded dynamically into a Datatable,

mvc mini profiler (1.4) & IIS

旧街凉风 提交于 2019-12-04 03:46:25
问题 The solution works great with cassini but as soon as I make it run into IIS (7.5 on Windows 7 / 64), it stops working. All js & css file are never downloaded and the script fails. I looked into the MiniProfilerHanler , the GetHttpHandler method is called for each required js & css but the ProcessRequest method never runs. The same behavior is observed using the sample.mvc project that goes along with the mini profiler sources. 回答1: this is an older question but if you are still trying to get

Mvc-Mini-Profiler v1.7 on EF 4.1 Code-First project doesn't profile SQL

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 03:41:39
问题 I setup MiniProfiler.MVC3 - 1.7 package in my project yesterday. The Controller and view profiling is working fine, but the peice I'm really interested in is the SQL Profiling. I have not been able to get this to work. I'm using EF Code First with a SQL 2008 database. I have followed all the suggestions in this post .. mvcminiprofiler-on-ef-4-1-code-first-project-doesnt-profile-sql In the miniprofiler.cs i have my SQL connection setup as... var factory = new SqlConnectionFactory

How do you use the mvc-mini-profiler with Entity Framework 4.1

╄→尐↘猪︶ㄣ 提交于 2019-12-04 02:30:19
I am trying to use the mvc-mini-profiler with MVC3 and keep getting the following error Unable to determine the provider name for connection of type 'MvcMiniProfiler.Data.ProfiledDbConnection' Below is the code that I am using to try and instatiate my Context. DbConnection conn = new MySqlConnection( ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString); var profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(conn); return new DB(profiledConnection); And here is the DB Context Class. public class DB:DbContext, Stats.Data.IDB { public DB(DbConnection conn) : base

MVC Mini Profiler includes not respecting application's path

只愿长相守 提交于 2019-12-04 01:41:55
I've got the MVC Mini Profiler set up as described on its project page , and the includes are indeed being written on the page. Problem is, my application sits at http://localhost:8080/web , and the markup written by the profiler includes looks like this: <link rel="stylesheet/less" type="text/css" href="/mini-profiler-includes.less?v=2.0.4177.17902"> <script type="text/javascript" src="/mini-profiler-includes.js?v=2.0.4177.17902"></script> <script type="text/javascript"> jQuery(function() { MiniProfiler.init({ id:'fb4dc30e-c1aa-4be6-902c-ef2812dd1fe2', renderDirection:'left' }); } ); </script

ASP.NET MVC MiniProfiler and EntityFramework 6 Initialization

假装没事ソ 提交于 2019-12-04 00:43:47
问题 I have a similar issue in that after loading MiniProfiler and MiniProfiler.EnitiyFramework6 I have this issue. MiniProfiler runs fine, but when I add to my Applcation_Start in Global.asax MiniProfilerEF6.Initialize(); I get this: An exception of type 'System.IO.FileLoadException' occurred in MiniProfiler.EntityFramework6.dll but was not handled in user code Additional information: Could not load file or assembly 'MiniProfiler, Version=3.0.11.0, Culture=neutral, PublicKeyToken=b44f9351044011a3

Mini Profiler does not render scripts

妖精的绣舞 提交于 2019-12-04 00:20:54
问题 I've added Mini Profiler through NuGet and though in a really simple project works lovely , this is a big and existing project, and of course that I'm getting some problems with it :( it writes the correct script tags in the source code as <link rel="stylesheet" type="text/css" href="/mini-profiler-includes.css?v=1.9.0.0"> <script type="text/javascript"> if (!window.jQuery) document.write(unescape("%3Cscript src='/mini-profiler-jquery.1.6.2.js' type='text/javascript'%3E%3C/script%3E")); if (

Using mvc-mini-profiler

最后都变了- 提交于 2019-12-04 00:18:51
I'm trying to use the mvc-mini-profiler with EFCodeFirst I'm creating a DbProfiledConnection and passing it to the DbContext on construction as below. The application continues to work as expected by the sql is not exposed to the Profiler. public class WebContext : DbContext { static DbConnection _connection = new SqlConnection(ConfigurationManager.ConnectionStrings["WebContext"].ConnectionString); static DbConnection _profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(_connection); public WebContext() : base(_profiledConnection, true) { } oops my bad. I've modified it so that

Using mvc-mini-profiler with EF 4.0 and Ninject

蓝咒 提交于 2019-12-03 13:12:14
问题 I'm trying to use the new mvc-mini-profiler with my EF4 based app, but I have no idea how to properly get a connection to my destination datasource. Here's as far as I have gotten. Func<IMyContainer> createContainer = () => { var profiler = MiniProfiler.Current; if (profiler != null) { var rootConn = // ???? var conn = ProfiledDbConnection.Get(rootConn); return ObjectContextUtils.CreateObjectContext<MyContainer>(conn); } else { return new MyContainer(); } }; kernel.Bind<IMyContainer>()

Getting more “granularity” from the MVC Mini Profiler

≯℡__Kan透↙ 提交于 2019-12-03 09:24:55
问题 Should this turn out to be useful for anyone, I'll gladly turn it into a community wiki thing. I have some slow pages in an MVC3 app, and since little of the execution time seemed to happen in my code, I wanted to see if I could find out more about what took so long. Not that I succeeded, but I gained a little more wisdom along the way. There is nothing here that isn't obvious to anyone with some MVC experience. Basically, I created my own ActionFilterAttribute that looks like this: public