C# transfer a file over network
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: C# transfer a file over network

  1. #1
    Join Date
    Nov 2010
    Posts
    2

    C# transfer a file over network

    I've been trying to implement this example for transferring files over a network (LAN & Internet)
    http://www.dotnetspider.com/resource...prime-num.aspx

    However, I run the program and it copies the file to my specified directory fine but transfers double the amount of bytes, doubling the file size and thus corrupting the file!

    I have searched the net for what I need but can't find any decent tutorials that actually work,

    Basically I want to have a server which can accept a connection, then send a particular file back to the user.

    I assume I will want to use filestream for my transfers?

    I'm still fairly new to C# but not to programming.

  2. #2
    Join Date
    Nov 2010
    Posts
    2

    Re: C# transfer a file over network

    Sorry, wrong link:
    Can't find an edit link.

    http://www.dotnetspider.com/resource...r-using-C.aspx

  3. #3
    Join Date
    Jun 2008
    Posts
    2,477

    Re: C# transfer a file over network

    Not sure why they are flushing the file in every iteration, but you don't need to. Also, it helps if you post your actual code instead of the example. Looking at an example is not helpful, we need real code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center