Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Firewall problem

Last post 02-16-2010, 15:20 by CapnChaos. 3 replies.
Sort Posts: Previous Next
  •  02-11-2010, 21:06 2999

    Firewall problem

    Hi, hopefully you can help me. I'm pretty sure the answer is no, but is there any way to stop the control from contacting google from the server and somehow force it to do it clientside? The problem we're having is that we cannot open up our firewall to allow access to google (this is out of my control). Other google maps applications work fine because all their calls are coming from the client. But it seems the control is doing some httpwebrequests to google servers that are failing and causing the page not to load.

     I really really really don't want to rewrite this whole application in javascript (and I'm pretty sure if I did, I wouldn't be able to do a lot of what I'm doing) so if you could come up with some sort of solution I'd really appreciate it. Thanks.

  •  02-11-2010, 22:43 3000 in reply to 2999

    Re: Firewall problem

    This is a stupid question now that I think about it. It already is doing most of the work on the client. It's only where I'm specifically calling for directions that causes the problem (and apparently adding map controls?). Now to figure out how to store these directions in the database instead of creating them dynamically.
  •  02-11-2010, 23:27 3001 in reply to 3000

    Re: Firewall problem

    Are you saying that if someone from Google tried to view your application then the request would fail? That would most likely be against the terms of use. I'll let you resolve that with Google directly.

    If you know which routes you need to display then you should pre-geocode them and store then in your database, like you mention. The easiest way is to serialize the directions to a JSON string and store it as a string. This means that you would need a computer with access to Google's services. Otherwise have a look at http://www.reimers.dk/webservices/AtlasService.svc which also exposes a directions service, but it does track requests for statistical purposes.

    The Reimers.Map.Accessories.MapUtils class has a JsonSerializer property which returns a serializer for just that purpose. Simply pass your directions to the Serialize method to get the string or pass the string to the Deserialize method to get the directions.

  •  02-16-2010, 15:20 3015 in reply to 3001

    Re: Firewall problem

    No, apparently it's only outbound requests that aren't allowed. It doesn't make any sense to me.

    Great, it sounds like the JSON string for directions is exactly what I need. I'm going to look into that today. Thanks again.

View as RSS news feed in XML