Reason of server / app instability on Azure

Łukasz 0 Reputation points
2025-05-07T09:34:35+00:00

Hey folks,

Experiencing some issues with the server / instances and not sure how to dig deeper. Any pointers are much appreciated!

Application: w3wp.exe
CoreCLR Version: 9.0.325.11113
.NET Version: 9.0.3
Description: The process was terminated due to an unhandled exception.
Stack:
   at Microsoft.AspNetCore.Server.IIS.NativeMethods.register_callbacks(Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle, REQUEST_NOTIFICATION_STATUS (IntPtr, IntPtr), Int32 (IntPtr), Void (IntPtr), REQUEST_NOTIFICATION_STATUS (IntPtr, Int32, Int32), Void (IntPtr), IntPtr, IntPtr)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer.StartAsync[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.AspNetCore.Hosting.Server.IHttpApplication`1<System.__Canon>, System.Threading.CancellationToken)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService+<StartAsync>d__40.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Hosting.GenericWebHostService+<StartAsync>d__40, Microsoft.AspNetCore.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<StartAsync>d__40 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Hosting.GenericWebHostService+<StartAsync>d__40, Microsoft.AspNetCore.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<StartAsync>d__40 ByRef)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(System.Threading.CancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host+<<StartAsync>b__14_1>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Extensions.Hosting.Internal.Host+<<StartAsync>b__14_1>d, Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<<StartAsync>b__14_1>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Extensions.Hosting.Internal.Host+<<StartAsync>b__14_1>d, Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<<StartAsync>b__14_1>d ByRef)
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(Microsoft.Extensions.Hosting.IHostedService, System.Threading.CancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host+<ForeachService>d__17`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Extensions.Hosting.Internal.Host+<ForeachService>d__17`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<ForeachService>d__17`1<System.__Canon> ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Extensions.Hosting.Internal.Host+<ForeachService>d__17`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<ForeachService>d__17`1<System.__Canon> ByRef)
   at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Threading.CancellationToken, Boolean, Boolean, System.Collections.Generic.List`1<System.Exception>, System.Func`3<System.__Canon,System.Threading.CancellationToken,System.Threading.Tasks.Task>)
   at Microsoft.Extensions.Hosting.Internal.Host+<StartAsync>d__14.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Extensions.Hosting.Internal.Host+<StartAsync>d__14, Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<StartAsync>d__14 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Extensions.Hosting.Internal.Host+<StartAsync>d__14, Microsoft.Extensions.Hosting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<StartAsync>d__14 ByRef)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(System.Threading.CancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions+<RunAsync>d__4.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions+<RunAsync>d__4, Microsoft.Extensions.Hosting.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<RunAsync>d__4 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions+<RunAsync>d__4, Microsoft.Extensions.Hosting.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<RunAsync>d__4 ByRef)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(Microsoft.Extensions.Hosting.IHost, System.Threading.CancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(Microsoft.Extensions.Hosting.IHost)
   at Program.<Main>$(System.String[])
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,771 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alekhya Vaddepally 1,255 Reputation points Microsoft External Staff Moderator
    2025-05-07T15:56:05.9933333+00:00

    Hi Łukasz,

    • The error log you provided show that your application (w3wp.exe, which is an IIS worker process) is crashed due to an exception inside the ASP.NET core hosting layer. In particular, it fails during the registration of the native Callback with the IIS HTTP server, possibly related to the startup phase of the app. When The application fails to initiate or start properly. There is a misunderstanding in the hosting environment (eg, IIS or Azure App Service) and.NET is a mismatched or problem with the runtime version
    • Make sure your Azure App is running a service or VM .NET 9.0.3 runs, as it aims to your application. If the runtime is not installed or disappeared correctly, the app may fail on the startup.
    • Enable the application logging and detailed error message. (Go to Azure Portal> App Services> Monitoring> Diagnostic Settings)enabling diagnostics
      Sometimes, a broken hosting startup or missing indigenous dependence (especially for IIS integration) can lead to this. Review your program.cs and Startup.cs for any custom middleware that can crashed. temporarily disable hostingstartupassemblies to separate startup loading errors. hosting startup errors
    • To manually run the application, use the Kudu console (advanced tool) in the azure or check if it crashes in the same way. This helps to separate Azure vs. App-VIII issues.Kudu Console
    • .NET 9 is a non-LTS (support of non-length period) release. If you are in production, consider switching to the LTS version such as .NET 8 or .NET 6, unless there is a strong reason for living on .NET 9.NET support policy

    if you have any further concerns or queries, please feel free to reach out to us.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.