diff --git a/main/MyFriendsAround.WP7/Service/ServiceAgent.cs b/main/MyFriendsAround.WP7/Service/ServiceAgent.cs index eef9d78..a97937e 100644 --- a/main/MyFriendsAround.WP7/Service/ServiceAgent.cs +++ b/main/MyFriendsAround.WP7/Service/ServiceAgent.cs @@ -11,17 +11,25 @@ namespace MyFriendsAround.WP7.Service { private static int _timeOut = 10; + private static string baseUrl; + + static ServiceAgent() + { + baseUrl = "http://myfriendsaround.cloudapp.net/myfriends";//live azure + //baseUrl = "http://127.0.0.1:8086/myfriends";//running in local azure emulator + //baseUrl = "http://localhost.:55672/myfriends";//for local asp.net mvc use + } #region GetFriends - private static EventHandler friendscallback; + static EventHandler friendscallback; public static void GetFriends(EventHandler callback) { var serializer = new Hammock.Serialization.HammockDataContractJsonSerializer(); RestClient client = new RestClient { - Authority = "http://localhost.:55672/myfriends", + Authority = baseUrl, Timeout = new TimeSpan(0, 0, 0, _timeOut), Serializer = serializer, Deserializer = serializer @@ -69,7 +77,7 @@ namespace MyFriendsAround.WP7.Service var serializer = new Hammock.Serialization.HammockDataContractJsonSerializer(); RestClient client = new RestClient { - Authority = "http://localhost.:55672/myfriends", + Authority = baseUrl, Timeout = new TimeSpan(0, 0, 0, _timeOut), Serializer = serializer, Deserializer = serializer diff --git a/main/MyFriendsAround.Web/MyFriendsAround.Web.csproj b/main/MyFriendsAround.Web/MyFriendsAround.Web.csproj index 1f55d36..56f7c92 100644 --- a/main/MyFriendsAround.Web/MyFriendsAround.Web.csproj +++ b/main/MyFriendsAround.Web/MyFriendsAround.Web.csproj @@ -52,7 +52,9 @@ + + @@ -148,6 +150,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/main/MyFriendsAround.Web/Views/Home/Index.cshtml b/main/MyFriendsAround.Web/Views/Home/Index.cshtml index 8b86970..ad38c2d 100644 --- a/main/MyFriendsAround.Web/Views/Home/Index.cshtml +++ b/main/MyFriendsAround.Web/Views/Home/Index.cshtml @@ -6,7 +6,8 @@

@ViewBag.Message

- @Html.Raw(Html.DrawMap("ABQIAAAAksAhKXCpVW3aANz3gzuv4xT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRJW_HFuarMuHR-nqN1g7x09OKIPQ", "/Home/GetMarkers?timestamp=" + DateTime.Now.Ticks.ToString(), "1000", "500")) + @Html.Raw(Html.DrawMap("ABQIAAAAksAhKXCpVW3aANz3gzuv4xSNVnIbJIiCSGOIr7YBdzhkRA0lqBRIiJsrP9FSdJi3ezjjAOwV4JljNg", "/Home/GetMarkers?timestamp=" + DateTime.Now.Ticks.ToString(), "1000", "500")) + @*ABQIAAAAksAhKXCpVW3aANz3gzuv4xT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRJW_HFuarMuHR-nqN1g7x09OKIPQ - for localhost*@