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

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

相关内容

热门资讯

WPK模拟器辅助学习!wepo... WPK模拟器辅助学习!wepoker私人局透视教程,AApokerai多功能辅助方法1、下载好wep...
WPK多开辅助器办法!wepo... WPK多开辅助器办法!wepoker辅助器如何使用,红龙PoKerai多功能辅助器攻略1、玩家可以在...
WPK方法开挂教程书!wepo... WPK方法开挂教程书!wepoker免费透视,菠萝智星德州ai多功能开挂脚本暗藏猫腻,小编详细说明w...
WPK德州局辅助器诀窍!wep... WPK德州局辅助器诀窍!wepoker透视脚本免费,微扑克ai多功能辅助器工具1、很好的工具软件,可...
WPK方法辅助器经验!德普之星... WPK方法辅助器经验!德普之星透视辅助软件是真的吗,红龙扑克ai多功能辅助器脚本1、进入到德普之星透...
WPK方法透视项目!wpk作弊... WPK方法透视项目!wpk作弊,红龙PoKerai多功能透视神器1、首先打开wpk作弊辅助器下载最新...
WPK辅助透视挂方针!wepo... WPK辅助透视挂方针!wepoker插件功能辅助器,wpkai多功能透视挂插件1、wepoker插件...
WPK真假辅助器举措!wepo... WPK真假辅助器举措!wepoker怎么开辅助,aapokerai多功能辅助器技巧1、WPK真假辅助...
WPK安装辅助器手册!有哪些免... WPK安装辅助器手册!有哪些免费的wpk作弊码,德州扑克ai多功能辅助器神器1、有哪些免费的wpk作...
WPK私人局透视挂要领!wep... WPK私人局透视挂要领!wepoker免费辅助器,微扑克ai多功能透视挂教程1、每一步都需要思考,不...