locked
How to access a remote machine or network drive in a windows store app ? RRS feed

  • Question

  • I want to connect to a network drive or remote machine that requires Authentication and specify the UNC path,after accessing i want to download those files.How can  i achieve this because i am not getting any info on the internet ?

    19karabo91

    Friday, November 8, 2013 8:54 AM

Answers

  • you cant. your in the sandbox. you need to use the filepicker for such cases.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, November 8, 2013 9:08 AM
  • Hi 19karabo91,

    Read this document for more information about UNC access: File access and permissions. A combination of the following capabilities is needed.

    Let's say if you want to select the folder from the OpenFilePicker, your location should be at least access allowed from your File Explorer. Otherwise it would not show in your app. You also mentioned you cannot authenticate the user to access, I don't think you will be able to select it from OpenFilePicker.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Tuesday, November 19, 2013 5:28 AM
    Moderator

All replies

  • you cant. your in the sandbox. you need to use the filepicker for such cases.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, November 8, 2013 9:08 AM
  • Thanks for the reply Dave ,is there any sample that i can use to give me a kick start on how to achieve this ? 

    19karabo91

    Friday, November 8, 2013 9:18 AM
  • you can use this:

    FileOpenPicker picker = new FileOpenPicker();
    picker.FileTypeFilter.Add("*");
    var files = await picker.PickSingleFileAsync();


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, November 8, 2013 9:30 AM
  • Great stuff thank you a lot sir ,but it seems like i wont be able to authenticate a user to access a private network share drive and where do i place the UNC path to the drive ? 

    19karabo91

    Friday, November 8, 2013 9:49 AM
  • Hi 19karabo91,

    Read this document for more information about UNC access: File access and permissions. A combination of the following capabilities is needed.

    Let's say if you want to select the folder from the OpenFilePicker, your location should be at least access allowed from your File Explorer. Otherwise it would not show in your app. You also mentioned you cannot authenticate the user to access, I don't think you will be able to select it from OpenFilePicker.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Tuesday, November 19, 2013 5:28 AM
    Moderator