Hi I'm using the aynchronous members of the WebRequest to upload files to an IIS ftp server.
I can upload two files with success. However BeginGetResponse on the third file never calls my call back routine!
Any Ideas welcome?
thanks,
john
Hi I'm using the aynchronous members of the WebRequest to upload files to an IIS ftp server.
I can upload two files with success. However BeginGetResponse on the third file never calls my call back routine!
Any Ideas welcome?
thanks,
john
A few ideas:
Hi Justin,
Thanks for your response. I discovered that my issue was with ServicePoint.Connection.Limit
I increased this value to 4 and started using the Synchronous methods. My FTP stuff now uploads files as I require.
However though I can verify that my files reach the server intact The Close() method on the stream most of the time throws a web exception complaining that the connection was closed.
I've tried KeepAlive but only reduced the exceptions for about 10% (very rough) of the transfers.
I ignore the the errors as I am able to confirm that the bytes sent == the file total bytes but it is not gentlemanly.
I'm not really sure how to get round this; I spent days googling and found folk with similar issues but no real answers.
For the time being I have to continue with the rest of my project as time is short, If you have any ideas as to how to prevent the underlying connection from closing (I am guessing it's the control channel that drops) I'd appreciate your insights.
John.