public ActionResult TrafficManager()
        {
            WebClient client = new WebClient();
            string    ip     = client.DownloadString("http://icanhazip.com/").Trim();

            ViewBag.Ip = ip;
            var controller = new AzureApiController();

            ViewBag.Region = controller.GetRegionNameByIpOrUrl(ip);
            return(View());
        }
Exemple #2
0
        public ActionResult TrafficManager()
        {
            WebClient client = new WebClient();
            string    ip     = client.DownloadString("http://www.azurespeed.com/api/ip").Replace("\"", "").Trim();

            if (!string.IsNullOrEmpty(ip))
            {
                ViewBag.Ip = ip;
                var controller = new AzureApiController();
                ViewBag.Region = controller.GetRegionNameByIpOrUrl(ip);
            }
            return(View());
        }
Exemple #3
0
 public ActionResult TrafficManager()
 {
     WebClient client = new WebClient();
     string ip = client.DownloadString("http://icanhazip.com/").Trim();
     ViewBag.Ip = ip;
     var controller = new AzureApiController();
     ViewBag.Region = controller.GetRegionNameByIpOrUrl(ip);
     return View();
 }