Category : .net-core

I try to understand how DateTime.TryParse works on different environments in .NET Core Let’s say that I call two methods DateTime.TryParse("08-04-2020", new CultureInfo("da-DK"), DateTimeStyles.None, out var res) DateTime.TryParse("08/04/2020", new CultureInfo("da-DK"), DateTimeStyles.None, out var res) When I run it on Linux (docker) it returns false for first method and true for the second one. When I ..

Read more

Code private static TimeZoneInfo DisableDST(this TimeZoneInfo timeZone) { return TimeZoneInfo.CreateCustomTimeZone( timeZone.Id, timeZone.BaseUtcOffset, timeZone.DisplayName, timeZone.StandardName, timeZone.DaylightName, timeZone.GetAdjustmentRules(), true); } Phenomenon Analysis The above code works well with the windows server in .NET 4.8. But got the error in the Linux environment with .NET CORE 3.1 Any solution? Thanks Source: Windows..

Read more

I have developed a .net core 3.1 windows service (starttesterservice) that listens for request messages to start a winform tester applcation. The starttesterservice is run with elevated permissions via the app.mainfest: <?xml version="1.0" encoding="utf-8"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity version="1.0.0.0" name="MyApplication.app" /> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> <applicationRequestMinimum> <PermissionSet Unrestricted="true" ID="Custom" ..

Read more