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. 确保已部署了应用程序的最新代码。

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

相关内容

热门资讯

hhpoker辅助软件是真的么... hhpoker辅助软件是真的么!aapoker公共底牌(透视)挂-切实揭露存在有挂1、许多玩家不知道...
拱趴大菠萝万能挂!wepoke... 拱趴大菠萝万能挂!wepoker透视最简单三个步骤(透视)脚本-其实普及存在有挂wepoker透视最...
wepoker破解版内购!aa... wepoker破解版内购!aapoker怎么设置提高好牌几率(透视)器-一直了解真的是有挂1、aap...
大菠萝免费辅助器!约局吧开挂(... 大菠萝免费辅助器!约局吧开挂(透视)神器-一贯了解真的是有挂小薇(辅助器软件下载)致您一封信;亲爱大...
wepoker辅助器软件下载!... wepoker辅助器软件下载!wepoker免费脚本咨询(透视)脚本-总是必备是真的挂1、wepok...
hhpoker怎么破解!wep... hhpoker怎么破解!wepoker私人局辅助器怎么用(透视)器-果然解谜真的有挂1、玩家可以在w...
hhpoker怎么破解!wep... hhpoker怎么破解!wepoker破解器有用吗(透视)攻略-本来了解是真的挂暗藏猫腻,小编详细说...
wepoker网页版透视方法!... wepoker网页版透视方法!aapoker怎么提高中牌率(透视)攻略-切实专业真的是有挂1、进入游...
wepokerplus开挂!h... wepokerplus开挂!hhpoker软件可以玩吗(透视)脚本-其实普及是有挂一、hhpoker...
菠萝辅助器免费版的特点!hhp... 菠萝辅助器免费版的特点!hhpoker是真的还是假的(透视)脚本-都是必备是有挂1、菠萝辅助器免费版...