Posting files with IdHttp
Posted on 2004-04-24
I'm having problems with posting files witch over 3.5mb to IIS servers with the Indy IdHttp component.
I get this error: "Socket Error # 10054 Connection reset by peer"
In this code (witch is a part of idhttp)
if (ARequest.Method in [hmPost, hmPut]) then
WriteStream(ARequest.Source, True, false); <------this line
I've tried to post to apche server and that works... I find this very strange because there is no request made on my iis server when my app failes.
Here is the code I use to call the IdHttp.post function:
formData := TIdMultiPartFormDataStream.Create;
HttpObject.Port := Port;
response := HttpObject.Post(posturl,formData);
I'm using "indy internet direct 9.0", Delphi 7 Enterprise on Windows XP.
Hope someone can help me.