ASP.Net桌面应用程序部署后,ApplicationInsight在服务器上不显示任何数据
创始人
2024-09-19 23:01:08
0
  1. 确保将应用程序的云角色与Application Insight服务相关联。

  2. 检查是否在应用程序中正确设置了Application Insight。例如,在Global.asax中注册了Application Insights TelemetryInitializer。

  3. 确保在项目中安装了适当的Application Insight NuGet软件包。

  4. 在应用程序中添加以下代码,以启用Application Insight的跟踪:

using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;

//...

TelemetryConfiguration configuration = TelemetryConfiguration.CreateDefault();
configuration.InstrumentationKey = "YOUR INSTRUMENTATION KEY";
TelemetryClient client = new TelemetryClient(configuration);

//添加自定义属性
client.Context.Properties["MyCustomProperty"] = "Custom Value";
//发送跟踪
client.TrackEvent("MyEventName");

其中,“YOUR INSTRUMENTATION KEY”应替换为您的Application Insight仪表板中提供的仪表板密钥。

  1. 确保您的应用程序中发生了可跟踪的活动。例如,尝试添加以下代码到OnClick事件处理程序中:
protected void Button1_Click(object sender, EventArgs e)
{
    //...

    TelemetryClient client = new TelemetryClient();
    client.TrackEvent("Button1_Click");

    //...
}
  1. 确保已部署了应用程序的最新代码。

如果这些步骤都不起作用,请检查事件日志以获取任何相关的错误消息。

相关内容

热门资讯

第9分钟辅助!pokemomo... 第9分钟辅助!pokemomo辅助软件,wepoker轻量版透视方法,大纲教程(有挂攻略)1)wep...
第9分钟辅助!wepokerp... 第9分钟辅助!wepokerplus辅助,pokemmo脚本辅助下载,妙招教程(真实有挂)该软件可以...
7分钟辅助!wepoker究竟... 7分钟辅助!wepoker究竟有没有透视,菠萝德普辅助器免费版在哪里,窍要教程(真实有挂)1、菠萝德...
六分钟辅助!hhpoker辅助... 六分钟辅助!hhpoker辅助软件下载,wpk辅助,妙招教程(有挂秘籍)运hhpoker辅助软件下载...
五分钟辅助!来玩app破解,a... 五分钟辅助!来玩app破解,aapoker ai插件,举措教程(有挂讲解)1、aapoker ai插...
8分钟辅助!菠萝辅助器免费版的... 8分钟辅助!菠萝辅助器免费版的特点,sohoo开挂辅助,讲义教程(有挂秘笈)菠萝辅助器免费版的特点透...
第三分钟辅助!wepoker有... 第三分钟辅助!wepoker有没有挂,wepoker私人局透视,手筋教程(有挂方略)1、操作简单,无...
第九分钟辅助!aapoker透... 第九分钟辅助!aapoker透视插件,菠萝辅助器免费版的特点,绝活教程(有挂技术)1、完成菠萝辅助器...
6分钟辅助!德州透视是真的假的... 6分钟辅助!德州透视是真的假的,wepoker辅助器是真的吗,举措教程(有挂分享)1、wepoker...
四分钟辅助!wepokerpl... 四分钟辅助!wepokerplus外挂,hhpkoer辅助挂是真的吗,法门教程(存在有挂)1、许多玩...