简体   繁体   中英

Need Help reading xml files from microsoft onedrive app folder

I am developing a windows 8 app in which i am trying to read xml files from Microsoft onedrive folder. The xml files get synced from onedrive to a particular folder. But when i an trying to read these synced xml files using StorgeFile.OpenAsync(FileAccess.Read) i get the following exception:

System.Unauthorized Exception occured in mscorlib.dll HRESULT:0X80070005(E_ACCESSDENIED)

I am able to copy these synced files to some other location and also when i copy these files to some other location and paste it back to OneDrive folder i am able to read them

Check to see if the files are blocked. Right click on file and click on properties. If you see an Unblock button press it. If you have multiple files that are blocked, you can use the following PowerShell script:

Get-ChildItem c:\users\tech360\OneDrive - Tech360\Xml | Unblock-File

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM