This code is run fine when i check this app on mobile but when i change location of mobile slightly then exception occur The exception occur that "The remote server is not found" but initially it work perfectly and reponse back and display value from server ,whenever the location is changed the exception occur thnx in advance client side code::i-e windows phone 8
void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args) { try { Dispatcher.BeginInvoke(() => { client= new ServiceReference2.GetPositionClient(); // ddd.Text = "begin invoker"; LatitudeTextBlock.Text = args.Position.Coordinate.Latitude.ToString("0.0000000000"); LongitudeTextBlock.Text = args.Position.Coordinate.Longitude.ToString("0.000000000"); // client.getPosCompleted += new EventHandler<ServiceReference2.getPosCompletedEventArgs>(sendData); client.getData1Completed += new EventHandler<ServiceReference2.getData1CompletedEventArgs>(sendData); // client.getPosAsync(11, 11); client.getData1Async(11, 11); }); } catch (Exception e2) { ddd.Text = "2" + e2.Message; } } public void sendData(object sender, ServiceReference2.getData1CompletedEventArgs e) { try { dd.Text = "The Response Come from Server is :: " + e.Result; } catch (Exception e3) { ddd.Text = "3"+e3.Message; } }
public class GetPosition : IGetPosition { public string getData1(double lat, double lon) { return "updated sucessfully"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)