2016-06-20 475 views

回答

7

您需要添加"Microsoft.ApplicationInsights.AspNetCore": "1.0.0-rc2-final"project.json,這對您的Startup類:

public void ConfigureServices(IServiceCollection services) 
{ 
    ... 
    // Add framework services. 
    services.AddApplicationInsightsTelemetry(Configuration); 
    ... 
} 

public void Configure(IApplicationBuilder app) 
{ 
     ... 
     app.UseApplicationInsightsRequestTelemetry(); 
     app.UseApplicationInsightsExceptionTelemetry(); 

     ... 
     app.UseMvc(); 
} 
+0

什麼是 「localizationOptions」 在這裏? –

+0

它是'RequestLocalizationOptions',但與問題無關。我會刪除它。 – Tseng