I have been working on an application using the file upload I had posted in the Source COde forum at WinInet FTP Upload (Overwrite or Append) Demo 3-10-08
A 'now and then' problem has come up:
Every "now and then" the FtpPutFile function fails with ERROR_INTERNET_CONNECTION_RESET (value 12031d).
I spent about an hour going thru MSDN looking for what can cause this, but everything came back to the same old crummy explanation in the SDK doc: "The connection with the server has been reset."
Does anyone know what causes this error? For that matter, does anyone understand what it means, "The connection with the server has been reset?"
It 'seems' to occur only when overwriting an existing file. And it "may" (I'd have to re-set up the test data and hope I can make it happen) have something to do with the same LOCAL file being sent twice in the same connection session to two different folders on the server.
Basically, the demo I posted above is all the salient "internet" code. The application itself does this:
One of the MSDN forum thread entries led me to believe it might be related to caching, but that thread died before the question was fully addressed, so that's equally pot luck.
But if caching is an issue, maybe I should disconnect/reconnect more often? Does that sound reasonable? This is a batch operation, so frankly it would be fine to disconnect/reconnect for each file.
Any pointers or suggestions will be appreciated.
Thanks,
A 'now and then' problem has come up:
Every "now and then" the FtpPutFile function fails with ERROR_INTERNET_CONNECTION_RESET (value 12031d).
I spent about an hour going thru MSDN looking for what can cause this, but everything came back to the same old crummy explanation in the SDK doc: "The connection with the server has been reset."
Does anyone know what causes this error? For that matter, does anyone understand what it means, "The connection with the server has been reset?"
It 'seems' to occur only when overwriting an existing file. And it "may" (I'd have to re-set up the test data and hope I can make it happen) have something to do with the same LOCAL file being sent twice in the same connection session to two different folders on the server.
Basically, the demo I posted above is all the salient "internet" code. The application itself does this:
Code:
Get filespecs to upload: may be any number each containing source name/mask, target name/token Connect to FTP site FOR EACH Spec Build list of local files found matching source spec FOR each file file found create output name (replaceable tokens can be used) FtpPutFile in default (binary) mode (default behavior, create if not found, overwrite if found) NEXT NEXT Spec Disconnect
One of the MSDN forum thread entries led me to believe it might be related to caching, but that thread died before the question was fully addressed, so that's equally pot luck.
But if caching is an issue, maybe I should disconnect/reconnect more often? Does that sound reasonable? This is a batch operation, so frankly it would be fine to disconnect/reconnect for each file.
Any pointers or suggestions will be appreciated.
Thanks,
Comment