function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
menahm davmenahm dav 

tls 1.1

Hi
 trying to send http request to saleforce after the upgrade to tls 1.1 .

           byte[] buffer = Encoding.UTF8.GetBytes(urldata);
            HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url);
            WebReq.Method = "POST";
            WebReq.ContentType = "charset=utf-8";
            WebReq.ContentLength = buffer.Length;             
            Stream PostData = WebReq.GetRequestStream();
            PostData.Write(buffer, 0, buffer.Length);
            PostData.Close();
            HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();

The status of the request is "OK" but no lead is inserted
Getting this response

{Is-Processed: true Exception:common.exception.SalesforceGenericException
Vary: Accept-Encoding
Connection: close
Cache-Control: private
Content-Type: text/html;charset=UTF-8
Date: Sun, 22 Oct 2017 11:41:36 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: BrowserId=-z9W_neATsuXA2laE8A2EA;Path=/;Domain=.salesforce.com;Expires=Thu, 21-Dec-2017 11:41:36 GMT;Max-Age=5184000


what am i doing wrong?


 
Andrew FandreAndrew Fandre
Do you need to set the servcie point manager security protocol?
 
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;