简体   繁体   English

asp.net 4.8 web 应用程序中的应用程序洞察配置

[英]Application insights configuration in asp.net 4.8 web application

how can we configure application insights in asp.net 4.8 web application which has the entry point as global.asax.cs I need to pull out the logging in separate project and use Logger factor with Microsoft.Extensions.Logging我们如何在 asp.net 4.8 web 应用程序中配置应用程序洞察力,其入口点为global.asax.cs我需要在单独的项目中提取日志记录并使用Microsoft.Extensions.Logging的 Logger 因子

I hope you already created a 4.8 Web Application .我希望您已经创建了4.8 Web 应用程序 Follow the workaround to add Application Insights in your Web Application Project.按照解决方法在 Web 应用程序项目中添加 Application Insights。

Workaround follows:解决方法如下:

Install the Application Insights Package Microsoft.ApplicationInsights in your application using NuGet Package Manager.使用 NuGet Package 管理器在您的应用程序中安装 Application Insights Package Microsoft.ApplicationInsights

在此处输入图像描述

Configure Application insights in your Web Applicaiton:在 Web 应用程序中配置应用程序洞察:

Right click of your project and click Configure Application Insights右键单击您的项目,然后单击配置 Application Insights

在此处输入图像描述

It will ask you to choose Configure Application Insights either local or Azure .它将要求您选择本地Azure配置 Application Insights Choose as per your requirement.根据您的要求选择。

在此处输入图像描述

It will configure your Web App into Application Insights.它会将您的 Web 应用程序配置到 Application Insights 中。 It adds the ApplicationInsights.config file which contains the configuration of Application Insights.它添加了ApplicationInsights.config文件,其中包含 Application Insights 的配置。

在此处输入图像描述

After the configuration done we can see the telemetry data in Application Insights配置完成后,我们可以在 Application Insights 中看到遥测数据

Results结果

在此处输入图像描述

References:参考:

  1. Using pageview to collect telemetry data in pages using Adding Instrumentation key in web.config在 web.config 中使用 Pageview 收集遥测数据
  2. Using Application Insights in global.aspx 在 global.aspx 中使用 Application Insights

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Application Insights和Asp.Net核心配置 - Application Insights and Asp.Net core Configuration ASP.NET 5中的应用程序见解 - Application insights in ASP.NET 5 无法将ASP.NET Core Web应用程序与Application Insights连接 - Cannot connect ASP.NET Core web app with Application Insights 使用ASP.Net MVC和Web Api的Application Insights实时指标 - Application Insights Live Metrics with ASP.Net MVC and Web Api 调试 ASP.NET (.NET Framework 4.8) web 应用程序时,没有为新 csproj 格式的 (.NET Framework 4.8) 库加载符号 - No symbols loaded for a (.NET Framework 4.8) library in new csproj format when debugging a ASP.NET (.NET Framework 4.8) web application 在控制台应用程序和asp.net Web应用程序之间共享配置 - share configuration between console application and asp.net web application 具有Application Insights的asp.net core 2记录器 - asp.net core 2 Logger with Application Insights Azure Application Insights 中报告的 window.onerror 中的无效字符; ASP.Net Web 应用 - Invalid character at window.onerror reported in Azure Application Insights; ASP.Net Web Application 处理asp.net Web应用程序中的配置设置 - Handling configuration settings in asp.net web application asp.net-开发具有基于配置启用功能的Web应用程序 - asp.net - Developing web application with features enabled based on configuration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM