You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

切换访问网络文件夹的Network Authentication功能是否需用户注销重登?

关于UWP访问网络文件夹的Network Authentication功能与注销登录的疑问解答

不需要用户注销并重新登录。不过要注意,当你修改了UWP应用的功能声明(比如添加Enterprise Authentication这类权限)后,需要重新部署应用才能让新的功能配置生效,用户只需要重启应用即可,无需注销系统账户。

下面是用于访问网络文件夹的UWP示例代码(VB.NET):

Imports Windows.Storage
Public NotInheritable Class MainPage
    Inherits Page
    Protected Overrides Async Sub OnNavigatedTo(e As NavigationEventArgs)
        MyBase.OnNavigatedTo(e)
        Dim folder As StorageFolder = Await StorageFolder.GetFolderFromPathAsync(<network share path>)
        For Each f In Await folder.GetFoldersAsync()
            Debug.WriteLine(f.Name)
        Next
        Dim x = 1
    End Sub
End Class

要让这段代码正常运行,你需要在应用的Package.appxmanifest中添加以下功能声明:

  • Enterprise Authentication
  • Internet (Client)
  • Private Networks (Client & Server)

内容的提问来源于stack exchange,提问作者SeanW

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:46:34