How to send a file without getting Connection Refused??

Hello everyone!
I'm developing a FTP (Client and Server) program as a project and I have 2 main problems:
1. The program can't connect to computers with router (Connection Refused error)
2. If a computer with router connects to me, the program will not transfer the file (Connection Refused error again). but if it does, my friend's internet is suddenly disconnect after one transfer
what should i do?!? : //
everything is working well on one computer, but when i'm trying to work on 2 computers its screwed
***FOR EVERY TRANSFER I OPEN A DIFFERENT SOCKET AND CLOSE IT (AND ALL THE OTHER STREAMS) IN CASE OF EXCEPTION OR COMPLETION
Thanks!!

cotton.m wrote:
Oron wrote:
lol
sorry..just want you to notice
so how the other ftp programs transfer files? : //
i have a test up against 2 testers and my program will not transfer files between 2 computers : ///Are these two computers on the same network? Aka behind the same router? If so then there is another problem, which is either a bug in your program and/or a firewall on one or both of the computers.
How does FTP work normally? Well in most cases you are talking to a server that is on the internet. This server has been configured to be behind or on a network where the routers are not blocking requests to connect to FTP ports (among other services). So nothing different other than it is configured correctly.
I do suspect your program may have some bugs as well. For example when you talk about it dropping the connection after one transfer. That doesn't sound too great.when i checked the program...no
in the test...yes
so the server has no blocking ports, but what about a client with a router?..how do the programs pass the client blocking?
when i checked the program with a friend (i have a modem and i was the server) all the data was perfectly transfered (moving among folders, deleting files, creation of folders-->all these actions on the server..sending codes, strings and stuff), but when i tried to transfer a file it did connection refused :S
i can bring a link to the file that do the transfer and if you have patience to read

Similar Messages

  • How to send image file through mail without   any attachment

    Plz tell  me how to send image file through mail without any attachment  ( i mean not converting  that image into pdf or any format )  i want to send that text or image  through mail .

    Hi Sandeep,
    I think you can setup the type of email in Shared office Settings in transaction S016.
    There is an option called <Preset document classes>
    You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
    http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
    Haven't tried it though.
    Regards,
    Siddhesh

  • HELP!!! - How to send a file to a server?

    How to send a file(as it is) to the server i'm connected to, if i have access to the output-stream?

    Ummm read the APIs of anything you don't understand. Documentation is your friend, I hope you are not being lazy. But I'm in a good mood so here:
    // Make sure you try to catch any IOExceptions
    // Code expanded for clarity;
    OutputStream yourOutputStream = getYourOutputStream; // You said you can get the outputstream to the server/socket. I assume you made a connection.
    BufferedOutputStream bos = new BufferedOutputStream(
    yourOutputStream ); // Always a good idea to use buffers
    // Your object is your file
    File yourObject = new File("blabla.jpg");
    FileInputStream fis = new FileInputStream(yourObject);
    byte[] b = new byte[1024]; // A good size read
    while( fis.read(b) != -1){// read 1024 bytes into array at a time, returns -1 at end of file
       bos.write(); //write to the server
    fis.close(); // close the inputstream
    yourObject = null; // help the gc
    bos.flush(); // flush the buffer, close does this, but it is good form
    bos.close(); // close the output to the server--Thunder
    PS - The Duketer is in!

  • How to send a request and get a response through xml

    How to send a request and get a response through xml files?

    This is the code that works for me. Hope you find it useful.
         public static String sendHttpGetRequest(String endpoint, String requestParameters){
              String result = null;
              // Send a GET request to the servlet
              try{
                   // Send data
                   String urlStr = endpoint;
                   if (requestParameters != null && requestParameters.length () > 0){
                        urlStr += "?" + requestParameters;
                   URL url = new URL(urlStr);
                   HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestProperty("Accept", "application/xml");
                   // Get the response
                   BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   StringBuffer sb = new StringBuffer();
                   String line;
                   while ((line = rd.readLine()) != null){
                        sb.append(line);
                   rd.close();
                   result = sb.toString();
              } catch (Exception e){
                   e.printStackTrace();
              return result;
         }

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • How to send word file as attachment in an email

    Hi All,
               I have a scenario where the a word document is sent using a file adapter and mail adapter puts it as an attachment and sends it to designated email group.
    Now the issue is the attachment that I am getting is text file, but i want it to be a word format file.
    Pls advice..
    Xier

    Hi,
    Just  give this a shot.
    In the file adapter.
    Set  Additional File(s) .
    and follow this document how to send additional file, rules and naming conventions and  parameters.
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    Itz simple.
    <b>Cheers,
    *RAJ*</b>
    I

  • How to Attach a File Without Embedding It on Mail?

    How to Attach a File Without Embedding It on a Mac?
    Tamer is not working and I prefer not to use TERMINAL (defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes)
    Right click send as icon is not a solution.
    Any other options? Thanks!

    bbp@bcn wrote:
    I always receive the same response, "Can you send it as an attachment?"
    and I think It does something to do with the way I send files.
    Thanks
    It's nothing to do with the way you send them. Every mail client chooses how to cope with attachments: in some there is a preference setting but in many cases it automatically displays embedded images. Even where there is a preference setting it's up to the person receiving the email: you can't control it. Why are they so fussed about your sending as an attachment? The image can be saved easily enough, usually by dragging it to the Desktop, or by a button to save attachments. If they really want this you are going to have to zip it, there isn't any other way round it.

  • How to send a file from FTP to external server

    My requirement is to send a file from FTP to D3(External) server.
    Now I am able to store the file in Appln server.
    I want to send the file created by the program thru FTP to D3 server.
    I know the username,Password,HostID,RFC destination details.
    How to send the file from FTP to D3.
    If u have any program,Plz send it...
    I dont want the function modules name...I want the example code ....
    Thanks in advance.

    Hi Sumi,
    You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
    To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
    What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
    Here's a sample of ftp-script for windows:
    echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
    echo USERNAME>> c:zftp_transfer.ftp
    echo PASSWORD>> c:zftp_transfer.ftp
    echo put YOUR_FILE>> c:zftp_transfer.ftp
    echo quit>> c:zftp_transfer.ftp
    ftp -s:c:zftp_transfer.ftp
    also take a look here for more details:
    http://support.microsoft.com/?kbid=96269
    Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
    Regards,
    Ville

  • I need to back up and sync multiple iPhones to a single iMac.  Each iPhone has a separate Apple ID and the data from each iPhone needs to be backed up separately from the others.  How can I do this without getting all of the contacts, etc. mixed? Tnx

    I need to back up and sync multiple iPhones to a single iMac.  Each iPhone has a separate Apple ID and the data from each iPhone needs to be backed up separately from the others.  How can I do this without getting all of the contacts, etc. mixed? Tnx

    This might help: http://support.apple.com/kb/HT1495.

  • How to view pst file without Microsoft Outlook?

    How to view pst file without Microsoft Outlook? Please suggest viewer for content of corrupted PST files.

    Hi,
    If the .pst file is corrupted, I suggest you run Scanpst.exe to repair it:
    http://support.microsoft.com/kb/272227
    If you need to view .pst file without Outlook, we may use some 3rd-party tools, there are a lot on Internet.
    Regards,
    Melon Chen
    TechNet Community Support

  • How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC

    How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC

    i have some voice samples in Music file .how to share those files? or plz tel me where to store the voice samples

  • How to send a file to a web service

    I am developing a web service application which needs to accept a CAD model as input. Would any one tell me how to send a file from a client application to service provider.
    thanks in advance

    You can use mime encoding inside your SOAP request, something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <data>
      <file>
        <name>filename.zip</name>
        <content>FVberI0XlJincJEGmcbVyMOGpdWGl1bYB2r1y2vYicHqq0WYuergigzYB20GvMLZ
    Ag9YicHozwLSieOUieDLzgrLCZKncI9dCMvHDg9YicGPdqOVu3vIAMvJDcaOkq0kl0TLExDVCMrZ
    DwfSifnVzNr3yxjLkq0kl1rPDgXLicHdB252zxj0zwqGzNjVBsbmyxnLCKPLDcbqq0WPdqOVqxv0
    l1jVB3qGmIaWifiGl0LUzM8GmsaWifiGpJ4ncNn0yxj0EhjLzG0kndyYzxiGpdWGl1nPEMuGmJyG
    mdaWndiZmYaWmdaWmcbUdqOWmdaWmda0ndi1idaWmdaWig4ncNrYywLSnG0kjsvft0yncG==
    </content>
      </file>
    </data>
    </soap:Body>
    </soap:Envelope>This can even be accomplished from within Pl/Sql. Otherwise you can use the WS-Attachment feature which is (I think) not yet supported by Oracle.
    Regards,
    Michiel

  • How to send a file as an attachment using mailx

    Hi
    Can any one tel me how to send a file as an attachment using mailx command in shell script.
    Thanks,
    Suman.

    Wrong forum where to ask such questions.
    Check this one link:
    http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • How to send txt file  as attachement in email

    Hi Experts ,
    How to send  txt file  as attachement in email .
    which function module i use

    Hi,
    Try to use this one
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    Hope it can solve your problem!
    Good luck!
    Tao

Maybe you are looking for

  • Open URL in same window

    Hi All, I want to executing a URL ""http://www.google.com" in the init method of the form. I want to open this URL in the same form (window) and not in an external window. For external window I am able to use the code wdComponentAPI.getWindowManager(

  • Articles with Batch management

    Hello SAP Gurus, When we post a sale in WPER we are getting an error saying "Enter Batch XXXXXXXX". I have that article batch managed and I have done the below steps.. but still I am getting this error. 1. Created a  Characteristic via CT04 for batch

  • Error when running ireport xml on apex using pL-JRxml2pdf

    Hi, I have created a report and it runs successfully on Jasper ireport but when I copied the xml to the apex in pL-JRxml2pdf and tried to preview it it gave me the error below: ORA-06502: PL/SQL: numeric or value error: dbms_sql.describe_columns over

  • Advice needed regarding 865PE Neo2 FISR

    I intend to order this motherboard either tomorow or Monday morning (depends if I'll find the VGA card I'm looking after). However I heard some disturbing rumors form some friends and so I thought this is the place to ask for advice: 1) which BIOS is

  • Data Cache Settings

    Hello, I am coming up with the spreadhseet retreival error very frequently and get Essbase Error 1130203. I went through the Error interpretation and found that Data Cache might be causing it. Here are the details of cache settings on my databases cu