mirror of
https://github.com/Radarr/Radarr
synced 2024-12-28 19:05:55 +00:00
Fixed issue where signalr and miniprofiler weren't playing nice with each other.
This commit is contained in:
parent
7a3f7bf67c
commit
f651c0e23d
1 changed files with 9 additions and 6 deletions
|
@ -33,11 +33,11 @@ public static void PreStart()
|
||||||
//TODO: Non SQL Server based installs can use other formatters like: new MvcMiniProfiler.SqlFormatters.InlineFormatter()
|
//TODO: Non SQL Server based installs can use other formatters like: new MvcMiniProfiler.SqlFormatters.InlineFormatter()
|
||||||
MiniProfiler.Settings.SqlFormatter = new MvcMiniProfiler.SqlFormatters.SqlServerFormatter();
|
MiniProfiler.Settings.SqlFormatter = new MvcMiniProfiler.SqlFormatters.SqlServerFormatter();
|
||||||
|
|
||||||
//TODO: To profile a standard DbConnection:
|
//TODO: To profile a standard DbConnection:
|
||||||
// var profiled = new ProfiledDbConnection(cnn, MiniProfiler.Current);
|
// var profiled = new ProfiledDbConnection(cnn, MiniProfiler.Current);
|
||||||
|
|
||||||
//TODO: If you are profiling EF code first try:
|
//TODO: If you are profiling EF code first try:
|
||||||
// MiniProfilerEF.Initialize();
|
// MiniProfilerEF.Initialize();
|
||||||
|
|
||||||
//Make sure the MiniProfiler handles BeginRequest and EndRequest
|
//Make sure the MiniProfiler handles BeginRequest and EndRequest
|
||||||
DynamicModuleUtility.RegisterModule(typeof(MiniProfilerStartupModule));
|
DynamicModuleUtility.RegisterModule(typeof(MiniProfilerStartupModule));
|
||||||
|
@ -72,11 +72,14 @@ public void Init(HttpApplication context)
|
||||||
|
|
||||||
if (!EnviromentProvider.IsProduction || ProfilerHelper.Enabled())
|
if (!EnviromentProvider.IsProduction || ProfilerHelper.Enabled())
|
||||||
{
|
{
|
||||||
MiniProfiler.Start();
|
var requestPath = ((HttpApplication)sender).Request.AppRelativeCurrentExecutionFilePath.ToLower();
|
||||||
|
if (!requestPath.StartsWith("~/signalr") && !requestPath.EndsWith("notification/comet"))
|
||||||
|
{
|
||||||
|
MiniProfiler.Start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// TODO: You can control who sees the profiling information
|
// TODO: You can control who sees the profiling information
|
||||||
/*
|
/*
|
||||||
context.AuthenticateRequest += (sender, e) =>
|
context.AuthenticateRequest += (sender, e) =>
|
||||||
|
|
Loading…
Reference in a new issue