JustZerooo
JustZerooo
CC#
Created by JustZerooo on 3/8/2023 in #help
❔ C# WebRequest Issue - TSL/SSL Channeö
I try to make a logincheck thru an API but i always getting a TSL/SSL Channel issue! Code:
public static void CheckLogin(string username, string password)
{

try
{
var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://redacted.de/api/checkLogin?username=${username}&password={password}");

ServicePointManager.Expect100Continue = true;
ServicePointManager.DefaultConnectionLimit = 9999;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;

httpWebRequest.UserAgent = "WoW Launcher / API";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Method = "GET";



var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
MessageBox.Show(result, "WoW Launcher");
}
} catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Allgemeiner Fehler");
}
}
public static void CheckLogin(string username, string password)
{

try
{
var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://redacted.de/api/checkLogin?username=${username}&password={password}");

ServicePointManager.Expect100Continue = true;
ServicePointManager.DefaultConnectionLimit = 9999;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;

httpWebRequest.UserAgent = "WoW Launcher / API";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Method = "GET";



var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
MessageBox.Show(result, "WoW Launcher");
}
} catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Allgemeiner Fehler");
}
}
So my errir is : https://i.imgur.com/9DUGA3W.png Someone can help me with that?
3 replies
CC#
Created by JustZerooo on 2/28/2023 in #help
❔ Check for background progress
Hello, i am try to use the backgroundWorker to check for a running background progress to get the ID of it and update the progress of this in a label. but i am stuck in how to make this as seperate thread and update the label and check if the progress is present at any time or not https://i.imgur.com/YCRg83z.png Maybe someone can give some tips or help?
5 replies