简体   繁体   中英

Opening a File in onedrive from two different computers

I have an app that acceses files in one drive.I can easily create/read the file from the computer that i developed the app. As soon as I test the app in another computer I get this error The file cannot be accessed by the system . Here is the code I'm using:

Stream stream = new FileStream(fpath, FileMode.Open, FileAccess.Read, FileShare.Read);

The interesting part is I can see the file is there by calling on File.Exists(fPath) but I still cannot open it. I appreciate any help. Thanks

I finally managed to fix it. The only thing i have to do is right click on the folder/files in OneDrive and choose "Make available offline"

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