0

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?

mtijn
  • 3,610
  • 2
  • 33
  • 55
Sandeep Chauhan
  • 1,313
  • 1
  • 10
  • 23

1 Answers1

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