your windows 2022 server is running your 4.6 code (out of support) with the 4.8 runtime. to get Microsoft support you will probably need to upgrade your code to .net 4.8 first, which may fix your issue. also check you have the lastest nuget package versions.
How to fix .NET 4.6 application pool crash on Windows Server 2022
We recently upgraded our Windows Server from 2012 to 2022. We are now experiencing App Pool crashes with IIS hosted applications running .NET 4.6. The crashes require us to stop the application pool, terminate the w3wp.exe task manually for that application pool and then restart the application pool in IIS. None of our .NET Core applications seem to have this problem. We upgraded one of the older applications to .NET 4.8 but that didn't help either. We also still have an old Windows 2012 server that does not present any of these crashes with the same applications.
We were able to generate a dump file before terminating w3wp task and run it in DebugDiag. I'm seeing multiple counts of the System.ObjectDisposedException so we may be having an issue with garbage collection. I also see several others like StackOverflow and OutOfMemory but the ObjectDisposedException may be the cause of those.
I'd appreciate any help. Thanks.
Previous .NET Exceptions Report (Exceptions in all .NET Heaps)
Exception TypeCountMessageStack Trace__System.Exception__1<none>;__System.OutOfMemoryException__1<none>;__System.StackOverflowException__1<none>;__System.ExecutionEngineException__1<none>;__System.Threading.ThreadAbortException__2<none>;__System.ObjectDisposedException__4Cannot access a disposed object.;