locked
My code cant pull Json Data from web server.

    General discussion

  •  private async void get()
           {
                string URL ="http://8tracks.com/mix_sets/all.json?include=mixes?api_key=05570e44383665661d8edeeb5d4f07d415e14b4a";
                HttpClient c = new HttpClient();
                String response = await c.GetStringAsync(URL);
                textbook.Text = response;

    the code above works on someone's visual studio who tested it out for me... But I haven't gotten it to work in VS 13 and VS 14 on my surface pro 2 and my laptop. He said something about WMappManifest which I believe is for Silverlight application... Please someone help.
    Saturday, September 13, 2014 3:44 PM

All replies

  • In what way did it not work? If you got an error what was it and where?

    Saturday, September 13, 2014 3:57 PM
    Owner
  • there was no error... the code compiled and the application run! I just don't know why nothing happened. I set a breakpoint at the textbook.Text to see if the response string is the data from the webpage... but nothing shows up.
    Saturday, September 13, 2014 4:01 PM
  • In what way did it not work? We cannot help you if you don't explain what went wrong.

    What behavior did you expect? What behavior did you actually get? How do those differ?

    If there was a network error or bad response from your URL then I'd expect an exception. Even if you're not getting one now, for production use you'll need to handle exceptions here. See the remarks at http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.web.http.httpclient.getstringasync.aspx

    Since you aren't getting an exception the network communication at least appeared to work. You can fire up Fiddler to examine what your app sends and received back to make sure those match what you expect. If not, then drill down onto why whichever of those is unexpected didn't work. If they are correct, then drill down into why you're getting a different response from GetStringAsync.

    Incidentally, your code snipped returned a valid response using Windows.Web.HttpClient. Other than missing exception handling, the problem doesn't appear to be in the code snippet itself but in something else about the environment.

       string URL ="http://8tracks.com/mix_sets/all.json?include=mixes?api_key=05570e44383665661d8edeeb5d4f07d415e14b4a";
                Windows.Web.Http.HttpClient c = new Windows.Web.Http.HttpClient();
                String response = await c.GetStringAsync(new Uri(URL));
             
    returned:
    {"status":"200 OK","errors":null,"notices":null,"logged_in":false,"id":75,"path":"/mix_sets/all","restful_url":"http://8tracks.com/mix_sets/all","total_entries":1847165,"page":1,"per_page":12,"next_page":2,"previous_page":null,"total_pages":153931,"canonical_path":"/explore/all/hot","name":"Trending","smart_id":"all","mixes":[{"id":4778676,"name":"Top 100 Classical","published":true,"description":"Symphonies, concertos, opera, piano...The most famous and beloved pieces of classical music in one place.\n\nComplete your classical education right here.\n\nCover: Leopold Stokowski, conductor, in Disney's Fantasia","plays_count":7105,"likes_count":770,"slug":"top-100-classical","path":"/idril/top-100-classical","web_path":"/idril/top-100-classical","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&fit=crop","original":"http://8tracks.imgix.net/i/002/579/441/tumblr_mjrhzsf1Gt1qmiq9no2_500-6459.gif?q=65&fit=crop","animated":true},"restful_url":"http://8tracks.com/mixes/4778676","tag_list_cache":"classical, study, instrumental, relax, chill","first_published_at":"2014-09-11T19:23:53Z","liked_by_current_user":false,"nsfw":false,"duration":35842,"tracks_count":100,"user":{"id":740705,"login":"Idril","slug":"idril","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/000/740/705/93646.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4648294,"name":"+cooler+","published":true,"description":"~~~listen on full volume w some good speakers/headphones~~~","plays_count":3840,"likes_count":347,"slug":"cooler","path":"/pixiejoanna/cooler","web_path":"/pixiejoanna/cooler","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/587/018/tumblr_nbm6tuPfpX1r73mlvo1_500-6897.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4648294","tag_list_cache":"garage, deep house, rave","first_published_at":"2014-09-12T12:38:08Z","liked_by_current_user":false,"nsfw":false,"duration":2529,"tracks_count":10,"user":{"id":12356084,"login":"pixiejoanna","slug":"pixiejoanna","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/012/356/084/751.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4799209,"name":"Bad Mind ","published":true,"description":"Seven tracks including music by ASTR, Barsuk Records, and Boss (Ryan Hemsworth Remix).","plays_count":570,"likes_count":72,"slug":"bad-mind","path":"/carolinemar/bad-mind","web_path":"/carolinemar/bad-mind","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/587/760/ba673738daabe5268ad8a2dc58c2e38e-7968.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4799209","tag_list_cache":"glass animals, sensual, chill, ghost loft, phantogram","first_published_at":"2014-09-12T19:33:53Z","liked_by_current_user":false,"nsfw":false,"duration":2682,"tracks_count":11,"user":{"id":3648250,"login":"CarolineMar","slug":"carolinemar","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/003/648/250/49279.original.JPG?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4774259,"name":"fav spoken word;","published":true,"description":"fav spoken words ; \n\ncalms me down or makes me sad - either way i love them.","plays_count":2502,"likes_count":528,"slug":"fav-spoken-word","path":"/idkrad/fav-spoken-word","web_path":"/idkrad/fav-spoken-word","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/574/082/lake-vintage-photography-love-Favim.com-854912-6174.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4774259","tag_list_cache":"spoken word, poetry, favorites","first_published_at":"2014-09-08T02:33:00Z","liked_by_current_user":false,"nsfw":false,"duration":780,"tracks_count":9,"user":{"id":7943499,"login":"idkrad","slug":"idkrad","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/007/943/499/92273.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4787862,"name":"crush your enemies","published":true,"description":"20 songs to get you through\n\n[tumblr link: http://trohmanifesto.tumblr.com/post/97143154027/crush-your-enemies-20-songs-to-get-you-through]","plays_count":9348,"likes_count":1138,"slug":"crush-your-enemies","path":"/museodynamics/crush-your-enemies","web_path":"/museodynamics/crush-your-enemies","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/581/422/static-5557.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4787862","tag_list_cache":"fall out boy, my chemical romance, muse, angry","first_published_at":"2014-09-10T15:15:07Z","liked_by_current_user":false,"nsfw":false,"duration":4461,"tracks_count":20,"user":{"id":9077707,"login":"museodynamics","slug":"museodynamics","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/009/077/707/49865.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4734643,"name":"Insomnia","published":true,"description":"just a playlist of songs that i love.\n","plays_count":3217,"likes_count":1870,"slug":"insomnia","path":"/usherrthaaa/insomnia","web_path":"/usherrthaaa/insomnia","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/555/711/Insomnia-8572.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4734643","tag_list_cache":"alternative rock, moody, chill, rainy day, feelings","first_published_at":"2014-09-02T05:28:07Z","liked_by_current_user":false,"nsfw":false,"duration":2691,"tracks_count":13,"user":{"id":10551589,"login":"usherrthaaa","slug":"usherrthaaa","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/010/551/589/8795.original.?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4798038,"name":"alex turner & acoustics","published":true,"description":"he makes me so heart eyes emoji","plays_count":369,"likes_count":50,"slug":"alex-turner-acoustics","path":"/dontmovehoney/alex-turner-acoustics","web_path":"/dontmovehoney/alex-turner-acoustics","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/587/052/tumblr_nbinje9Z6o1toav2wo1_1280-9892.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4798038","tag_list_cache":"alex turner, alternative rock, alternative, indie, indie rock","first_published_at":"2014-09-12T13:20:06Z","liked_by_current_user":false,"nsfw":false,"duration":1385,"tracks_count":8,"user":{"id":9259897,"login":"dontmovehoney","slug":"dontmovehoney","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/009/259/897/8305.original.?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4797606,"name":"you don't have to apologize anymore.","published":true,"description":"Because I love them.","plays_count":71,"likes_count":8,"slug":"you-don-t-have-to-apologize-anymore","path":"/dreambender/you-don-t-have-to-apologize-anymore","web_path":"/dreambender/you-don-t-have-to-apologize-anymore","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/586/945/sdsdsd-5993.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4797606","tag_list_cache":"hisalisa, zankyou no terror, terror in resonance, twelve, lisa mishima","first_published_at":"2014-09-12T11:56:13Z","liked_by_current_user":false,"nsfw":false,"duration":3451,"tracks_count":13,"user":{"id":4208558,"login":"dreambender","slug":"dreambender","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/004/208/558/75182.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4793628,"name":"linger.","published":true,"description":"today is a easily bruising, soft and sad sort of day.\n\na mix of calm instrumentals if you are having a quiet day, if you're having a not-sure-what-to-feel day, if you just need to sit with your headphones on and think about things and maybe tear up a little to deep breathe and feel better later on.\n\ntomorrow will be kinder. ","plays_count":1428,"likes_count":133,"slug":"linger","path":"/afashionablefrown/linger","web_path":"/afashionablefrown/linger","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/584/624/99d759ad11446fead7d57545bb0abd41-4355.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4793628","tag_list_cache":"instrumental, anime, anime ost, soft, quiet","first_published_at":"2014-09-11T18:05:05Z","liked_by_current_user":false,"nsfw":false,"duration":2617,"tracks_count":12,"user":{"id":216853,"login":"afashionablefrown","slug":"afashionablefrown","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/000/216/853/8402.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4800359,"name":"a pop punk autumn","published":true,"description":"welcome fall. may you bring more than just various pumpkin spice flavor/scented objects. cover art is not mine.","plays_count":380,"likes_count":38,"slug":"a-pop-punk-autumn","path":"/fetus-calum/a-pop-punk-autumn","web_path":"/fetus-calum/a-pop-punk-autumn","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/588/382/2e589x3-7391.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4800359","tag_list_cache":"pop punk, alternative pop/rock","first_published_at":"2014-09-13T00:33:39Z","liked_by_current_user":false,"nsfw":false,"duration":3347,"tracks_count":15,"user":{"id":6766724,"login":"fetus-calum","slug":"fetus-calum","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/006/766/724/77849.original.?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4782929,"name":"it's time","published":true,"description":"*skeletons \"ooh\"-ing*","plays_count":6921,"likes_count":1206,"slug":"it-s-time","path":"/blendy/it-s-time","web_path":"/blendy/it-s-time","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=56&h=56&fit=crop","sq100":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=100&h=100&fit=crop","sq133":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=133&h=133&fit=crop","max133w":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=250&h=250&fit=crop","sq500":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=500&h=500&fit=crop","max1024":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?fm=jpg&q=65&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/578/680/tumblr_mu13172cjB1rxni5wo1_500-660.png?q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4782929","tag_list_cache":"halloween, spooky, 2spoopy, creppy","first_published_at":"2014-09-10T00:28:49Z","liked_by_current_user":false,"nsfw":false,"duration":3197,"tracks_count":24,"user":{"id":9552769,"login":"blendy","slug":"blendy","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/009/552/769/37602.original.png?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":false}},{"id":4785286,"name":"Saxo Deep House ♕","published":true,"description":"An awesome combination of Saxo House and Deep house.\n\nMy personal study mix for the upcoming school year ♕\n\nTwitter: will_mero\nInstagram: willmero","plays_count":15316,"likes_count":1453,"slug":"saxo-deep-house","path":"/will_mero/saxo-deep-house","web_path":"/will_mero/saxo-deep-house","cover_urls":{"sq56":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=56&h=56&fit=max","sq100":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=100&h=100&fit=max","sq133":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=133&h=133&fit=max","max133w":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=133&fit=max","max200":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=200&h=200&fit=max","sq250":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=250&h=250&fit=max","sq500":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=500&h=500&fit=max","max1024":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop&w=1024&h=1024&fit=max","original_imgix_url":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","original":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?q=65&sharp=15&vib=10&fm=jpg&fit=crop","cropped_imgix_url":"http://8tracks.imgix.net/i/002/580/042/musical-instruments-35v-497.jpg?rect=103,0,768,768&q=65&sharp=15&vib=10&fm=jpg&fit=crop","animated":false},"restful_url":"http://8tracks.com/mixes/4785286","tag_list_cache":"deep, saxophone, house, study, chill","first_published_at":"2014-09-10T01:52:38Z","liked_by_current_user":true,"nsfw":false,"duration":-1630,"tracks_count":16,"user":{"id":1839014,"login":"will_mero","slug":"will_mero","avatar_urls":{"sq56":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=56&h=56&fit=crop","sq72":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=72&h=72&fit=crop","sq100":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=100&h=100&fit=crop","max200":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=200&h=200&fit=max","max250w":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&w=250&h=250&fit=max","original":"http://8tracks.imgix.net/avatars/001/839/014/3527.original.jpg?fm=jpg&q=65&sharp=15&vib=10&"},"followed_by_current_user":true}}],"api_warning":["You didn't pass an API version, defaulting to api_version=2."],"api_version":2}
    

    --Rob

    Saturday, September 13, 2014 5:52 PM
    Owner
  • thank you bob... I think I will use this code you showed here. If it is okay I will like to send you a copy of the project I am talking about so you can see for your self. Some one already said same exact code worked for him and maybe something is wrong in my appmanifest file.
    Saturday, September 13, 2014 6:49 PM
  • Ok... I tried this exact code you show and it did not work! something must be wrong somewhere.
    Saturday, September 13, 2014 7:11 PM
  • Please try this

    First Add this into a class

    RootObject.cs

    public class CoverUrls
    {
        public string sq56 { get; set; }
        public string sq100 { get; set; }
        public string sq133 { get; set; }
        public string max133w { get; set; }
        public string max200 { get; set; }
        public string sq250 { get; set; }
        public string sq500 { get; set; }
        public string max1024 { get; set; }
        public string original_imgix_url { get; set; }
        public string original { get; set; }
        public bool animated { get; set; }
    }
    
    public class AvatarUrls
    {
        public string sq56 { get; set; }
        public string sq72 { get; set; }
        public string sq100 { get; set; }
        public string max200 { get; set; }
        public string max250w { get; set; }
        public string original { get; set; }
    }
    
    public class User
    {
        public int id { get; set; }
        public string login { get; set; }
        public string slug { get; set; }
        public AvatarUrls avatar_urls { get; set; }
        public bool followed_by_current_user { get; set; }
    }
    
    public class Mix
    {
        public int id { get; set; }
        public string name { get; set; }
        public bool published { get; set; }
        public string description { get; set; }
        public int plays_count { get; set; }
        public int likes_count { get; set; }
        public string slug { get; set; }
        public string path { get; set; }
        public string web_path { get; set; }
        public CoverUrls cover_urls { get; set; }
        public string restful_url { get; set; }
        public string tag_list_cache { get; set; }
        public string first_published_at { get; set; }
        public bool liked_by_current_user { get; set; }
        public bool nsfw { get; set; }
        public int duration { get; set; }
        public int tracks_count { get; set; }
        public User user { get; set; }
    }
    
    public class RootObject
    {
        public string status { get; set; }
        public object errors { get; set; }
        public object notices { get; set; }
        public bool logged_in { get; set; }
        public int id { get; set; }
        public string path { get; set; }
        public string restful_url { get; set; }
        public int total_entries { get; set; }
        public int page { get; set; }
        public int per_page { get; set; }
        public int next_page { get; set; }
        public object previous_page { get; set; }
        public int total_pages { get; set; }
        public string canonical_path { get; set; }
        public string name { get; set; }
        public string smart_id { get; set; }
        public List<Mix> mixes { get; set; }
        public List<string> api_warning { get; set; }
        public int api_version { get; set; }
    }

    Now after this add this to you mainpage and add try catch block in the mainpage constructor

            WebClient webClient = new WebClient();
    
    
                try
                {
                    //here downloading the json data 
                    webClient.DownloadStringAsync(new Uri("http://8tracks.com/mix_sets/all.json?include=mixes?api_key=05570e44383665661d8edeeb5d4f07d415e14b4a", UriKind.RelativeOrAbsolute));
                    webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
                }
                catch(Exception)
                {
                    MessageBox.Show("See Internet Connection");
                }

    Also add this

    public static List<RootObject> myData = new List<RootObject>(); 
    
    void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
            {
                try
                { // here adding data to list which is avaliable through out the program 
                    var obj = JsonConvert.DeserializeObject<List<RootObject>>(e.Result);
                    for (int i = 0; i < obj.Count(); i++)
                    {
                        myData[i] = obj[i];
    
    
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("See Internet Connection");
                   
                }
                
                       
               
            }

    If found Useful Please Mark as Answer. This is a proper working code and its working fine on my pc

    Muhammad Asad


    Saturday, September 13, 2014 7:33 PM
  • Muhammad, that code is not valid for Windows Store apps and Benji already has reasonable code using the appropriate classes.

    Benji, if you want to share a minimal project you can upload it to your OneDrive and post a link. I suspect that the problem isn't in the code and the project will still work for others. If you run the code snippet in a button click handler on an otherwise fresh blank app project does it work?

    I'd recommend breaking out fiddler and reexamining the web calls to see what is actually being sent and received in both the good and the bad cases (if you can generate a good one. Just the bad otherwise)

    Saturday, September 13, 2014 7:46 PM
    Owner
  • https://onedrive.live.com/redir?resid=1B701DD73A37D69C%2195283
    
    that is the project

    Saturday, September 13, 2014 8:27 PM
  • Rob sorry for my stupidity, I have just realized I haven't initialized the method that calls from the web server... Problem solved now... thanks
    Sunday, September 14, 2014 8:01 AM
  • Rob this code is from one of my application which is on the store i have created store app and it works 100% fine 

    Muhammad Asad.

    Microsoft Student Partner.

    Monday, September 15, 2014 5:41 PM
  • Muhammad,

    Neither WebClient nor MessageBox are valid classes for a Windows Store app.

    Perhaps you have a Windows Phone Silverlight app rather than a Windows Store app. The Building Windows Store apps with C# or VB forum is specifically about Windows Store apps. Windows Phone Silverlight app questions go in their own forum.

    --Rob

    Monday, September 15, 2014 7:31 PM
    Owner
  • Oh yes i remember that's for phone specifically for silverlight framework my bad :-(
    Monday, September 15, 2014 7:38 PM