Question CoreCLR: DefaultDomain error when running application

sydnkosi

New member
Joined
Apr 18, 2023
Messages
2
Programming Experience
3-5
This is the error I get when I try to run the service, the console window just flashes, opens and close same time and not stack trace in Event Viewer

The projects targets .NET Core 2.1 which is installed on the machine, and I can locate the runtime 2.1.30 in C:\Program Files\dotnet\shared\Microsoft.NETCore.App

'Kyc.Server.Service.AddressVerification.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.30\System.Private.CoreLib.dll'.
Exception thrown: 'System.ArgumentException' in System.Private.CoreLib.dll
The program '[25540] Kyc.Server.Service.AddressVerification.exe' has exited with code 2147516553 (0x80008089).
 
Minimum code to reproduce, please

I created a simple console app in .Net Core 2.1 which is giving this error. See below

1684670537135.png
 
As an aside, .NET Core 2.1 hit end of life Aug 21, 2021.

I've seen something like this on ASP.NET Core apps where the version of .NET (Core) on the server didn't match the version targeted while compiling on the dev or build machine. The workaround is to build the app as self-contained rather than framework dependent, but that has its inherent security risks since most devs are lazy about keeping up-to-date with the latest versions once they have something that works. Add on management that doesn't care about technical debt and is risk averse, and the believe that the risk of breaking something by updating frameworks is worse than the risk of a security vulnerability, they tend to not prioritize keep up to date. They often don't understand that the security risk is actually far worse than the risk of something breaking.

There was one instance of a team that was experiencing this issue, but what happened was they had hand edited and put in invalid characters into one of their JSON configuration files prior to deployment. I only heard about it third hand so I don't have additional details to give you.

What's unusual here though is that the problem seems to be happening on the dev machine as well. Are you sure that the app is not being blocked by your antivirus?
 

Latest posts

Back
Top Bottom