C#UWP连接到SharedFolder

时间:2016-07-14 13:00:59

标签: c# directory uwp

我无法将UWP与公共共享文件夹连接到另一个系统。

示例:

new CredentialCache().Add(new Uri(@"\\[IP]"), 
       "Basic",new NetworkCredential("[USER]", "PASS]", "[IP]"));

new CredentialCache().Add(new Uri(@"\\[IP]"),"Digest",
        new NetworkCredential("[USER]", "[PASS]", "[IP]"));

new CredentialCache().Add(new Uri(@"\\[IP]"), "SHARED", 
        new NetworkCredential("[USER]", "[PASS]", "[IP]"));


var files = Directory.GetFiles(@"\\[IP]\[SharedName]");

var folder = await StorageFolder.GetFolderFromPathAsync(@"\\[IP]\[SharedName]");
  1. 例外:网络访问danied
  2. 例外:访问是危险的

0 个答案:

没有答案