I use FtpWebRequest to upload a file to a ftp server. It works for a local server but not a remote server.
It hang up for a while when I debug to the call .GetRequestStream, then threw an exception which did not help becuase it just said "System error".
Here is the StackTrace:
at System.Net.PooledStream.PrePush(Object expectedOwner) at System.Net.ConnectionPool.PutConnection(PooledStream pooledStream, Object owningObject, Int32 creationTimeout, Boolean canReuse) at System.Net.FtpWebRequest.FinishRequestStage(RequestStage
stage) at System.Net.FtpWebRequest.SyncRequestCallback(Object obj) at System.Net.FtpWebRequest.RequestCallback(Object obj) at System.Net.CommandStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.Stream.Dispose() at System.Net.ConnectionPool.Destroy(PooledStream
pooledStream) at System.Net.ConnectionPool.PutConnection(PooledStream pooledStream, Object owningObject, Int32 creationTimeout, Boolean canReuse) at System.Net.FtpWebRequest.AttemptedRecovery(Exception e) at System.Net.FtpWebRequest.SubmitRequest(Boolean async)
It works fine when I use FileZilla to upload a file.
I tried to change .UsePassive and .Proxy.
is it a ftp server configuration issue? I believe it is a ms ftp server.
View Complete Post