From d1981c903d9fb779d18c581f76bacee30c03474b Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 21 Oct 2015 22:24:51 -0400 Subject: [PATCH] fix appinsights --- src/DotNetMashup.Web/Startup.cs | 10 +++++----- src/DotNetMashup.Web/config.json | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/DotNetMashup.Web/Startup.cs b/src/DotNetMashup.Web/Startup.cs index 4160dfa..6e818ab 100644 --- a/src/DotNetMashup.Web/Startup.cs +++ b/src/DotNetMashup.Web/Startup.cs @@ -73,14 +73,14 @@ namespace DotNetMashup.Web { // Add Error handling middleware which catches all application specific errors and // send the request to the following path or controller action. - app.UseExceptionHandler("/Home/Error"); + app.UseExceptionHandler("/Home/Error") + .UseApplicationInsightsRequestTelemetry() + .UseApplicationInsightsExceptionTelemetry(); } // Add static files to the request pipeline. - app.UseStaticFiles(); - - // Add MVC to the request pipeline. - app.UseMvc(routes => + app.UseStaticFiles() + .UseMvc(routes => { routes.MapRoute( name: "default", diff --git a/src/DotNetMashup.Web/config.json b/src/DotNetMashup.Web/config.json index 2525f3c..7a73a41 100644 --- a/src/DotNetMashup.Web/config.json +++ b/src/DotNetMashup.Web/config.json @@ -1,5 +1,2 @@ { - "ApplicationInsights": { - "InstrumentationKey": "fda37cc5-e36e-4171-94ac-f02f9f1771c9" - } } \ No newline at end of file