It's all about the answers!

Ask a question

[closed] Why Salesforce url The SSL connection not created using c program?


Riddhima Sharma (11) | asked Apr 01 '20, 8:41 p.m.
edited Apr 02 '20, 2:58 a.m. by Ralph Schoon (63.6k33646)

 To call  Salesforce api  i'm using restclient like below -


var client = new RestClient("https://test.salesforce.com/services/oauth2/token");
                var request = new RestRequest(Method.POST);
                request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
                request.Parameters.Clear();
                request.AddParameter("grant_type", "password");
                request.AddParameter("username", userName);
                request.AddParameter("password", password);
                request.AddParameter("client_id", clientID);
                request.AddParameter("client_secret", clientSecret);
                response = client.Execute(request);

</pre>
<pre class="lang-cs prettyprint prettyprinted" style=", &quot; , &quot; , &quot; , &quot; , monospace, sans-serif; Bitstream Vera Sans Mono&quot; Courier New&quot; DejaVu Sans Mono&quot; Liberation Mono&quot; Lucida Console&quot; border-radius: 3px; border: 0px; box-sizing: inherit; color: rgb(36, 39, 41); font-family: Consolas, Menlo, Monaco, &quot; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;">

but getting error -

</pre>
<pre class="lang-cs prettyprint prettyprinted" style="border-radius: 3px; border: 0px; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;">

The SSL connection could not be established, see inner exception. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

</pre>
<pre class="lang-cs prettyprint prettyprinted" style="border-radius: 3px; border: 0px; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;">

Anyone can help me with this?

</pre>

The question has been closed for the following reason: "Question is off-topic or not relevant" by rschoon Apr 02 '20, 2:56 a.m.

One answer



permanent link
Ralph Schoon (63.6k33646) | answered Apr 02 '20, 2:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This forum is about the products in this list: https://jazz.net/products

It is not a salesforce forum and I am at a loss how you would have picked this forum in the first place. Please find a forum that is more appropriate.