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 network share with the HoloLens

edited February 2017 in General


I want to write an application that reads some files from a Network share. For that I set up a NAS using the IP, and a specific user to access this share.

This is what I tried:
path = @\\Documents\SharedFiles\;
string userName = @HoloLens;
string userPassword = "HoloLensPassword";
string userHost = "";

NetworkCredential theNetworkCredential = new NetworkCredential(userName, userPassword);
CredentialCache theNetCache = new CredentialCache();
theNetCache.Add(new Uri(path), "Basic", theNetworkCredential);
var g = theNetworkCredential.GetCredential(new Uri(path), "Basic");
var tt = CredentialCache.DefaultNetworkCredentials;
StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(path);
IReadOnlyList<StorageFile> fileList = await folder.GetFilesAsync();
foreach (StorageFile sF in fileList)
textBlock.Text += sF.DisplayName;

It always says access denied. When i run the app on my Windows-Notebook, the app works on Windows. But it only works if i already logged in into the NAS. Without a previous Login in the NAS it does not work, too. So i think i Need to generate some Credentials on the HoloLens-Device.
I'd like to know if this is the correct way and what is wrong with that code. I searched the Internet for hours to find a solution but i was not successful.



  • Did you ever fix your problem? I was interested in this as well...

Sign In or Register to comment.