Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkp committed Jan 21, 2019
1 parent ffd364f commit aa4ed2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions LetsEncrypt-SiteExtension/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public async Task<ActionResult> Index(AuthenticationModel model)
{
//Update web config.
var site = client.WebApps.GetSiteOrSlot(model.ResourceGroupName, model.WebAppName, model.SiteSlotName);
if (site == null)
{
ModelState.AddModelError(nameof(model.ResourceGroupName), string.Format("No web app could be found, please validate that Resource Group Name and/or Site Slot Name are correct"));
return View(model);
}
//Validate that the service plan resource group name is correct, to avoid more issues on this specific problem.
var azureServerFarmResourceGroup = site.ServerFarmResourceGroup();
if (!string.Equals(azureServerFarmResourceGroup, model.ServicePlanResourceGroupName, StringComparison.InvariantCultureIgnoreCase))
Expand Down

0 comments on commit aa4ed2e

Please sign in to comment.