Sunday, 15 March 2015

Link is not opening in Windows Phone 8.1 -



Link is not opening in Windows Phone 8.1 -

i have such code, work on console project in vs2012 desktop, not work in vs2013 wp8.

url = "http://lenta.ru/photo/2014/06/23/blackwidow/" webrequest request = webrequest.create(url); webresponse response = await request.getresponseasync(); /*from here programm doesn't work on wp8, works on pc console project on vs2012*/ stream info = response.getresponsestream();

why code work on console project, not work wp8 app?

fix. problem solved using httpclient instead of webrequest.

httpclient client = new httpclient(); seek { var result = await client.getstringasync(url); } grab { } client.dispose();

problem solved using httpclient instead of webrequest.

httpclient client = new httpclient(); seek { var result = await client.getstringasync(url); } grab { } client.dispose();

windows-phone-8.1

No comments:

Post a Comment