Reputation: 101
I am currently using
string[] defaultcommands = (File.ReadAllLines(@"commands"));
to load a local files contents in the solution as an array. I want to be able to update the contents of that file from my workstation and it take effect on all instances running. To do this, I'd like to load the default command file from a url like: https://mywebsite.com/assistant/commands.txt. I tried string[] defaultcommands = (File.ReadAllLines(@"https://mywebsite.com/assistant/commands.txt")); but it doesn't understand how to handle the URL I guess. It comes back with: System.NotSupportedException.
How can I load a text file from a URL into an array?
Upvotes: 0
Views: 682