# Preserve Profiler files when Web Deploy updates a Windows App Service application

> Why can a web deployment remove an already enabled Application Insights Profiler?

- Canonical URL: https://update.dsesecurity.com/updates/dse-20260909-276-preserve-profiler-files-when-web-deploy-updates-a-windows-app-service-application/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-09-10T00:27:20+00:00
- Modified: 2026-09-10T01:23:49+00:00
- Last reviewed by DSE: 2026-09-09
- Resource type: Guide
- DSE priority: Information
- Topics: IT
- Reading time: 2 minutes

## What you need to know

Why can a web deployment remove an already enabled Application Insights Profiler?

## Potentially affected

Application Insights .NET Profiler on Windows App Service ASP.NET or ASP.NET Core apps updated with Web Deploy.

## DSE recommendation

Include the documented App_Data deletion exclusion in the deployment review before releasing changes over an enabled Profiler.

## Article

## Source facts

Microsoft warns that Web Deploy can delete Application Insights Profiler files while deploying a web application. Its documented prevention is to exclude App_Data from deployment deletion. On Windows App Service, Profiler runs as a continuous WebJob and requires Always On. The individual instance’s job is named ApplicationInsightsProfiler3. [Microsoft Learn](https://learn.microsoft.com/en-us/azure/azure-monitor/profiler/profiler).

## Applicability

This review applies to the Windows App Service ASP.NET and ASP.NET Core workflow documented by the source. It is a release-preservation check, not an assumption that every missing profile was caused by deployment.

## DSE recommendation

Include the documented App_Data deletion exclusion in the deployment review before releasing changes over an enabled Profiler. Ask the application owner to inspect the actual Web Deploy deletion settings used by the pipeline, including overrides outside the project file. Preserve the intended profiler state alongside the application release configuration. Avoid manually restoring unexplained files as a substitute for correcting the repeatable deployment behavior.

## Verification

Use a representative nonproduction application to compare the profiler job and relevant deployment configuration before and after a normal release. Confirm Always On remains enabled and inspect whether the expected profiler files survive. Collect a profile through the approved diagnostic test before declaring the release-preservation check successful. If it still fails, retain the deployment evidence and investigate other documented prerequisites. Report the observed result separately from the configuration change; an exclusion being present does not itself prove that profiling resumed.

## Official references

[Microsoft Learn: Windows App Service Profiler](https://learn.microsoft.com/en-us/azure/azure-monitor/profiler/profiler). Source reviewed September 9, 2026.

## Primary reference

- Name: .NET Profiler for App Service - Azure Monitor | Microsoft Learn
- Authority: Microsoft Learn
- URL: https://learn.microsoft.com/en-us/azure/azure-monitor/profiler/profiler
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Preserve Profiler files when Web Deploy updates a Windows App Service application,” DSE Security, https://update.dsesecurity.com/updates/dse-20260909-276-preserve-profiler-files-when-web-deploy-updates-a-windows-app-service-application/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
