1
Vote

A Web Exception Was Unhandled

description

I Started Using The Test Application, It Successfully Connected To The FTP Server, Could View All Files Available And Browse Them But When I Attempted To View A Folder Which Was Inside Another Folder I Recieved The Following Exception:

System.Net.WebException was unhandled
Message=The remote server returned an error: 227 Entering Passive Mode (31,170,162,143,39,166)
.
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.GetResponse()
   at libftp.ftp.browse(String path) in <ProjectPath>\libftp\libftp\ftp.cs:line 145
   at libftp.ftper.browse(String path) in <ProjectPath>\libftp\libftp\ftper.cs:line 59
   at libftptest.MainForm.lstRemote_DoubleClick(Object sender, EventArgs e) in <ProjectPath>\libftp\libftptest\MainForm.cs:line 96
   at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.ListBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.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(Form mainForm)
   at libftptest.Program.Main(String[] args) in <ProjectPath>libftp\libftptest\Program.cs:line 22
   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: System.Net.Sockets.SocketException
   Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 31.170.162.143:10150
   Source=System
   ErrorCode=10060
   NativeErrorCode=10060
   StackTrace:
        at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
        at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
        at System.Net.FtpControlStream.QueueOrCreateDataConection(PipelineEntry entry, ResponseDescription response, Boolean timeout, Stream& stream, Boolean& isSocketReady)
        at System.Net.FtpControlStream.PipelineCallback(PipelineEntry entry, ResponseDescription response, Boolean timeout, Stream& stream)
        at System.Net.CommandStream.PostReadCommandProcessing(Stream& stream)
        at System.Net.CommandStream.PostSendCommandProcessing(Stream& stream)
        at System.Net.CommandStream.ContinueCommandPipeline()
        at System.Net.CommandStream.SubmitRequest(WebRequest request, Boolean async, Boolean readInitalResponseOnConnect)
        at System.Net.FtpWebRequest.TimedSubmitRequestHelper(Boolean async)
        at System.Net.FtpWebRequest.SubmitRequest(Boolean async)
   InnerException: 
______________________________________________________________________________-

comments

prahlad1981 wrote Jan 27, 2013 at 3:15 PM

Hi,

Could you let me know the entire folder structure on the FTP server along with its operating-system (Windows/Linux based). It will help me reproduce the scenario.

Cheers,

Prahlad.

wrote Jan 27, 2013 at 3:17 PM

wrote Feb 14, 2013 at 12:19 AM