Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IDHTTP.Get - "Socket Error #11001. Host not found""
#1
Hi,

A confession first: I've never been playing too much with Indy, so my knowledge is limited to simple tasks.

A task is to send a Get request to a web page (actually an ASP.NET AXD HttpHandler) and receive some response back.

As simple code as:

Code:
var
  idHTTP : TIdHTTP;
  response : TStringStream;
begin
  response := TStringStream.Create('');
  idHTTP := TIdHTTP.Create(nil);
  try
    try
      idHTTP.Get('http://mywebsite.com/MyHandler.axd?id=123', response);
      if idHTTP.ResponseCode = 200 then
        //log ok
      else
        //log not ok
      ;
    except on E : Exception do
      //log exception
    end;
  finally
    idHTTP.Free;
    response.Free;
  end;
end;

For most users this works - response is received.

For some users, the following error is returned "Socket Error # 11001. Host not found.". I suspect it has to do with proxy they are using.

What options do I have to let those "socket error" users specify some more parameters and be able to receive response?

-žarko
Reply


Messages In This Thread
IDHTTP.Get - "Socket Error #11001. Host not found"" - by zarkogajic - 01-15-2021, 01:50 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)