I am developing a Windows Phone application in which I have to make a call to a webservice which is https and is running on a computer which I access through a public IP. Now my webclient is not able to get the data from that service. It says the error was a System.Reflection.TargetInvocation
exception and the inner exception tells that the remote server was not found. I thought it might be the certification issue but I have a .pem cert file which I install on my emulator but the error still persist. Can anybody tell what can be the root cause of this issue?
Asked
Active
Viewed 215 times
0

mtijn
- 3,610
- 2
- 33
- 55

Sandeep Chauhan
- 1,313
- 1
- 10
- 23
-
Test your application on device. – Jaihind Jul 10 '14 at 09:04
-
unfortunately i dont have any device currently – Sandeep Chauhan Jul 10 '14 at 09:05
-
1Post some code. that might help people to give you right solution – Jaihind Jul 10 '14 at 09:34
-
@SandeepChauhan check your machine or emulator time. it may be out of sync. – loop Jul 10 '14 at 09:38
-
Did you set all the required Headers?? – Rishabh876 Jul 11 '14 at 07:18
-
try turning off the virtual switch and restart it again to start the emulator! – Kulasangar Jul 11 '14 at 07:36
1 Answers
0
These problem arises due to these major issue,
1) You should have an active Internet connection to achieve this. Check your emulator whether it has proper internet connection.
2) Your headers should be in proper format. Try going through this link. It might help you in passing the headers in correct format. If you try to access the site which is secured with username and password, you need to pass those credentials. You can get these informations in above link.
Try with this sample json link whether you can achieve your target by getting the IP address. You can also try with HTTPWebRequest and HTTPWebResponse.

Community
- 1
- 1

Balasubramani M
- 7,742
- 2
- 45
- 47