StreamSocketListner.BindServiceNameAsync(..) throwing exception: Access denied RRS feed

  • Question

  • I'm trying to establish a bluetooth connection between my desktop and phone.  The devices are paired. I have Internet (Client) Internet (Client & Server) Private Networks capabilities enabled.

    I'm using the code from the sample (which doesn't work when i test it on both devices).

    Here's the first bit of code..


            private RfcommServiceProvider rfcommProvider;
            private StreamSocketListener socketListener;

            // The Chat Server's custom service Uuid: 34B1CF4D-1069-4AD6-89B6-E161D79BE4D8
            private static readonly Guid RfcommChatServiceUuid = Guid.Parse("34B1CF4D-1069-4AD6-89B6-E161D79BE4D8");


    try { rfcommProvider = await RfcommServiceProvider.CreateAsync(RfcommServiceId.FromUuid(RfcommChatServiceUuid)); // creat a listener for this service and start listening socketListener = new StreamSocketListener(); socketListener.ConnectionReceived += OnConnectionReceived; await socketListener.BindServiceNameAsync(rfcommProvider.ServiceId.AsString(), SocketProtectionLevel.BluetoothEncryptionAllowNullAuthentication);

    Unfortunately I'm getting an access denied exception on BindServiceNameAsync. Please help get this working.

    Tuesday, December 9, 2014 10:12 PM

All replies