Helicon Zoo: Ignore web configuration errors if Zoo is not installed
This commit is contained in:
parent
9204eba68a
commit
bf9f1c815f
1 changed files with 36 additions and 40 deletions
|
@ -675,14 +675,18 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
//
|
//
|
||||||
foreach (var item in iisObject.Applications)
|
foreach (var item in iisObject.Applications)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
Configuration cfg = item.GetWebConfiguration();
|
Configuration cfg = item.GetWebConfiguration();
|
||||||
string location = siteId + ConfigurationUtility.GetQualifiedVirtualPath(item.Path);
|
string location = siteId + ConfigurationUtility.GetQualifiedVirtualPath(item.Path);
|
||||||
ConfigurationSection section = cfg.GetSection("system.webServer/heliconZoo", location);
|
ConfigurationSection section;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
section = cfg.GetSection("system.webServer/heliconZoo", location);
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
// looks like Helicon Zoo is not installed, return empty array
|
||||||
|
return vdirs.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
if (section.GetCollection().Count > 0)
|
if (section.GetCollection().Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -711,16 +715,8 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
vdirs.Add(vdir);
|
vdirs.Add(vdir);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
//there is no zoo
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return vdirs.ToArray();
|
return vdirs.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue