question

DavidThayer-8885 avatar image
DavidThayer-8885 asked ·

WebRequest .NET object getting error on GetRequestStream()

I am requesting data from a server in another part of our cmpany and this has been working well for many months. Last night My computer rebooted to apply an update from Windows and suddenly I am getting the following error.


https://apidev.wecon.com/ws/rest/AG-PUBGEN/inventory/v3 had no response. Errors: No valid data returned from JDE API.
ExceptionMsg: The request was aborted: Could not create SSL/TLS secure channel.

This API does not use any certificates to create a connection. What could have suddenly changed?

Here is the relevant code:

var webRequest = WebRequest.Create(newUrl.Trim());
webRequest.ContentType = "application/json";
webRequest.Method = method;
var authInfo = boomiUser + ":" + boomiPassword;
var auth = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
webRequest.Headers.Add("Authorization", auth);
int timeout = JdeUtility.GetLocalConfigurationValue<int>("JdeApiTimeout", 300000);
webRequest.Timeout = timeout;

             Job.Report("JdeApi", () => $"Jde Endpoint timeout was set to {timeout / 1000} seconds", 10, ConsoleColor.Yellow);
             if (method != "GET")
                 using (var requestStream = webRequest.GetRequestStream())
                 {
                     requestStream.Write(body, 0, body.Length);
                 }

             using (var webResponse = webRequest.GetResponse())
             {
                 results.ResponseHeaders = webResponse.Headers;
                 using (var responseStream = webResponse.GetResponseStream())
                 {


Error is being thrown at webResponse.GetResponseStream.


windows-uwp-runtime
2 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, I noticed that you marked the uwp tag, are you using UWP development? If so, can you tell me the version of the system running the application? If not, you can replace the tag with the one corresponding to your problem, so you can get more professional help. Here is the Microsoft Q&A support products

0 Votes 0 · ·

Hello, has your problem been resolved? If you have other questions, please feel free to ask

0 Votes 0 · ·

0 Answers