website - C# Read ini value from url -
i have site example "http://example.com" , here settings.ini file "http://example.com/settings.ini" , in file wrriten text:
[client] enabled=1 i wan't give value c#, possible, how to?
for example i'm using code:
var myini = new inifile(@"c:\settings.ini"); var defaultvolume = myini.read("enabled"); messagebox.show(defaultvolume); it works good, i'm trying make this:
var myini = new inifile(@"http://example.com/settings.ini"); but not work, thanks.
edit:
i'm getting error:
an unhandled exception of type "system.argumentexception" in mscorlib.dll more information: uri formats not supported. updated:
this code gets value .ini, need integrate old code
webclient client = new webclient(); stream stream = client.openread("http://example.com/settings.ini"); streamreader reader = new streamreader(stream); string content = reader.readtoend();
read ini file content httpwebrequest (http://www.csharp-station.com/howto/httpwebfetch.aspx)
Comments
Post a Comment