mini
mini
CC#
Created by mini on 5/12/2024 in #help
✅ The request was aborted: a protected SSL/TLS channel could not be created
I'm trying to send a web request in .NET 4.8, but I keep getting The request was aborted: a protected SSL/TLS channel could not be created. I've did a lot of googling and people suggested all kinds of stuff, but no matter what I tried it didn't work. Here's stuff I tried:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls13;
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls13;
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
I've tried various combinations of security protocols, like specifying just Tls12 which seems to fix it for some, but without any success. When accessing the URL I'm requesting in the browser and check devtools, I can see that it uses a Tls13 encryption. Not sure if that info is of any help.
154 replies
CC#
Created by mini on 12/1/2022 in #help
❔ Error when using CefSharp's chromium browser
I am creating an instance of ChromiumWebBrowser in the InitializeComponent method of my winforms app. However, upon starting the program, the following exception throws when running the application on the Application.Run line:
System.IO.FileNotFoundException: 'Could not load file or assembly 'CefSharp, Version=107.1.120.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'.
System.IO.FileNotFoundException: 'Could not load file or assembly 'CefSharp, Version=107.1.120.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'.
8 replies
CC#
Created by mini on 10/21/2022 in #help
Harmony throws unknown location exception on Patch
I am using Harmony to add a parameter to various log calls of the assembly but whenever I try to Patch it by transpiling it, I get an error:
IL Compile Error (unknown location)
bei HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
bei HarmonyLib.PatchProcessor.Patch()
bei HarmonyLib.Harmony.Patch(MethodBase original, HarmonyMethod prefix, HarmonyMethod postfix, HarmonyMethod transpiler, HarmonyMethod finalizer, HarmonyMethod ilmanipulator)
IL Compile Error (unknown location)
bei HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
bei HarmonyLib.PatchProcessor.Patch()
bei HarmonyLib.Harmony.Patch(MethodBase original, HarmonyMethod prefix, HarmonyMethod postfix, HarmonyMethod transpiler, HarmonyMethod finalizer, HarmonyMethod ilmanipulator)
Does anyone have an idea why?
25 replies
CC#
Created by mini on 8/31/2022 in #help
COMException on Windows.Storage.Pickers.FolderPicker
I am receiving the error Error HRESULT E_FAIL has been returned from a call to a COM component when trying to run the following code:
FolderPicker fp = new FolderPicker();
InitializeWithWindow.Initialize(fp, WindowNative.GetWindowHandle(this));
StorageFolder folder = await fp.PickSingleFolderAsync();
FolderPicker fp = new FolderPicker();
InitializeWithWindow.Initialize(fp, WindowNative.GetWindowHandle(this));
StorageFolder folder = await fp.PickSingleFolderAsync();
but why does this happen? FileSavePicker and FileOpenPicker works fine for me.
1 replies