public ActionResult Edit(Guid id, WebSiteModel model)
        {
            try
            {
                var site = new WebSite(id)
                {
                    Name = model.Name,
                    Description = model.Description,
                    EnableTestChildApplication = model.EnableTestChildApplication,
                    EnableCDNChildApplication = model.EnableCDNChildApplication,
                };

                this.webSiteRepository.UpdateWebSite(site);

                return RedirectToAction("Index");
            }
            catch
            {
                return View(model);
            }
        }
        public ActionResult Edit(Guid id)
        {
            var website = this.webSiteRepository.RetrieveWebSiteWithBindingsAndCertificates(id, this.certificateRepository);
            var model = new WebSiteModel
            {
                Id = website.Id,
                Name = website.Name,
                Description = website.Description,
                EnableTestChildApplication = website.EnableTestChildApplication,
                EnableCDNChildApplication = website.EnableCDNChildApplication,
                Bindings = website.Bindings.Select(b => new BindingModel
                {
                    Id = b.Id,
                    CertificateId = b.CertificateId,
                    CertificateName = b.Certificate != null ? b.Certificate.Name : string.Empty,
                    HostName = b.HostName,
                    IpAddress = b.IpAddress,
                    Port = b.Port,
                    Protocol = b.Protocol,
                    WebSiteId = b.WebSiteId,
                    Url = this.GetBindingUrl(b)
                })
            };

            return View(model);
        }