public async Task <HttpResponseMessage> GetMobileClientZip(string platformString, string templateName) { var resourceManager = await ResourcesManager.GetInstanceAsync(); var resourceGroup = await resourceManager.GetResourceGroup(HttpContext.Current.User.Identity.Name); MobileClientPlatform platform; if (resourceGroup.AppService != AppService.Mobile) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, Resources.Server.Error_InvalidAppServiceType)); } if (!Enum.TryParse <MobileClientPlatform>(platformString, out platform)) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, Resources.Server.Error_UnsupportedPlatform)); } var response = Request.CreateResponse(); var replacement = new Dictionary <string, string> { { "ZUMOAPPURL", resourceGroup.Sites.Where(s => s.IsSimpleWAWSOriginalSite).First().Url }, { "{siteurl}", resourceGroup.Sites.Where(s => s.IsSimpleWAWSOriginalSite).First().Url.Trim('/') }, { "ZUMOAPPNAME", "TryMobileApp" }, { "{sitename}", "TryMobileApp" }, { "ZUMOGATEWAYURL", resourceGroup.Sites.Where(s => s.IsSimpleWAWSOriginalSite).First().Url }, { "{gateway_url}", resourceGroup.Sites.Where(s => s.IsSimpleWAWSOriginalSite).First().Url.Trim('/') }, { "ZUMONETRUNTIMESERVERPORT", "44300" } }; response.Content = MobileHelper.CreateClientZip(platform, templateName, replacement); return(response); }