I have checked the many other threads here on this error but they all seem nuch more complicated than my very simple situation.
I have a TIdHTTP component (ver 10.2.5) on a form in Delphi 2009 connected to a TIdSSLIOHandlerSocketOpenSSL. All parameters have been left at their default.
I get the text of a web page using the single line
MyString := IdHTTP1.Get(searchURL);
At home on a Win 7 machine this line works fine but if I copy my program to a server at work (running server 2013) that line generates the error
EIdSocketError 10061 Connection refused.
Other posts mention checking the port etc but there is no port property in TidHTTP.
Is this error at work likely to be caused by the firewall or antivrus program at work preventing my program getting on the Internet, or is there something special I need to do in my program?
(Putting the same url into Internet Explorer at work shows the expected page ok)
For info the default parameters of the TIdHTTP and TIdSSLIOHandlerSocketOpenSSL components are as follows:
object IdHTTP1: TIdHTTP
IOHandler = IdSSLIOHandlerSocketOpenSSL1
AllowCookies = True
ProxyParams.BasicAuthentication = False
ProxyParams.ProxyPort = 0
Request.ContentLength = -1
Request.Accept = 'text/html, */*'
Request.BasicAuthentication = False
Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)'
HTTPOptions = [hoForceEncodeParams]
end
object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
MaxLineAction = maException
Port = 0
DefaultPort = 0
SSLOptions.Mode = sslmUnassigned
SSLOptions.VerifyMode = []
SSLOptions.VerifyDepth = 0
end