Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Access to files in OneDrive denied in Hololens 2018


My app uploads a file (.jt - cad type) from OneDrive to Hololens, using this piece of code:

protected override void OnFileActivated(FileActivatedEventArgs args)
string appArgs = "";

   splashScreen = args.SplashScreen;
   appArgs += "File=";
   bool firstFileAdded = false;
   List<string> filePaths = new List<string>();

foreach (var file in args.Files)

          if (firstFileAdded) appArgs += ";";
          appArgs += file.Path;
          firstFileAdded = true;


    if (filePaths.Count > 0)

public void Update()
if (loadExternalFilePath != null)
string path = loadExternalFilePath;
loadExternalFilePath = null;
string newPath = Application.temporaryCachePath + Path.DirectorySeparatorChar + Path.GetFileName(path);

General.Instance.DebugTime("DataLoderManager::Update::" + Path.GetFileName(path));

if (File.Exists(newPath))

    File.Copy(path, newPath); //Exception!

File.SetAttributes(newPath, FileAttributes.Normal);

The upload worked fine on the previous version but I’ve just updated my Hololens’ version and started getting this exception:

System.UnauthorizedAccessException:'Access to the path 'C:\Data\Users\pleas\AppData\Local\Packages\microsoft.microsoftskydrive_8wekyb3d8bbwe\LocalState\OpenFile\ is denied.'

When I tried uploading the file from a different folder in Hololens (such as: Pictures or 3DObjects) it worked fine.
Is it still possible to upload files from OneDrive in the new version? If so, how can I solve this issue?
Note: I'm using Unity 5.6.2f1 (64-bit).

Thank you for your help.

Sign In or Register to comment.