This post describes how to read a file which is hosted on server i.e on some url.

Let’s say I have a .txt file hosted here – www.yassershaikh.com/salary.txt I want my code to read from this hosted file. Below is how you do it using WebClient class.

var urlToReadFrom = "http://www.yassershaikh.com/salary.txt"
using(var client = new WebClient()) {
    string s = client.DownloadString(urlToReadFrom);
    return s;
}

Hope this helps.