You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET中如何在appsettings.json配置Application Insights连接字符串?

在appsettings.json中配置Application Insights连接字符串

你需要在appsettings.json中添加ApplicationInsights节点,并在其下设置ConnectionString元素来配置连接字符串,具体格式如下:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "ApplicationInsights": {
    "ConnectionString": "你的Application Insights连接字符串"
  },
  "AllowedHosts": "*"
}
  • 核心JSON元素名称:ApplicationInsights(父节点)、ConnectionString(子节点,用于存储连接字符串值)
  • 把示例中的"你的Application Insights连接字符串"替换为你从Azure对应资源中获取的实际连接字符串即可。

内容的提问来源于stack exchange,提问作者si Hwang

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 19:15:38