0

We have used System.Net.WebRequest for managing FTP files by powershell script. But, we are frequently getting "The underlying connection was closed: An unexpected error occurred on a receive." whenever script try to connect with Sharepoint online by

Connect-PnPOnline

. Any idea?

We have used below link to fix it but nothing happened..

https://blog.mamc-llc.com/2020/07/08/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-receive-when-running-wget-curl-or-invoke-webrequest-on-windows-in-powershell/ https://sharepains.com/2016/04/22/connect-pnponline-common-error-messages/ https://github.com/pnp/PnP-PowerShell/issues/1566

1 Answer 1

0

You may try to update your default security protocol to be TLS 1.2+ to test if it solves your issue.

enter image description here Reference:

http://sharepointviews.com/the-underlying-connection-was-closed/

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.