You must Sign In to post a response.
  • Category: .NET

    FTP File Uploading Error help me resolve this error

    Hi i am trying to upload file from FTP it is working my local when i tried with debugger but with out debugger it is not working.

    below error i am facing

    "The underlying connection was closed the server committed a protocol violation"

    how to resolve this error i tried in google but i m not getting exact solution so please help me

    Advance Thanks to all
  • #764880
    Hi,

    You raised the same query multiple times, this is one type of violation, request you to send mail to webmasters to delete other threads.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #764881
    i posted only one time even me also not understanding how its came multiple times can you please give me email id with whom i need to contact delete rest of threads.........Thanks

  • #764882
    Hi,

    You please send mail to the below mentioned mail id's with the thread links

    raghavkumar1@gmail.com
    asheejtk@gmail.com
    tonyjohn@gmail.com

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #764891
    Hai Chanti,
    As you are uploading the file to the server, so the connection should not be closed during the upload.
    For this, you need to make your connection live by using the property KeepAlive as true for the network.
    You can also check the work around provided in the below links:

    http://stackoverflow.com/questions/26278782/the-underlying-connection-was-closed-the-server-committed-a-protocol-violation

    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #764919
    Can you post the code you are using. It seems like a security issue.
    If we can go through your code we may be able to suggest you what is wrong in the code.


    Regards,
    Asheej T K
    Microsoft MVP[ASP.NET/IIS]
    DotNetSpider MVM

  • #764926
    I think you are opening the ftp and trying the upload the file into it.
    1. Before uploading the file you may quit the ftp
    OR
    2. You may try to upload the multiple times
    If you share you code we can identify the issues little bit clearly. Try the following code

    try
    {
    bool opened = false;
    FTPClient ftp = new FTPClient("host");
    ftp.Login("login","Pwd");
    opened = true;
    ftp.TransferType = FTPTransferType.ASCII;
    ftp.Put(this.m_file,this.m_ftpLocation);
    if (opened)
    ftp.Quit();
    }
    catch(FTPException e)
    {
    return e.Message;
    }
    return "Done";

    By Nathan
    Direction is important than speed

  • #764939
    I got solution Thanks to all for responding .....have a great day to all DNS members


Sign In to post your comments