简体   繁体   English

UWP用户模拟

[英]UWP User Impersonation

I am trying to access a Network Share Folder on a Hololens Application. 我正在尝试访问Hololens应用程序上的网络共享文件夹。 Within Unity I have a class which goes to a Network Share Folder grabs a model and loads it at run time. 在Unity中,我有一个转到网络共享文件夹的类,该类可以获取模型并在运行时加载它。 When I run it on the Hololens it seems it cannot find that network share and I suspect I need to impersonate a windows user and then access the network share that way. 当我在Hololens上运行它时,似乎找不到网络共享,我怀疑我需要模拟Windows用户,然后以这种方式访问​​网络共享。 Has anyone ever done impersonation within a UWP application? 有没有人在UWP应用程序中进行过模拟? I was thinking of creating a Class Library then importing the DLL but everything Ive tried from within the UWP class library doesn't work as all the examples are for .NET. 我当时正在考虑创建一个类库,然后导入DLL,但是我在UWP类库中尝试的所有方法均不起作用,因为所有示例均适用于.NET。

Regards, Jay 问候,周杰伦

Assuming you don't actually need to impersonate another user, but instead just authenticate to the other device as the current user, you should be able to do this with the privateNetworkClientServer and enterpriseAuthentication capabilities. 假设您实际上不需要假冒其他用户,而只是向其他设备身份验证为当前用户,则应该能够使用privateNetworkClientServerenterpriseAuthentication功能来做到这一点。 You can also use the FileOpenPicker to let the user pick something from the network. 您还可以使用FileOpenPicker让用户从网络中选择内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM