allie910
asked on
idHttp error when the connection idle for some time (EIdSocketError, connection abort)
hi all,
i'm using idHtpp to get the HTML page from an online website and get the price value listed in the website. well, here is my code to get the file
idHttp1.Request.ProxyServe r := ProxyName ;
idHttp1.Request.ProxyPort := 8080;
HTMLContent := IdHTTP1.Get(IEAddress);
my problem is... it seems that if the connection has been idle for some time, it will give me an error :
exception class error EIdSocketError with message 'Socket error #10053
software caused connection abort.
how can I solve this problem.... so that it wont give me the error, although if the connection has been idle ?
well, Thanks alot =)
i'm using idHtpp to get the HTML page from an online website and get the price value listed in the website. well, here is my code to get the file
idHttp1.Request.ProxyServe
idHttp1.Request.ProxyPort := 8080;
HTMLContent := IdHTTP1.Get(IEAddress);
my problem is... it seems that if the connection has been idle for some time, it will give me an error :
exception class error EIdSocketError with message 'Socket error #10053
software caused connection abort.
how can I solve this problem.... so that it wont give me the error, although if the connection has been idle ?
well, Thanks alot =)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Allie,
You can only use the IdHTTP1 reference if you put the classname of the form before the function. (In my example TForm1). And you have to put the function in the declarations as well (or press shift+ctrl+c to automate it).
Have fun
You can only use the IdHTTP1 reference if you put the classname of the form before the function. (In my example TForm1). And you have to put the function in the declarations as well (or press shift+ctrl+c to automate it).
Have fun
ASKER
nvm,
i already put the syntax in the procedure...
but i still have the same error :'(
i already put the syntax in the procedure...
but i still have the same error :'(
ASKER
hi there... :)
NVM, I already found the solution, by closing the connection and disconnection the socket after I finish connecting to the web ;)
Thank you anyway
NVM, I already found the solution, by closing the connection and disconnection the socket after I finish connecting to the web ;)
Thank you anyway
ASKER
Hi All,
so sorry for the very late reply ... I got transfered to other project and my email address changed, so I didn't get the emails from expert exchange ... so sorry....
so sorry for the very late reply ... I got transfered to other project and my email address changed, so I didn't get the emails from expert exchange ... so sorry....
ASKER
i tried your suggestion... but it give error :
undeclared identifier on -- > result := IdHTTP1.Get(IEAddress);
I think U can't set any property in the function... any suggestion ? =)
thanks ;)