The underlying connection was closed: An unexpected error occurred on a send
Seit anfangs Woche habe ich bei einem PowerShell Script die Fehlermeldung: The underlying connection was closed: An unexpected error occurred on a send.
Damit die Verbindung zu einer Webseite wie in diesen zwei Beispielen funktioniert:
$client = new-object System.Net.WebClient $client.DownloadFile("https://stastka.ch/api/, "log.txt" )
oder
$webRequest = [System.Net.WebRequest]::Create("https://stastka.ch/api/)
Das Problem liegt in der TLS-Verschlüsselung die für meine Webseite z.Z. TLS 1.1 und TLS 1.2 unterstützt. Powershell:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Unter C#
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
×
...auch noch interessant
- Powershell // 25.06.2020unable to resolve package source ‘https://www.powershellgallery.com/api/v2’
- Powershell // 27.03.2019Windows Active Directory: EventLog Login überwachen
- Windows // 21.03.2019Windows Active Directory: SID
- Windows 10 // 30.11.2018Windows 10 1809: Remote server administration tools (RSAT)
Tippsammlung
Kleine Tippsammlung für mich und dijenige die sich auf meine Webseite verirrt haben.Archiv
JahrArchiv
Tag(s):- tipps (30)
- synology (27)
- linux (18)
- Windows (17)
- Powershell (13)
- Windows 10 (12)
- coding (8)
- ad (6)
- Windows 2012 R2 (5)
- vpn (5)
- security (5)
- csharp (c#) (5)
- Windows 2012 (4)
- Pi (4)
- seo (3)
- openpgp.js (3)
- ipkg (3)
- docker (3)
- app (3)
- Android (3)
- wsus (2)
- Windows Updates (2)
- Windows 2016 (2)
- Windows 2008 (2)
- web2 (2)
- Ubuntu (2)
- tool (2)
- php (2)
- pgp (2)
- perl (2)
- LMS (2)
- GnuPgP (2)
- gitea (2)
- git (2)
- Excel (2)
- bash (2)
- assp (2)
- Zertifizierungsstelle (1)
- Zertifikat (1)
- www (1)
- Windows 8.1 (1)
- Windows 8 (1)
- Windows 10 1809 (1)
- Windows 10 1803 (1)
- watchdog (1)
- VMware (1)
- vim (1)
- verschlüsselung (1)
- Ubuntu 18.04 (1)
- touchscreen (1)
Nichts gefunden
Es wurde zur Story The underlying connection was closed: An unexpected error occurred on a send kein Kommentar gefundenInformation
Werbung oder Ähnliches sind nicht erlaubt, daher wird jeder Beitrag geprüft und freigegeben.Advertising, etc. are not allowed, so any contribution is reviewed and approved.
Facebook-Webadress are not allowed, Facebook als Webadresse ist nicht erlaubt
* Die E-Mail wird nicht veröffentlicht / The email will not be published
** Bitte Zahl eintragen / Please enter the number
Modal Header
Some text in the Modal Body
Some other text...
(c)2021 stastka.ch // help system