An SSL 3.0 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The TLS connection request has failed.
ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Ssl3; var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://ipaddress/method/"); httpWebRequest.ContentType = "application/json"; httpWebRequest.Method = WebRequestMethods.Http.Post; //POST string resourePath = "test/123/balance/"; string requestBody = ""; string secretWord = "xxxx123"; string header = "api-request-channelMid"; string payLoadString = httpWebRequest.Method.ToString() + resourePath + requestBody + secretWord + header; byte[] payLoadBytes = Encoding.UTF8.GetBytes(payLoadString); RSAParameters publicKey; RSAParameters privateKey; RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(2048); rsa.PersistKeyInCsp = false; publicKey = rsa.ExportParameters(false); privateKey = rsa.ExportParameters(true); byte[] signature = rsa.SignData(payLoadBytes, "SHA256"); string signedData = Convert.ToBase64String(signature); using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { var serializer = new JavaScriptSerializer(); string json = ""; httpWebRequest.Headers.Add("Signature", signedData); streamWriter.Write(json); streamWriter.Flush(); streamWriter.Close(); } ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls; var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) { var result = streamReader.ReadToEnd(); }
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)