CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2004
    Posts
    169

    Thumbs down Download file from server to client machine (Urgent)

    Hi frnds

    In app i want to give a link when it clicked all the files from the specific folder must be copied to client machine.
    what i was trying is using
    File.Copy(Source,Destination,true)

    this statement is working fine if i m using the server as the client but if i installed this app on the server and access this app from the client machine it does not copy any file.

    pls tell me the safest way to copy a file from server to client machine.

  2. #2
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210

    Re: Download file from server to client machine (Urgent)

    Quote Originally Posted by FundooGuy
    but if i installed this app on the server and access this app from the client machine it does not copy any file.
    What do you mean by does not copy ?
    Do you get an exception ? What is the error message ?
    Did you check permissions ? does the Client have permissions to read from the server ?
    Do you copy from LAN or downloading from web (HTTP) ?
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

  3. #3
    Join Date
    Sep 2004
    Posts
    169

    Thumbs down Re: Download file from server to client machine (Urgent)

    It does not show any exception.
    i m trying to copy on web.

  4. #4
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    2,210

    Post Re: Download file from server to client machine (Urgent)

    Ok
    This is a very simple download code :
    Code:
     System.Net.WebClient client=new System.Net.WebClient();
       client.DownloadFile(txtURL.Text,txtFile.Text);
    Hesham A. Amin
    My blog , Articles


    <a rel=https://twitter.com/HeshamAmin" border="0" /> @HeshamAmin

  5. #5
    Join Date
    Apr 2005
    Posts
    27

    Re: Download file from server to client machine (Urgent)

    Try to add your server (http://myserver) in the client side into the setting of Internet Explorer -> security -> trusted sites
    ================
    Sorry for my English.
    ================

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured