Jenkins.NET
Jenkins.NET copied to clipboard
Unable to read data from the transport connection
Expected Behavior Tried to make calls to build and Get however get following error:
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
I tried to setup TLS and also tried to ignore any SSL errors but still get same error.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
When I make curl requests using same build url and user and token it works fine.
Your Environment I am running windows server 2016 and Jenkins ver. 2.222.1 My client code is .net 45
Update on this, if before making calls i add
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
I get a bit further I now get content length 0 error. I downloaded source and in CreateRequest added
request.ContentLength = 0;
everything now works