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
- Windows 10 // 29.02.2024there is a problem with windows installer package. A DLL required for this install to complete could not be run
- Windows // 01.11.2022VMware Aria Automation 8.x: VMPSMasterWorkflow32 MachineProvisioned SysPrep
- Windows // 31.10.2022Windows 2022 Disk Layout from Hell (update)
- Powershell // 22.04.2022Opnsense: Backup mit Rest-API (os-api-backup)
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)2025 stastka.ch // help system