I am running my solution locally, trying to read a .json file location stored in the Web.config file, that resides to a location on a test server.
Web.config:
<add key="TokenFilePath" value="\\test\inetpub\wwwroot\meetings\token.json"/>
This is the line where I get the error:
var token = JObject.Parse(System.IO.File.ReadAllText(ConfigurationManager.AppSettings["TokenFilePath"]));
Exception:
Exception Details: Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
If I change the location of the token.json file to a location in the network like below, then I am able to read the file.
\\data\applications\meetings\credentials\token.json
Is this an issue of permissions? or is this an issue of reading a json file from a location in inetpub requires a different method?
Any help is appreciated to better understand this.
Thank you, Erasmo