C#C
C#3y ago
2 replies
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");
            }
        }


So my errir is : https://i.imgur.com/9DUGA3W.png

Someone can help me with that?
Imgur
Preview image
Was this page helpful?