C
C#10mo ago
Èllïð†

An error occurred while sending the request.

Hi, I have code which works in windows 10 but not working in windows 7: the code:
C#
using (var httpClient = new HttpClient(new HttpClientHandler {
SslProtocols = SslProtocols.Tls12 }))
{

Logger.Log.Api(Logger.LogStatus.Success, "Getting " + nameof(GetDomain));

# here error happens after calling ' get async'
var httpresponse = await httpClient.GetAsync(Url);
}
C#
using (var httpClient = new HttpClient(new HttpClientHandler {
SslProtocols = SslProtocols.Tls12 }))
{

Logger.Log.Api(Logger.LogStatus.Success, "Getting " + nameof(GetDomain));

# here error happens after calling ' get async'
var httpresponse = await httpClient.GetAsync(Url);
}
Error: The request was aborted: Could not create SSL/TLS secure channel. More: I have added
SslProtocols = SslProtocols.Tls12
SslProtocols = SslProtocols.Tls12
, I have ensure that on windows 7 tls12 is enabled, Both runtime and program .net framwork are 4.8
4 Replies
Buddy
Buddy10mo ago
Is your clock in sync with your timezone? And try removing the HttpClientHandler
canton7
canton710mo ago
Stack Overflow
Windows 7 Could not create SSL/TLS secure channel."} System.Net.Web...
I am running Windows 7 64 bit Pro and Trying to write a RSS Feed Reader here is the ERROR msg - $exception {"The request was aborted: Could not create SSL/TLS secure channel."} System.Net.
canton7
canton710mo ago
(and many others)
Èllïð†
Èllïð†OP10mo ago
Time zone is ok I did that things all but still getting that error
Want results from more Discord servers?
Add your server