WebRequest is a wrapper function around WinAPI, nobody knows exactly how except MetaQuotes devs.
Did you check what is send and receive as http data and mainly headers ?
Alain, both headers and body going into the 'WebRequest' call are empty (parameters in the webrequest are fed by using ?...&...&....)
I am trying to use Postman Proxy to catch the actual Request coming from MT5, but so far I haven't been able to catch that request.
I am assuming you're asking because MT5 internally adds a header to the outbound call? If so, could this header information be different on two different computers with the same architecture and on the same network? Also interesting is that everything was working fine on the 'bad' computer, up till last week, however without any intervention from my side, suddenly broke. It also 'broke' on a VPS (and on another VPS it is still working fine).
I have also tried to change IP addresses on the 'bad' computer; what should be noted though (if we start discussing this) that the server does not 'block' any requests. It simply appears as if the call is not going outbound but gets stuck on a locally cached file(?) I have cleared browsing histories and done completely fresh installs of all Metatrader instances.
Return headers and server response code below. MT5 runtime error is 0.

Alain, both headers and body going into the 'WebRequest' call are empty (parameters in the webrequest are fed by using ?...&...&....)
I am trying to use Postman Proxy to catch the actual Request coming from MT5, but so far I haven't been able to catch that request.
I am assuming you're asking because MT5 internally adds a header to the outbound call? If so, could this header information be different on two different computers with the same architecture and on the same network? Also interesting is that everything was working fine on the 'bad' computer, up till last week, however without any intervention from my side, suddenly broke. It also 'broke' on a VPS (and on another VPS it is still working fine).
I have also tried to change IP addresses on the 'bad' computer; what should be noted though (if we start discussing this) that the server does not 'block' any requests. It simply appears as if the call is not going outbound but gets stuck on a locally cached file(?) I have cleared browsing histories and done completely fresh installs of all Metatrader instances.
The actual request needs to be checked to maybe figure out what is happening. There are several ways to do it, I never used Postman proxy. For there answer you certainly get some headers, not ?
Is it possible to add a dummy parameter to your request ? something like "...&dummy=123", it could allow to bypass a cache.
Great point changing the parameters to bypass any cache: no luck with that, still 404.
I am still trying to catch the request somehow but no luck so far
For anyone having the same issue with WebRequest; please update to 5430. Issue was identified as a bug and resolved
- www.metatrader5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
WebRequest with the same code called from the same type of computer on the same network can return mysterious 404 or 403 even though other computers on the same domain using the same code return server error 200 (ok).
Server is working with no issues. Code has no issues. Problem seems to reside in WebRequest itself. Unforunately I cannot provide the code as it has a private key in the WebRequest call.
Attempting to figure out what underlying libraries WebRequest is using and if those could be compromised. Looking for anyone on the forum that has in-depth information of how WebRequest works AND if it possibly reverts to consulting locally cached (broken) files instead of consulting the actual web server.