0

MiniProfiler is not working too well for me. Even installation was broken, and had to be fixed with the aid of an answer to another question here.

I have two problems below.

I followed all the installation steps on the website.. as follows copying from my code.

These things have been altered (global.asax):

... Application_Start ...
  MiniProfilerEF6.Initialize();
  ....
  MiniProfiler.Settings.Results_List_Authorize = IsUserAllowedToSeeMiniProfilerUI;
  MiniProfiler.Settings.Results_Authorize = IsUserAllowedToSeeMiniProfilerUI;
...

And this (layout file):

...
@MiniProfiler.RenderIncludes()
</body>
...

Problem 1:

The MiniProfilerEF6.Initialize() call throws an exception.

System.Data.SqlClient.SqlException was unhandled by user code
  Message=Invalid object name 'dbo.EdmMetadata'.
  StackTrace:
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\TeamCity\buildAgent\work\a743336045964cbc\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 246
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c)
       at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
       at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
       at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

Problem 2:

If I disable the non-working database stuff, viewing the pages for the results (in Chrome) shows nothing. Viewing the results index page gives the following in the Chrome console (404 errors in the networking pane):

results-index:3 GET http://localhost/vll/mini-profiler-resources/includes.js?v=ySF6M98CBehTtL86BbiEmys9yxR1HKazhe2sznfdUWQ= 
results-index:4 GET http://localhost/vll/mini-profiler-resources/includes.css?v=ySF6M98CBehTtL86BbiEmys9yxR1HKazhe2sznfdUWQ= 
results-index:6 Uncaught ReferenceError: MiniProfiler is not defined(anonymous function) @ results-index:6

Why doesn't miniprofiler work as described?

Community
  • 1
  • 1
  • You might consider linking to this "other question" which you suggest you needed to use to fix this installation; From the way this question reads, it's not really obvious what the installation problem was, or even if it really is "fixed". You definitely still seem to have something not correct, but without knowing the steps you've taken so far, there isn't any clear solution. – Claies Sep 07 '15 at 03:15
  • I have taken the exact steps listed on the website. The only difference was the detour because of the installation bug. – yourpublicdisplayname Sep 07 '15 at 03:39
  • *what* installation bug? Something to do with your Db settings? It still is not clear if your.installation is valid. – Claies Sep 07 '15 at 04:32
  • I've used MiniProfiler without issue, so I'd suspect something in your configuration isn't right. Did you install it from NuGet? – Tieson T. Sep 07 '15 at 04:50
  • Yes. I followed the install sequence in the linked answer at the top of my question, and then added the quoted bits and pieces. It's a very straightforward process, going by the miniprofiler website. Problem is, it doesn't work for me. – yourpublicdisplayname Sep 07 '15 at 08:54

0 Answers0