ControlChannelTrigger in UWP Windows 10 access denied

故事扮演 提交于 2019-12-08 03:15:17

问题


I am trying to implement background task with ControlChannelTrigger using WebSockets. In MSDN example I get an exception while running on Windows 10 Desktop in this place:

channel = new ControlChannelTrigger(channelId, serverKeepAliveInterval,ControlChannelTriggerResourceType)

Exception is "Access denied"

However in Windows 10 mobile this line passes and I get an exception Access Denied in the last line of the following block:

channel.UsingTransport(socket);   
var uri = new Uri(url);          
await socket.ConnectAsync(uri);

Is there any solution?

来源:https://stackoverflow.com/questions/32421747/controlchanneltrigger-in-uwp-windows-10-access-denied

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