-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The underlying connection was closed #81
Comments
On the client run the following function (included with RestPS: |
Tried it, it didn't work. Same error. |
I try it on WinSrv2016 and two different Win10 |
Which directions are you following? I don't have a place to test right now. But I can probably do it later. I just want to be sure I am following the same directions. |
|
Hi! Any luck trying to reproduce the error? |
I have not had time to sit and go through the example yet. |
Good day! |
I'm sorry, not yet. Got caught up at work and then found myself on vacation! I will get to it very soon. |
Alright, In my Server window - this is the exact history $ServerCert = New-SelfSignedCertificate @params $ServerThumbprint = $ServerCert.Thumbprint For the client this is the exact history ` $clientThumbprint = $clientCert.Thumbprint |
Hi! It`s a fckng magic :( PS C:\Temp> $HttpsParams = @{ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException PS C:\Temp> Disable-SSLValidation CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException |
I try to use RestPS module and could not connect to rest server with error:
Invoke-RestMethod : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel
If i use:
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
receive error: Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send
Server and client on the same host.
Server part: =========================================
Client part: ==========================================
Certificate generated from https://invoke-automation.blog/2018/09/16/creating-a-local-ssl-certificate-hierarchy-with-windows-powershell
What i do wrong?
The text was updated successfully, but these errors were encountered: