by sam
Error>
<Code>ResourceNotFound</Code>
<Message>The specified resource does not exist. RequestId:97a49709-101e-005a-5801-0a46fa000000 Time:2021-02-23T16:33:15.5463336Z</Message>
</Error>
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Under the Batch Service option, we are running a custom dot net activity, and that .NET tool downloads data from some APIs. It was working fine without any issues until Yesterday(for more than 2/3 years). Now we are facing the below error while downloading data from the APIs. I don't know why we are facing such issue suddenly.
Error: The request was aborted: Could not create SSL/TLS secure channel.
StackTrace: at System.Net.WebClient.OpenRead(Uri address)
at Import.DownloadSite(String url, String type)
The same .NET tool works fine in our local desktop machines(Windows 10 OS). Getting the error only in the batch account machine. So I think the problem is in the batch account machine.
Using the below C# code for downloading data from the APIs:
WebClient wc = new WebClient();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3;
return wc.DownloadString(string.Format(ApiUrl, type));
I tried most of the solutions suggested in the below link, and nothting works for me.
https://stackoverflow.com/questions/2859790/the-request-was-aborted-could-not-create-ssl-tls-secure-channel
More information:
.NET Framework: v4.5
Batch machine: Windows Server 2012 R2 (x64)
by sam
Error>
<Code>ResourceNotFound</Code>
<Message>The specified resource does not exist. RequestId:97a49709-101e-005a-5801-0a46fa000000 Time:2021-02-23T16:33:15.5463336Z</Message>
</Error>
I am facing the same issue as mentioned in the original thread.
log :
[08/04/2020 17:39:27,846] VSTA_Main: URI: https://xxxx-d.openstack.sas.com/locales
[08/04/2020 17:39:27,864] VSTA_Main: Method: GET
[08/04/2020 17:39:27,884] VSTA_Main: ContentType:
[08/04/2020 17:39:27,892] VSTA_Main: Accept:
[08/04/2020 17:39:27,905] VSTA_Main: AcceptLanguage: en-US
[08/04/2020 17:39:27,983] VSTA_Main: ReqBody: "en"
[08/04/2020 17:39:28,011] --------------- EXCEPTION REPORT ---------------
[08/04/2020 17:39:28,058] CreateNInitiateREST:
[08/04/2020 17:39:28,070] System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at SAS.FM.Common.RESTHelper.CreateNInitiateRESTRESPONSE
[08/04/2020 17:39:28,096] ----------- END OF EXCEPTION REPORT ------------
[08/04/2020 17:39:28,124] --------------- EXCEPTION REPORT ---------------
[08/04/2020 17:39:28,153] Failed to reconnect with server.
[08/04/2020 17:39:28,182] System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
Hi @KathiresanSubramaniam-1168,
You need to Add HTTP Header "Expect" with value "100-continue". In your case, please add these lines of code before creating the request :
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3;
Hope this helps.