This won't work. There is no general http wrapper for that. Why do you think, that you can list the files on a web server? They might even not exist at all, routing can present you any directory structure in the urls, that is absolutely not real, only generated. Could only work if the site you try to access is serving WebDav (Web-based Distributed Authoring and Versioning) on that virtual folder. It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers. Thus, if you have a good knowledge of this protocol, you can do the downloading job through the classes in System.Net. You can find a good starting point here:
http://admiral-announce.blogspot.hu/2010/04/listing-directory-using-webdav.html[
^]
But if there is no WebDav on the server, you have to try to fetch or at least test for that file as url. Try to access the
@"http://www.berat.net/lisanslar/berat.txt"
resource. If you get 200 OK, than you have it. You don't need to download the file itself, you can fetch only its's http headers with the HEAD method. See the answers here:
http://stackoverflow.com/questions/924679/c-sharp-how-can-i-check-if-a-url-exists-is-valid[
^]