I am writing a web service which currently needs to read some settings from a json file on server.
string allSettingsTxt = File.ReadAllText(settingsPath); List list = JsonConvert.DeserializeObject(allSettingsTxt);
I tried giving following for the path string settingPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\MyCurrentDir\setting.json");
But this path wont resolve on the actual deployment, I believe it has to be something like http://servername/settings/setting.json ??
- Where can I store such json file
- what path I should use to access it?
Aucun commentaire:
Enregistrer un commentaire