Can't find SeiralPort Device by using SerialDevice.FromIdAsync() and got imformation that “DeviceAccessStatus.DeniedByUser”

南楼画角 提交于 2019-12-25 02:58:45

问题


CustomSerialDeviceAccess is a sample on Microsoft's GitHub and it's for UWP to read/write SerialPort.

The problem is that the sample can open devices on Win10 but get "DeniedByUser" on Windows Server 2019 & Windows Server 2016. I try to find some different things about Registry and Group Policy but get nothing. Can you give me some suggestions? Thx!


回答1:


I got the way to fix the problem.

Use MDM/GP to set the trusted devices policy to ForceAllow.  For GP example, gpedit.msc -> Administrative templates -> Windows components -> AppPrivacy -> Trusted Devices.



来源:https://stackoverflow.com/questions/54397934/cant-find-seiralport-device-by-using-serialdevice-fromidasync-and-got-imforma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!