mvc-mini-profiler

MVC Mini Profiler on IIS 6

纵饮孤独 提交于 2019-11-30 11:14:39
Has anyone been able to get the MVC mini profiler working on IIS 6? I've set up the profiler in my application and it works perfectly in Visual Studio, IIS Express and IIS 7.5 but when I put the exact same application onto IIS 6 it won't work. The problem seems to be around loading /mini-profiler-includes.js, I just get a 404 response. I've checked the route table and the correct routes have been registered by the profiler but apart from that I'm not sure what else to try. On IIS 7, ASP.NET by default runs in integrated mode so the ASP.NET runtime will handle all requests, however on IIS 6 ASP

Slow EF profiling performance with mvc-mini-profiler

为君一笑 提交于 2019-11-30 09:12:19
When I create my context using the below function the profiler shows about a 300ms increase from the standard EF (version 4) context creation method. Is there another way to do this that has better performance? It defeats the purpose of performance profiling as is. public static Models.MyEntities GetContext() { var profiler = MiniProfiler.Current; var sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString); var profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(sqlConn, profiler); return ObjectContextUtils.CreateObjectContext<Models

Using MiniProfiler with MVC 5

筅森魡賤 提交于 2019-11-30 08:42:05
Edit Got the answer here So I wanted to check out MiniProfiler to troubleshoot some performance issues. Before using it on production code I wanted to try it out with the a sample so went ahead with creating a MVC 5 application. This is plain vanilla app that gets created with the template. Added this code in the Index() method of HomeController: var profiler = MiniProfiler.Current; using (profiler.Step("Set page title")) { ViewBag.Title = "Home Page"; } using (profiler.Step("Doing complex stuff")) { using (profiler.Step("Step A")) { // something more interesting here Thread.Sleep(100); }

Getting MVC mini-profiler timings into async tasks

∥☆過路亽.° 提交于 2019-11-30 07:38:14
I have a long running SQL query inside a page that I've sped up by using an async task: using System.Threading.Tasks; ... var asyncTask = new Task<ResultClass>( () => { using (var stepAsync = MiniProfiler.Current.Step("Async!")) { // exec long running SQL } }); asyncTask.Start(); // do lots of other slow stuff ResultClass result; using (var stepWait = MiniProfiler.Current.Step("Wait for Async")) { result = asyncTask.Result; } (Note that this syntax will be a lot nicer once C# 5 comes out with async and await ) When using MVC mini profiler I get the timing for "Wait for Async", but I can't get

MvcMiniProfiler Unable to cast object of type EFProfiledDbConnection

耗尽温柔 提交于 2019-11-30 05:45:38
问题 I am trying to integrate MvcMiniProfiler to my asp.net mvc+entity framewok project. Everything is ok for the first time web request but it is giving exception at the other requests. My Project is MVC 3 Entity Framework 4.1 (DatabaseFirst + POCO Generator DbContext) MvcMiniProfiler.dll 1.9.0.0 MvcMiniProfiler.EntityFramework.dll 1.9.1.0 I install MvcMiniProfiler from Nu-Get Added below to global.asax protected void Application_BeginRequest() { if (Request.IsLocal) { MvcMiniProfiler

Using Mini-Profilier with EF 4.3 & MVC 4 without creating the database

99封情书 提交于 2019-11-30 04:39:28
I have an issue where we are using EF 4.3 Code First against an existing database. I want to use the Mini-Profiler with EF and call MvcMiniProfiler.MiniProfilerEF.Initialize(); However, since we don't actually create any of the tables, the dbo.__MigrationHistory and dbo.EdmMetadata tables do not exist. The profiler ends up crashing because they don't exist. Is there any way to make the profiler ignore these EF Code First specific tables? Thanks! EDIT: These are the exceptions I get: (They come separately) Invalid object name 'dbo.__MigrationHistory'. at System.Data.SqlClient.SqlConnection

MiniProfiler with EF “model first” edmx model

99封情书 提交于 2019-11-30 03:53:44
I'm trying to get MiniProfiler to profile my database access but I'm running into problems. All the help I see out there seems to be for "code first" entity framework connections. My model was designed before the code first update was available this year and I used the designer to create the edmx model. (I've been using this for almost a year and it seems to be working for me) The example on the MiniProfiler documentation site doesn't make sense to me. I've tried a few variations of it but I'm having problems. My Model is called CYEntities, normally to instantiate an ObjectContext I just do

How to hook up SqlDataAdapter to profile db operations with mvc mini profiler

给你一囗甜甜゛ 提交于 2019-11-29 15:08:56
I looked up How could I instantiate a Profiled DataAdapter to use with MVC MINI PROFILER? but this also did not answer my question. I have some code like this in SqlDatasource class - protected SqlCommand sqlCommand; public SqlDatasource(String query, String connectionString) : this(connectionString) { this.sqlCommand.CommandText = query; } public DataTable getResults() { DataTable table = new DataTable(); SqlDataAdapter adapter = new SqlDataAdapter(this.sqlCommand); SqlCommandBuilder commandBuilder = new SqlCommandBuilder(adapter); adapter.Fill(table); return table; } I want a way to hook

Slow EF profiling performance with mvc-mini-profiler

為{幸葍}努か 提交于 2019-11-29 13:47:40
问题 When I create my context using the below function the profiler shows about a 300ms increase from the standard EF (version 4) context creation method. Is there another way to do this that has better performance? It defeats the purpose of performance profiling as is. public static Models.MyEntities GetContext() { var profiler = MiniProfiler.Current; var sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString); var profiledConnection = MvcMiniProfiler

MvcMiniProfiler results request giving 404 in Asp.Net MVC app

喜欢而已 提交于 2019-11-29 12:21:31
问题 I am trying to use the MvcMiniProfiler in my Asp.Net MVC application. I installed the latest NuGet package and added all the code from the wiki page into Application_BeginRequest() , Application_AuthenticateRequest() and in my view. Upon loading the page, all of the mini profiler's javascript files are being included and correctly downloaded from the server, but when it attempts to get the results Chrome shows: GET http://localhost:59269/mini-profiler-results?id=59924d7f-98ba-40fe-9c4a