Answered by:
Calling Web API from a Windows Phone 8 Application

Question
-
HI
I'm new in wp development , I take this as example
http://www.asp.net/web-api/overview/mobile-clients/calling-web-api-from-a-windows-phone-8-application
But I don't understand because the app not comunicate with web api , I look this article, but it don't work
http://blogs.msdn.com/b/robert_mcmurray/archive/2013/08/20/connecting-the-windows-phone-8-emulator-to-web-api-applications-on-a-local-computer.aspx
The errore is " internal error ", but It is a generic error I don't understand to solve.
How I to create a correct environment for testing the app end web api?
BR- Edited by cicciux Monday, March 16, 2015 10:48 AM
Monday, March 16, 2015 10:47 AM
Answers
-
First thing you need to figure out is the error happening on the server or in the mobile app. I would use a client you can call the web api (rest) service with first to see if it is working. I use the chrome extension advanced rest client to do this but you can use any rest client you like.
- Proposed as answer by dns jinung Tuesday, March 31, 2015 9:28 AM
- Marked as answer by Amy PengMicrosoft employee Tuesday, April 7, 2015 8:06 AM
Monday, March 16, 2015 12:44 PM -
I've noticed that too. It is actually returning the results as JSON.
To view the result of the call go into the developer tools (F12), then go to Network, click start monitoring and resend your request.
You should see the result appear in the trace list. You can then double click it and select View Body to see the response body.
Check this it would help, because i think the service didn't return any kind of data
- Proposed as answer by dns jinung Tuesday, March 31, 2015 9:28 AM
- Marked as answer by Amy PengMicrosoft employee Tuesday, April 7, 2015 8:06 AM
Monday, March 16, 2015 1:32 PM
All replies
-
First thing you need to figure out is the error happening on the server or in the mobile app. I would use a client you can call the web api (rest) service with first to see if it is working. I use the chrome extension advanced rest client to do this but you can use any rest client you like.
- Proposed as answer by dns jinung Tuesday, March 31, 2015 9:28 AM
- Marked as answer by Amy PengMicrosoft employee Tuesday, April 7, 2015 8:06 AM
Monday, March 16, 2015 12:44 PM -
I've noticed that too. It is actually returning the results as JSON.
To view the result of the call go into the developer tools (F12), then go to Network, click start monitoring and resend your request.
You should see the result appear in the trace list. You can then double click it and select View Body to see the response body.
Check this it would help, because i think the service didn't return any kind of data
- Proposed as answer by dns jinung Tuesday, March 31, 2015 9:28 AM
- Marked as answer by Amy PengMicrosoft employee Tuesday, April 7, 2015 8:06 AM
Monday, March 16, 2015 1:32 PM