WebRequest broken in build 1860? - page 2

 
Maximiliano Salvatti:

I use GetLastError(), but I received 0, not a code error.

When my MT5 stay in use durant the day, and I execute webrequest, sometimes I received this message:


<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. If you think this is an error, please contact the webmaster. <br><br>Your support ID is: 5009239298707147011</body></html>


This message is returned for me, and the function webrequest, don´t works.

I must close and reopen my MT5, after this this works.


Do you have any idea for this problem? What I can do for easy debug?


Thanks.

This has nothing to do with the topic. The MT5 bug was fixed in 1880 (I think).

Your problem is related to the site your are dealing with.

 
Alain Verleyen:

This has nothing to do with the topic. The MT5 bug was fixed in 1880 (I think).

Your problem is related to the site your are dealing with.

Ok, but the site is simple, just check.


The problem only occurs after an open MT5 time, usually when I change the parameters and the function is executed in OnInit or when I add a theft to the graph where OnInit is executed.


I close and open the MT5 and it returns to normal.


Is there a buffer I need to delete?


On the side of the site, is there anything I can do?


There is another topic or material that I can study about Webrequest, because I did not find anything.


I'm using build 1881.


If you can guide me, I'm very grateful.

 
Maximiliano Salvatti:

Ok, but the site is simple, just check.

Check what ? You didn't provide any link or code.

You got a reply from the site saying your url was rejected. It's not an MT5 or WebRequest issue, it's either a bug in your code or an issue with the site.

 
Alain Verleyen:

Check what ? You didn't provide any link or code.

You got a reply from the site saying your url was rejected. It's not an MT5 or WebRequest issue, it's either a bug in your code or an issue with the site.

I use this in MT5

          string url="http://www.mysite.com/api.asp?check1=987588"; 

            res=WebRequest("GET",url,cookie,NULL,50,post,0,result,headers); 
            if(res == -1) 
               {

Alert("Error", GetLastError());

               }

            else
               {
                  response=CharArrayToString(result,0,-1,CP_UTF8);
                  u_sep = StringGetCharacter(sep,0);
                  size = StringSplit(response,u_sep,dados);
                  if (size > 0)
                     {
                        if (ArraySize(dados) < 7)  THIS POINT I HAVE ERROR
                     {
                        Alert("Error: ",GetLastError()," Res: ",res);
                        Alert(response);
                        ResetLastError();
                        Alert("You must close your Metatrader 5");
                     }



In my file api.asp, I received get data and return data ;0;0;1;1;0;1;1

If I put url in my browser, its works every time.


My question is:

Why I received url rejected and I must close my MT5 and reopen for works? 

And Why this happens only sometimes?


Thanks



 

Hi,

I have same problem, after an open MT5 time the webrequest return error code: 5203 whit responce: 1001.

Only after 5 minutes or Metatrader restarting the webrequest working. During the request i try to send same POST on same URL and work fine.

There is a solution for this bug?


Thank you!

 
Alessandro Mizzoni:

Hi,

I have same problem, after an open MT5 time the webrequest return error code: 5203 whit responce: 1001.

Only after 5 minutes or Metatrader restarting the webrequest working. During the request i try to send same POST on same URL and work fine.

There is a solution for this bug?


Thank you!

Please look at builds and dates.

 
Nelson Wanyama:

Please look at builds and dates.

Hi Nelson,

My build is MT5: 2615

And windows 10 date have automatic settings

Reason: