sockets - streamsocket.connectasync results in access denied exception from hresult: 0x80070005 on windows phone 8.1? -


i tying connect 2 windows phone 8.1 devices via bluetooth. have 2 buttons, 1 discover peers, , second 1 connect.

i sure enabled internet(client & server) , proximity capabilities. here code: (frist button works fine)

private async void button_click(object sender, routedeventargs e) {

        peerfinder.alternateidentities["bluetooth:paired"] = "";         var peerlist = await peerfinder.findallpeersasync();         if (peerlist.count > 0)         {                   t1.text = peerlist[0].displayname + "\n";         }         else t1.text= "no active peers";      }      private async void button_click_1(object sender, routedeventargs e)     {         peerfinder.alternateidentities["bluetooth:paired"] = "";         var peerlist = await peerfinder.findallpeersasync();         if (peerlist.count > 0)             t1.text = peerlist[0].displayname;         try         {             peerfinder.stop();             streamsocket socket = new streamsocket();             await socket.connectasync(peerlist[0].hostname, "1");    


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -