//C# Solução *.csproj - .NETFramework,Version=v4.8 -
namespace XXXXXXXXX
{
partial class XXXXXXXXX : ServiceBase
{
private readonly ...;
public XXXXXXXXX()
{
InitializeComponent();
AppContext.SetSwitch("Switch.System.Security.Cryptography.Xml.UseInsecureHashAlgorithms", true);
AppContext.SetSwitch("Switch.System.Security.Cryptography.Pkcs.UseInsecureHashAlgorithms", true);
AppDomain.CurrentDomain.UnhandledException += OnError;
}
...
...
}
}