I am working on using Google's GeoCode API to return lat/long values of an address that a user enters in a search box. My code seems to be correct, but I am getting a security exception issue. And when I use Fiddler to check the call I can see the call being sent, but there is a problem with clientaccesspolicy.xml.
It seems as though my WPF application requires Google to have a clientaccesspolicy.xml but Google doesn't have one. So I may need to proxy to make this call to Google's API. Any ideas or work arounds?
code
private void RequestResponseHandler(IAsyncResult asyncResult)
{
HttpWebResponse response = null;
Stream responseStream = null;
try
{
response = (HttpWebResponse)request.EndGetResponse(asyncResult);
responseStream = response.GetResponseStream();
var xdoc = XDocument.Load(responseStream);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}