Skip to main content
Solved

http connector status code -1


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
I am trying to use the http-connector to connect to a website/webshop (http://webshop.coffeefresh.nl). The http connector is returning error code -1. When I do the same request to http://bol.com for instance I receive status code 0 / http 200 OK.

I can reach the URL without any problems using a browser or insomnia. Just not with the http connector.

What can be the cause of the -1 error code, or, where do I look for the problem?

Best answer by Vincent Doppenberg

Hi Hugo,

The problem is most likely that your GUI is quite old. That version of the GUI still targets version 4.5 of the .NET Framework, which means that it will have the problem that I described earlier. Updating your GUI to the newest version, which targets .NET Framework 4.7, should fix this issue.
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

11 replies

Forum|alt.badge.img+4
Hi Hugo,

Could you try this process flow in a Windows GUI running in developer mode and check if there are any error messages in the Debug window?

Almost all scenarios in which an HTTP-connector returns the status code -1 will cause an error message with more details to be written to the Debug window.

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
The message in the Debug window:

The underlying connection was closed: An unexpected error occurred on a send.

Again, this does not happen with other websites. (http:\\coffeefresh.nl is ok, http:\\webshop.coffeefresh.nl gives an error).

Forum|alt.badge.img+4
Hi Hugo,

A common reason for this error is that the server rejects the request because the client is unable to comply with the security specifications of the SSL/TLS certificate on the server. I have checked the certificates for both domains, and indeed, the webshop.coffeefresh.nl domain is stricter and will reject TLS 1.0 connections, whereas the coffeefresh.nl domain will not.

This problem should only occur if you are using an older version of the .NET Framework (i.e. older than 4.6). Can you confirm that you are using an older version of the .NET Framework? Updating to 4.6 or higher should resolve this.

Forum|alt.badge.img+4
Hi Hugo,

Could you provide an update with regard to the status of this issue?

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • June 14, 2019
Hi Vincent,

I dropped the question at our system administrators, I did not receive a full answer yet. I will post an update here as soon as I know anything.
We solved the original question, sending an action URL to the webshop, by using the following code, where @URL is the action URL:

code:
EXEC sp_OACreate 'WinHttp.WinHttpRequest.5.1', @pointer OUTPUT
EXEC sp_OAMethod @pointer, 'open',NULL, 'GET', @URL,0
EXEC sp_OAMethod @pointer, 'send'
EXEC sp_OAMethod @pointer, 'Status', @status OUTPUT
EXEC sp_OAMethod @pointer, 'StatusText', @status_text OUTPUT
EXEC sp_OAMethod @pointer, 'responseText', @response_text OUTPUT
EXEC sp_OADestroy @pointer

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • June 18, 2019
We currently have the following version of the .net framework on our servers: 4.7.03062.

Forum|alt.badge.img+4
Hi Hugo,

Could you tell me which GUI version are you using? And can you also attach a screenshot of the input parameters of your HTTP connector?

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • June 18, 2019
Vincent,

GUI version 2018.2.18.0



Forum|alt.badge.img+4
Hi Hugo,

The problem is most likely that your GUI is quite old. That version of the GUI still targets version 4.5 of the .NET Framework, which means that it will have the problem that I described earlier. Updating your GUI to the newest version, which targets .NET Framework 4.7, should fix this issue.

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • June 18, 2019
Vincent,

Thank you for your answer. I have a newer version of the GUI in test, I will try that.

Hugo Nienhuis
Superhero
Forum|alt.badge.img+12
  • Author
  • Superhero
  • 136 replies
  • June 20, 2019
Update: the new GUI fixed the problem. Thnx again 🙂.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings