How i can ask user give me access on files which I could be read. So, I do this only for myself, so I understand, that I can start app from admin name and by idea i will can get access on files. But this UWP. Application, where i can't do this. From this problem, question arises. The question that I asked in the first sentence: how i can ask user give me access on files. On example, this code throw access exception on execute stage:
public static async Task<byte[]> LoadFromPathAsync(string path)
{
byte[] buffer = null;
using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
buffer = new byte[stream.Length];
await stream.ReadAsync(buffer, 0, buffer.Length);
}
return buffer;
}
I'm sorry for my poor knowledge of English, I wrote this text myself