In Visudio Studio, the new ASP. NET core can have built-in application Insights. Application insights can help us to apply the performance of the Web application so that we optimize our application, this is step by step.
Code-side
-
new ASP. NET Core project (ASP. NET Core 1.1 version)
650) this.width=650; "title=" Ai1.png "src=" http://s2.51cto.com/wyfs02/M02/8D/59/ Wkiom1iyfnrqdo-haalyulkw9rq031.png-wh_500x0-wm_3-wmp_4-s_2140599624.png "alt=" Wkiom1iyfnrqdo-haalyulkw9rq031.png-wh_50 "/>
Step three configuration settings, you can select your own resource group on Azure.
(note: the current ASP. NET core New project is version 1.0 and can be upgraded to version 1.1 in NuGet)
Set Starup.cs, when the auto-generated application insights a bit of a problem, just need to configure method two applicationinsights related functions to delete (this time these two function hints expire)
Modify the code in _viewimports.cshtml as follows:
@ using Applicationinsightsdemo
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@inject Microsoft.ApplicationInsights.AspNetCore. Javascriptsnippet Javascriptsnippet
Modify _layout.cshtml
put @ html.applicationinsightsjavascript (telemetryconfiguration)
Switch
@ Html.raw (javascriptsnippet.fullscript)
Azure-side
Go to your own Azure portal
-
650) this.width=650; "title=" Ai2.png "src=" http://s4.51cto.com/wyfs02/M02/8D/56/ Wkiol1iyfqiirbutaaqjz4mo5jq849.png-wh_500x0-wm_3-wmp_4-s_4131369035.png "alt=" Wkiol1iyfqiirbutaaqjz4mo5jq849.png-wh_50 "/>
-
View overview
650) this.width=650; "title=" Ai3.png "src=" http://s1.51cto.com/wyfs02/M00/8D/59/ Wkiom1iyfrrc68esaarcbwodjzo639.png-wh_500x0-wm_3-wmp_4-s_2582052664.png "alt=" Wkiom1iyfrrc68esaarcbwodjzo639.png-wh_50 "/>
Performance (can be patient point of the indicators, always bring you surprise)
650) this.width=650; "title=" Ai4.png "src=" http://s4.51cto.com/wyfs02/M02/8D/56/ Wkiol1iyfz7jw7gqaafofgsqc2e131.png-wh_500x0-wm_3-wmp_4-s_883738783.png "alt=" Wkiol1iyfz7jw7gqaafofgsqc2e131.png-wh_50 "/>
Now there is a problem, because after testing in VS, many of the applicationinsights metrics on Azure are not immediately presented, it takes a while (and also has a certain relationship with the location of the resource group I chose, right-click Domestic test Harness)
This article is from the "Gui Suewei" blog, make sure to keep this source http://axzxs.blog.51cto.com/730810/1895428
Using application Insights under ASP.