Fix for "Object reference error" with WebSitesHeliconApe
This commit is contained in:
parent
73cd732e6d
commit
50d22d2dee
1 changed files with 28 additions and 9 deletions
|
@ -53,7 +53,20 @@ namespace WebsitePanel.Portal
|
|||
|
||||
private HeliconApeStatus HeliconApeStatus
|
||||
{
|
||||
get { return (HeliconApeStatus)ViewState["HeliconApeStatus"]; }
|
||||
get
|
||||
{
|
||||
if (null == ViewState["HeliconApeStatus"])
|
||||
{
|
||||
HeliconApeStatus nullstatus = new HeliconApeStatus();
|
||||
return nullstatus;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (HeliconApeStatus)ViewState["HeliconApeStatus"];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
set { ViewState["HeliconApeStatus"] = value; }
|
||||
|
||||
}
|
||||
|
@ -91,7 +104,9 @@ namespace WebsitePanel.Portal
|
|||
|
||||
|
||||
// Render a warning message about the automatic site's settings change
|
||||
if (!HeliconApeStatus.IsEnabled && site.IIs7)
|
||||
if (site.IIs7)
|
||||
{
|
||||
if (!HeliconApeStatus.IsEnabled)
|
||||
{
|
||||
// Ensure the message is displayed only when neccessary
|
||||
if (site.EnableWindowsAuthentication || !site.AspNetInstalled.EndsWith("I") || site.SecuredFoldersInstalled)
|
||||
|
@ -102,6 +117,10 @@ namespace WebsitePanel.Portal
|
|||
if (!String.IsNullOrEmpty(warningStr))
|
||||
btnToggleHeliconApe.OnClientClick = String.Format("return confirm('{0}')", warningStr);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// toggle
|
||||
ToggleControls();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue