I built a tool to process files from windows local appdata folders in the controller part and the tool is working fine while run in local.... I deployed this site on Azure web service app and I am not able to fetch the files. Is there any settings needed to configure to fetch the appdata folders/permissions?
code where I am fetching local folders:
[HttpPost]
public void FetchTheFile(String FilterVariables)
{
Request.InputStream.Seek(0, SeekOrigin.Begin);
StreamReader sr = new StreamReader(Request.InputStream);
string srrr = sr.ReadToEnd();
var settings = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore };
FilterVariables FV = JsonConvert.DeserializeObject<FilterVariables>(srrr, settings);
try
{
//Deserialize();
string appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string filePath = Path.Combine(appDataFolder, "CRM\\Logs\\Outlook.log");
if (System.IO.File.Exists(filePath))
{
Stream stream = System.IO.File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
StreamReader streamReader = new StreamReader(stream);
str = streamReader.ReadToEnd();
str = "<?xml version=\"1.0\" encoding=\"utf - 8\"?><LOGS>" + str + "</LOGS>";
str = Regex.Replace(str, @"[\u0000-\u001F]", string.Empty);
XmlSerializer serializer = new XmlSerializer(typeof(Models.LOGS));
Models.LOGS logs = new Models.LOGS();
StringReader strReader = new StringReader(str);
XmlTextReader xmlReader = new XmlTextReader(strReader);