Я пытаюсь просить об этом изображении: https://www.kamerstunt.nl/file/img/web/woning/9577323WenumWieselZwolseweg-142d_6.jpg Если изображение больше не существует, когда вы читаете это, были удалены, но вы все равно сможете просмотреть соответствующий сертификат SSL. Используя мой браузер, я смог успешно перейти на страницу, запросить изображение и увидеть действительный сертификат SSL.ASP.NET «Запрос был прерван: не удалось создать безопасный канал SSL/TLS» встречается также с настроенным servicepointmanager
Я проверил здесь: The request was aborted: Could not create SSL/TLS secure channel
Таким образом, я добавил, что решение моего кода:
Dim imgRequest As WebRequest = WebRequest.Create("https://www.kamerstunt.nl/file/img/web/woning/9577323WenumWieselZwolseweg-142d_6.jpg")
Dim imgResponse As WebResponse
ServicePointManager.Expect100Continue = True
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
'//I also tried: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls Or SecurityProtocolType.Ssl3
imgResponse = imgRequest.GetResponse()
Dim streamPhoto As Stream = imgResponse.GetResponseStream()
Я пробовал:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
Но я получаю ошибки: 'Tls12' is not a member of 'System.Net.SecurityProtocolType'
и 'Tls11' is not a member of 'System.Net.SecurityProtocolType'
Я также попытался изменить реестр, чтобы окна не блокировали DHE с 512 бит и добавили ClientMinKeyBitLength с 0x00000200 (512) значением в соответствии с Но все же это терпит неудачу ... почему?
Вы желая, чтобы загрузить файл является то, что это? – Codexer
Я пытаюсь загрузить его в memystream (так не на диск): 'Dim streamPhoto As Stream = imgResponse.GetResponseStream()' – Flo
См. Обновленный ответ ... он проверен и проверен. – Codexer