title: Why doesn't miniprofiler work as described?
body: <p>MiniProfiler is not working too well for me.  Even installation was broken, and had to be fixed with the aid of <a href="https://stackoverflow.com/a/27027301/3954464">an answer to another question here</a>.</p>
  
  <p>I have two problems below.</p>
  
  <p>I followed all the installation steps on the website.. as follows copying from my code.</p>
  
  <p>These things have been altered (global.asax):</p>
  
  <pre><code>... Application_Start ...
    MiniProfilerEF6.Initialize();
    ....
    MiniProfiler.Settings.Results_List_Authorize = IsUserAllowedToSeeMiniProfilerUI;
    MiniProfiler.Settings.Results_Authorize = IsUserAllowedToSeeMiniProfilerUI;
  ...
  </code></pre>
  
  <p>And this (layout file):</p>
  
  <pre><code>...
  @MiniProfiler.RenderIncludes()
  &lt;/body&gt;
  ...
  </code></pre>
  
  <p><strong>Problem 1:</strong></p>
  
  <p>The MiniProfilerEF6.Initialize() call throws an exception.</p>
  
  <pre><code>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&amp; 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&amp; 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&amp; 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.&lt;Reader&gt;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)
  </code></pre>
  
  <p><strong>Problem 2:</strong></p>
  
  <p>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):</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Why doesn't miniprofiler work as described?</p>