I am trying to read the settings file from Edge browser's native host which is implemented in UWP. This settings file has some list of URLs to process it in extension. But I am not able to read the file in the native host. I am getting the following exception while reading the file.
System.UnauthorizedAccessException: 'Access to the path 'C:\Users\abc\Desktop\Settings.dat' is denied.'
string fileName = "C:\\Users\\Sameer\\Desktop\\Settings.dat";
bool bfileExist = File.Exists(fileName);
if (bfileExist) { byte[] fileData = File.ReadAllBytes(fileName); }
does anyone have any idea to read the file in Edge browser's native host? Please let me know.