I'm trying to play a file on the MediaElement from a network location within a domain.
I have tried using impersonation as explained here: I can't access unc path from C#. Getting access is denied
i'm getting Error: 5 'Access is denied' when trying to perform the impersonation.
Also Setting the share to 'Everyone' did not help if I wanted to just copy (or open) the file from network to local
I have tried with the StorageFolder:
StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(Path.GetDirectoryName("FILELOCATION"));
StorageFile file = await folder.GetFileAsync(Path.GetFileName("FILENAME"));
var stream = file.OpenAsync(Windows.Storage.FileAccessMode.Read).GetResults();
And just with File.Copy("FileLocation","LocalFileLocation")
Nothing seems to work. Is there anybody here that can help?
Thanks is advance