Possible Duplicate:
Unable to upload file

I am trying to upload my text file using putfile function it give error" 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 192.168.2.120:50548"

string str2 = Convert.ToString(ftp.PutFile(@"C:\Documents and Settings\neetesh\Desktop\FTPS Project All\Test\shwetamber.docx", "/wwwroot/shwetamber.docx")); if (ftp.PutFile(listView1.Items[i].SubItems[1].Text,strSort(listView1.Items[i].SubItems[1].Text)) > 0) { }

asked 02 Aug '10, 07:09

neham's gravatar image

neham
16
accept rate: 0%

edited 10 Aug '10, 13:03

Rebex%20KB's gravatar image

Rebex KB ♦♦
256312

The question has been closed for the following reason "exact duplicate" by Martin Vobr 02 Aug '10, 14:34


Hello, this is a network error and usually means that the target machine/port is not accessible. Possible causes:

  1. The target machine is offline or not connected to the network at the moment.
  2. No FTP server runs at the target machine at specified port.
  3. Access to the specified port was blocked by firewall policy at the target machine.
  4. Access to the specified port was blocked by firewall policy at your local machine.

Are you able to connect to the target machine using any third-party FTP client (such as Filezilla) from the same computer where you tried running your code?

This kind of error is usually thrown from ftp.Connect call and not from ftp.PutFile.

Could your either edit your question and include the FTP communication log or mail it to support@rebex.net for analysis? You can see how to create a communication log at http://www.rebex.net/kb/logging.aspx. This log will include the exception details and might help us to determine the root cause of the problem.

link

answered 02 Aug '10, 13:30

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310
accept rate: 37%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×136
×22
×18

Asked: 02 Aug '10, 07:09

Seen: 514 times

Last updated: 22 Mar '11, 23:22