dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page:https://asp.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgraded to .net core 8.0 and now app_offline.htm to shutdown the app pool for code deployment hangs.

bodenkers opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After upgrading to .net 8.0 our app pools no longer function properly for shutdown when using the app_offline.htm file. When we place the app_offline.htm file in the root folder the application then begins to hang and does not every offline the app properly leading to failure in our azure devops web deploy because files are still in use. This is behaving just like bug #52307 but was asked to open a new issue

Expected Behavior

The app_offline.htm file shutsdown the application properly when app_offline.htm is placed in the root folder of the application

Steps To Reproduce

Using the web app deploy azure devops task and selecting "Take App Offline" to deploy code moved fails to take app offline which leads to failure of devops task completing due to file still in use error.

This can also be reproduced by manually placing an app_offline.htm file in the root directory.

The application then hangs but never shuts down properly. We also notice high memory utilization. If we roll back to the previous version of .net (7.0) everything works fine.

Exceptions (if any)

Failed to deploy web package to IIS website.
Error Code: ERROR_FILE_IN_USE
More Information: Web Deploy cannot modify the file 'Ag.Accounts.Settings.Models.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
Error count: 1.
Error: The process 'C:\azagent\A2_work_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.235.1\node_modules\azure-pipelines-tasks-webdeployment-common\MSDeploy\M142\MSDeploy3.6\msdeploy.exe' failed with exit code 4294967295

.NET Version

8.0.5

Anything else?

ASP.NET Core 8.0.5