C
C#2y ago
JustZerooo

❔ 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?
Imgur
2 Replies
JustZerooo
JustZeroooOP2y ago
fixed, but thanks 🙂
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server