1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unable to download http file

Discussion in 'ASP.NET' started by studentintau, Aug 19, 2007.

  1. studentintau

    studentintau New Member

    Joined:
    Aug 4, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I would thank you if you help me with the next subject:

    I tried to download http file to c drive, but it did not work.

    Here is the code I wrote :
    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Net;
    
    namespace t2
    {
        class Program
        {
            static void Main(string[] args)
            {
                WebRequestMethods.File.DownloadFile("http://www.eng.tau.ac.il/students/forms/t4.pdf", "c:");
            }
        }
    }
     
    Last edited by a moderator: Aug 20, 2007
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Please read the documentation properly, it says that WebRequestMethods.File.DownloadFile doesn't have a 2nd parameter!
     

Share This Page