Launch Delegate Stucks in Eclipse while running Spring MVC project and then gets timed out.
Related
Problem
The website builds and runs no problem on localhost. The website builds and deploys from Azure DevOps to a local on-premise server no problem as well. When you try to access the website on the server though; it crashes the application pool to the point it turns itself off and returns 503 afterward. This is after trying to add a .NET Standard 2.0 project to a recently upgraded .NET Framework 4.8 website.
Recent Changes Overview
Recently upgraded from .NET Framework 4.5.2 to .NET Framework 4.8. Website worked fine after deployment.
Created a .NET Standard 2.0 project inside the solution, moved many classes to it, and had the .NET Framework 4.8 website reference it. After this change is when the application pool began crashing.
The intention with the .NET Standard 2.0 project is to have a .NET Framework 4.8 and .NET 6 website/api running parallel next to each other so I can slowly migrate functionality bit-by-bit while using the .NET Standard 2.0 library project as a basis for both.
What I've Tried
Checked the IIS logs. They only state there was a 503 returned. Nothing helpful.
Checked failed request trace logs. Nothing in there.
Event log has application event logs for the crashes (see below).
Reinstalled .NET Framework 4.8 and .NET 6 (ASP.NET Core Hosting Bundle) on the target server.
Application Event Log
Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
Faulting module name: PerfMon64.dll, version: 8.0.11057.0, time stamp: 0x5f65478b
Exception code: 0xc0000409
Fault offset: 0x000000000013f68f
Faulting process id: 0x1370
Faulting application start time: 0x01d8e239d2a9099e
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Program Files\Microsoft Monitoring Agent\Agent\APMDOTNETAgent\V8.0.10918.0\PerfMon64.dll
Report Id: 1f0f8b78-4e2d-11ed-8119-005056a40b02
Faulting package full name:
Faulting package-relative application ID:
Searching the Exception Code and Fault Offset lead me to something about the Monitoring Service and SCOM, but I tried turning off the Monitoring service and I don't think SCOM is installed at all. Not sure how to troubleshoot from here.
Questions
Any assistance in even knowing how to troubleshoot this further would be greatly appreciated. I suspect the issue is package or dependency related; but I can't even get a useful error message from the server so I'm not sure how to proceed from there.
Do you need to install a runtime for .NET Standard 2.0? I can't seem to find anything when searching if so.
I used the Debug Diagnostics Tool as suggested and found some exceptions that made no sense, but pointed to Microsoft Monitoring Service to be the problem.
I uninstalled it and afterwards the exceptions pointed to System.Globalization. I installed the NuGet package System.Globalization to the project and redeployed and after a recycling the application pool the website began working again.
I'm not sure if uninstalling Microsoft Monitoring Service was necessary in solving the problem, but it was necessary in finding the real exception. I think it was throwing an exception because the actual exception had to do with missing culture, so I assume it somehow causing problems for the monitoring service too (just a guess though).
How do I start a remote debugging session with a .NET Core 2.x app? I know I can attach to a running process, but I can only get F5 to "launch process & debug on remote machine" to work for .NET Framework.
In the past, I've set my build output folder one that the remote machine can access, and everything has worked fine (this was with .NET Framework)
I'm using VS2019 on Windows, and the remote machine is also Windows.
The .NET Core app is a console app (it's actually ASP MVC Core with Kestrel)
I develop ASP.NET Core 2.0 application which works on full framework <TargetFramework>net461</TargetFramework>. Ususally to debug it I use IIS Express: just click green arrow in Visual Studio 2017. It worked OK. But today it stopped working properly. Application runs but all requests hang. No exceptions are thrown. In Windows Logs/Application I see this:
Application 'MACHINE/WEBROOT/APPHOST/MY.APP.HERE' with physical root 'C:\code\MY.APP.HERE\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Username\AppData\Local\Temp\tmp35D5.tmp"', ErrorCode = '0x80004005 : 0.
Source of the message is IIS Express AspNetCore Module.
Any ideas what's the reason and how to fix it?
UPDATE: I see A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\code\PATH.TO.APP.HERE\bin\Debug\net461\win7-x64\publish\'. whily running dotnet MyApp.exe.
iisreset - try it one time - As it was working before , hope it works !
How to enable debug in Rider from JetBrains for .net core project.
When I press debug it show
Error running Default: This configuration cannot be debugged.
Anyone knows what config I need to create or what I need to do in order to debug .net core web api hello world project
.Net core debugger isn't supported yet. But it's coming soon
The full error message is:
Microsoft Visual Studio
Unable to attach to the process. The debuggee memory space does not have the expected debugging export table.
Now, the only place i found this message is here: https://github.com/dotnet/coreclr/blob/master/src/pal/prebuilt/corerror/mscorurt.rc
Core clr is installed on the machine but the application running in IIS is plain old 4.5 web forms.
Anyone has a clue?
You would attach to dnx.exe process if you debug ASP.NET Core applications, since ASP.NET Core applications are standalone Console applications invoked through the dotnet runtime command. They are not loaded into an IIS worker process.
https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS