FTP Error (Different Address Return in PASV Command)
-
quarta-feira, 18 de abril de 2012 06:30
Hi there,
Was Google around for three days but still din't get any resolution for this.
I was getting this error "The server returned an address in response to the PASV command that is different than the address to which the FTP connection was made." when i trying to get the response from my partner ftp server, Google implies me to change my .UsePassive to false, when i do tat, my error turn to "The operation has timed out" on .GetRequestStream() line. I tried to change my time out values to -1, and it doesn't work as well.
This is my exception details, any help would be appreciate :-)
System.Net.WebException was unhandled Message="The operation has timed out" Source="System" StackTrace: at System.Net.FtpWebRequest.SyncRequestCallback(Object obj) at System.Net.FtpWebRequest.RequestCallback(Object obj) at System.Net.CommandStream.InvokeRequestCallback(Object obj) at System.Net.CommandStream.Abort(Exception e) at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage) at System.Net.FtpWebRequest.GetRequestStream() at PAT_Log.Form1.UploadFile(String filename, String folder) in D:\Cindy Code\POS_PAT\PAT_Log_Bill_Payment\PAT_Log\Form1.vb:line 1161 at PAT_Log.Form1.UploadToISTServer() in D:\Cindy Code\POS_PAT\PAT_Log_Bill_Payment\PAT_Log\Form1.vb:line 1102 at PAT_Log.Form1.tmrUploadFile_Tick(Object sender, EventArgs e) in D:\Cindy Code\POS_PAT\PAT_Log_Bill_Payment\PAT_Log\Form1.vb:line 187 at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at PAT_Log.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
And the file is only few kb, by right its not suppose to that long of time to stream it
And is this possible the problem cause from FTP server setting? I got no experience in setting FTP server setting so i got no idea whether my connection was restricted by the server
- Editado lex5519 quarta-feira, 18 de abril de 2012 09:08
Todas as Respostas
-
quinta-feira, 19 de abril de 2012 07:13
Dear Lex,
Seems it was a bug that had been fixed in .NET 4.0 according to this :https://connect.microsoft.com/VisualStudio/feedback/details/97409/ftpwebrequest-passive-mode-with-different-data-ip
I got this solution at: http://stackoverflow.com/questions/2709498/the-server-returned-an-address-in-response-to-the-pasv-command-that-is-different
-
quinta-feira, 19 de abril de 2012 07:29Is VS2008 support Framework 4.0? as what i found, it don't, just to double confirm
-
quinta-feira, 19 de abril de 2012 08:52
Hello,
Check out the links below. It will help you.
http://stackoverflow.com/questions/3632208/ftpwebrequest-working-with-explicit-tls-ssl
http://forums.asp.net/t/1551505.aspx/1
-
quinta-feira, 19 de abril de 2012 09:16Thanks for all the link provided, really appreciate, but i already Google and read them through before i start the topic :-/
-
quinta-feira, 19 de abril de 2012 12:06You need visual studio 2010 to use dotnet framework 4.0 and their is visual studio 2011 which is still in beta though if you want to play with newest toys like me. I would say that you should upgrade to visual studio 2010. Windows 7 is stable compared to vista especially if you install sp1. I would if ssh wouldnt be better then ftp? Im thinking about creating a program to try and do this later when im experimenting.
Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://jefferycarlsonblog.blogspot.com/
-
sexta-feira, 20 de abril de 2012 06:16
Never come across / No experience in SSH yet hehe :D
Some1 ask me to trace the ping route, seems like its our partner FTP side setting problem, unable to reach to desire destination.
-
quarta-feira, 25 de abril de 2012 06:11
Just manage to settle this problem by using ftp function from rebex.dll
And i found this link which is very informative, will drop the link here for any dude that come across this problem in the future :-D
http://social.msdn.microsoft.com/Forums/en/ncl/thread/5a6dec87-0f30-44ca-adc5-a54e104efb91
- Marcado como Resposta lex5519 quarta-feira, 25 de abril de 2012 06:11

