Reading files in a webservice
Posted
by mouthpiec
on Stack Overflow
See other posts from Stack Overflow
or by mouthpiec
Published on 2010-06-12T14:17:11Z
Indexed on
2010/06/12
14:22 UTC
Read the original article
Hit count: 187
Hi,
I have a webservice, in which I read the settings saved in an xml file. I read the setting by the following command:
string dpath = HttpContext.Current.Request.PhysicalApplicationPath.ToString();
XmlTextReader reader = new XmlTextReader(dpath + "Settings.xml");
This is working perfectly when running the application on the localhost, but when I publish the webserver I am getting an error, most probably because the settings are not being loaded.
Am I using the right command to read the file ? thanks
© Stack Overflow or respective owner