Files on servers

Hi,

Asume that an ASCII text file exists on a server, I know the path, for instance http://www...../file.txt and I have the Read access for this file. How have I to enter the path

Thanks for your answers,

Valentin



Answer this question

Files on servers

  • szubara

    And what would you like to do


  • AJMILLS


    WebClient client = new WebClient();
    using(Stream responseStream = client.OpenRead( "http://www.mydomain.com/file.txt" ))
    using(StreamReader reader = new StreamReader( responseStream ))
    {
    string line;

    while( (line = reader.ReadLine()) != null )
    {
    Console.WriteLine( "Line readed: " + line );
    }

    Console.WriteLine( "End of response." );
    }




  • Files on servers