public GeoCoordinate GetLatestGeoCoordinateByUserNameAndDevice(string userName, string password, string queryingUserName, Device device) { GeoCoordinate geoCoor = null; try { LocationServiceClient client = new LocationServiceClient(); client.ClientCredentials.UserName.UserName = userName; client.ClientCredentials.UserName.Password = password; geoCoor = client.GetLatestGeoCoordinateByUserNameAndDevice(queryingUserName, device); client.Close(); } catch (Exception ex) { throw new FaultException(ex.GetDebugString()); } return(geoCoor); }