From 84642c37ad75138469b68b3b01403bda412f08f8 Mon Sep 17 00:00:00 2001 From: Claudiu Farcas Date: Tue, 29 Mar 2011 05:43:32 +0300 Subject: [PATCH] Up into the azure cloud --- .../Service/ServiceAgent.cs | 14 +- .../MyFriendsAround.Web.csproj | 21 + .../Views/Home/Index.cshtml | 3 +- main/MyFriendsAround.Web/Web.config | 59 +- .../Microsoft.Web.Infrastructure.dll | Bin 0 -> 45416 bytes .../Microsoft.Web.Infrastructure.xml | 19 + .../_bin_deployableAssemblies/NuGet.Core.dll | Bin 0 -> 192888 bytes .../System.Web.Helpers.dll | Bin 0 -> 130408 bytes .../System.Web.Helpers.xml | 636 +++++++++++++ .../System.Web.Mvc.dll | Bin 0 -> 445280 bytes .../System.Web.Razor.dll | Bin 0 -> 178536 bytes .../System.Web.Razor.xml | 866 +++++++++++++++++ .../System.Web.WebPages.Administration.dll | Bin 0 -> 121704 bytes .../System.Web.WebPages.Deployment.dll | Bin 0 -> 25960 bytes .../System.Web.WebPages.Deployment.xml | 16 + .../System.Web.WebPages.Razor.dll | Bin 0 -> 37224 bytes .../System.Web.WebPages.Razor.xml | 71 ++ .../System.Web.WebPages.dll | Bin 0 -> 136552 bytes .../System.Web.WebPages.xml | 884 ++++++++++++++++++ .../WebMatrix.Data.dll | Bin 0 -> 36712 bytes .../WebMatrix.Data.xml | 93 ++ .../WebMatrix.WebData.dll | Bin 0 -> 63848 bytes .../WebMatrix.WebData.xml | 240 +++++ main/MyFriendsAround.sln | 17 + .../MyFriendsAroundWindowsAzure.ccproj | 52 ++ .../ServiceConfiguration.cscfg | 9 + .../ServiceDefinition.csdef | 20 + 27 files changed, 2978 insertions(+), 42 deletions(-) create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/Microsoft.Web.Infrastructure.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/Microsoft.Web.Infrastructure.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/NuGet.Core.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.Helpers.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.Helpers.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.Mvc.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.Razor.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.Razor.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.Administration.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.Deployment.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.Deployment.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.Razor.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.Razor.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/System.Web.WebPages.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/WebMatrix.Data.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/WebMatrix.Data.xml create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/WebMatrix.WebData.dll create mode 100644 main/MyFriendsAround.Web/_bin_deployableAssemblies/WebMatrix.WebData.xml create mode 100644 main/MyFriendsAroundWindowsAzure/MyFriendsAroundWindowsAzure.ccproj create mode 100644 main/MyFriendsAroundWindowsAzure/ServiceConfiguration.cscfg create mode 100644 main/MyFriendsAroundWindowsAzure/ServiceDefinition.csdef 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*@