IIS 8 support in installer
This commit is contained in:
parent
74d82950d3
commit
0200086e6f
13 changed files with 29 additions and 32 deletions
|
@ -135,7 +135,7 @@ namespace WebsitePanel.Installer.Common
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (IISVersion.Major == 7)
|
if (IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
return new string[] { "IIS_IUSRS" };
|
return new string[] { "IIS_IUSRS" };
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ namespace WebsitePanel.Installer.Common
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (IISVersion.Major == 7)
|
if (IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
return new string[] { "IIS_IUSRS" };
|
return new string[] { "IIS_IUSRS" };
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,7 +284,7 @@ namespace WebsitePanel.Installer.Common
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//ignore win64 check on IIS7
|
//ignore win64 check on IIS7
|
||||||
if (Global.IISVersion.Major == 7)
|
if (Global.IISVersion.Major >= 7)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IIS32Enabled())
|
if (!IIS32Enabled())
|
||||||
|
|
|
@ -7,8 +7,6 @@ namespace WebsitePanel.Installer.Core
|
||||||
{
|
{
|
||||||
class ServiceComponentNotFoundException : Exception
|
class ServiceComponentNotFoundException : Exception
|
||||||
{
|
{
|
||||||
private string p;
|
|
||||||
|
|
||||||
public ServiceComponentNotFoundException(string p)
|
public ServiceComponentNotFoundException(string p)
|
||||||
: base(p)
|
: base(p)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<installer>
|
<installer>
|
||||||
<!-- Installed components -->
|
<!-- Installed components -->
|
||||||
|
|
||||||
<components/>
|
<components/>
|
||||||
<!-- Studio settings -->
|
<!-- Studio settings -->
|
||||||
<settings>
|
<settings>
|
||||||
|
|
Binary file not shown.
|
@ -341,7 +341,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
var netbiosDomain = userDomain;
|
var netbiosDomain = userDomain;
|
||||||
var userName = vars.UserAccount;
|
var userName = vars.UserAccount;
|
||||||
var iisVersion = vars.IISVersion;
|
var iisVersion = vars.IISVersion;
|
||||||
var iis7 = (iisVersion.Major == 7);
|
var iis7 = (iisVersion.Major >= 7);
|
||||||
//
|
//
|
||||||
if (!String.IsNullOrEmpty(userDomain))
|
if (!String.IsNullOrEmpty(userDomain))
|
||||||
{
|
{
|
||||||
|
@ -377,7 +377,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
var identity = GetWebIdentity(vars);
|
var identity = GetWebIdentity(vars);
|
||||||
var componentId = vars.ComponentId;
|
var componentId = vars.ComponentId;
|
||||||
var iisVersion = vars.IISVersion;
|
var iisVersion = vars.IISVersion;
|
||||||
var iis7 = (iisVersion.Major == 7);
|
var iis7 = (iisVersion.Major >= 7);
|
||||||
var poolExists = false;
|
var poolExists = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -447,7 +447,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
{
|
{
|
||||||
var appPoolName = String.Format(AppPoolNameFormatString, vars.ComponentFullName);
|
var appPoolName = String.Format(AppPoolNameFormatString, vars.ComponentFullName);
|
||||||
var iisVersion = vars.IISVersion;
|
var iisVersion = vars.IISVersion;
|
||||||
var iis7 = (iisVersion.Major == 7);
|
var iis7 = (iisVersion.Major >= 7);
|
||||||
var poolExists = false;
|
var poolExists = false;
|
||||||
//
|
//
|
||||||
Log.WriteStart(LogStartUninstallMessage);
|
Log.WriteStart(LogStartUninstallMessage);
|
||||||
|
@ -507,7 +507,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
var domain = vars.WebSiteDomain;
|
var domain = vars.WebSiteDomain;
|
||||||
var contentPath = vars.InstallationFolder;
|
var contentPath = vars.InstallationFolder;
|
||||||
var iisVersion = vars.IISVersion;
|
var iisVersion = vars.IISVersion;
|
||||||
var iis7 = (iisVersion.Major == 7);
|
var iis7 = (iisVersion.Major >= 7);
|
||||||
var userName = CreateWebApplicationPoolAction.GetWebIdentity(vars);
|
var userName = CreateWebApplicationPoolAction.GetWebIdentity(vars);
|
||||||
var userPassword = vars.UserPassword;
|
var userPassword = vars.UserPassword;
|
||||||
var appPool = vars.WebApplicationPoolName;
|
var appPool = vars.WebApplicationPoolName;
|
||||||
|
@ -593,7 +593,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
void IUninstallAction.Run(SetupVariables vars)
|
void IUninstallAction.Run(SetupVariables vars)
|
||||||
{
|
{
|
||||||
var iisVersion = vars.IISVersion;
|
var iisVersion = vars.IISVersion;
|
||||||
var iis7 = (iisVersion.Major == 7);
|
var iis7 = (iisVersion.Major >= 7);
|
||||||
var siteId = vars.WebSiteId;
|
var siteId = vars.WebSiteId;
|
||||||
//
|
//
|
||||||
try
|
try
|
||||||
|
@ -963,7 +963,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
|
|
||||||
void IInstallAction.Run(SetupVariables vars)
|
void IInstallAction.Run(SetupVariables vars)
|
||||||
{
|
{
|
||||||
if (vars.IISVersion.Major == 7)
|
if (vars.IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
ChangeAspNetVersionOnIis7(vars);
|
ChangeAspNetVersionOnIis7(vars);
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,7 @@ namespace WebsitePanel.Setup.Actions
|
||||||
serviceInfo.Comments = string.Empty;
|
serviceInfo.Comments = string.Empty;
|
||||||
|
|
||||||
//check IIS version
|
//check IIS version
|
||||||
if (ServerSetup.IISVersion.Major == 7)
|
if (ServerSetup.IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
serviceInfo.ProviderId = 101;
|
serviceInfo.ProviderId = 101;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (IISVersion.Major == 7)
|
if (IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
return new string[] { "AD:Domain Admins", "SID:" + SystemSID.ADMINISTRATORS, "IIS_IUSRS" };
|
return new string[] { "AD:Domain Admins", "SID:" + SystemSID.ADMINISTRATORS, "IIS_IUSRS" };
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (IISVersion.Major == 7)
|
if (IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
return new string[] { "IIS_IUSRS" };
|
return new string[] { "IIS_IUSRS" };
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (IISVersion.Major == 7)
|
if (IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
return new string[] { "IIS_IUSRS" };
|
return new string[] { "IIS_IUSRS" };
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,7 +561,7 @@ namespace WebsitePanel.Setup
|
||||||
// By default we fallback to the corresponding tool version based on the platform bitness
|
// By default we fallback to the corresponding tool version based on the platform bitness
|
||||||
var util = Environment.Is64BitOperatingSystem ? AspNet40RegistrationToolx64 : AspNet40RegistrationToolx86;
|
var util = Environment.Is64BitOperatingSystem ? AspNet40RegistrationToolx64 : AspNet40RegistrationToolx86;
|
||||||
// Choose appropriate tool version for IIS 7
|
// Choose appropriate tool version for IIS 7
|
||||||
if (setupVariables.IISVersion.Major == 7 && setupVariables.SetupAction == SetupActions.Update)
|
if (setupVariables.IISVersion.Major >= 7 && setupVariables.SetupAction == SetupActions.Update)
|
||||||
{
|
{
|
||||||
// Evaluate app pool settings on x64 platform only when update is running
|
// Evaluate app pool settings on x64 platform only when update is running
|
||||||
if (Environment.Is64BitOperatingSystem == true)
|
if (Environment.Is64BitOperatingSystem == true)
|
||||||
|
@ -747,7 +747,7 @@ namespace WebsitePanel.Setup
|
||||||
|
|
||||||
public static void OpenFirewallPort(string name, string port, Version iisVersion)
|
public static void OpenFirewallPort(string name, string port, Version iisVersion)
|
||||||
{
|
{
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
if (iis7)
|
if (iis7)
|
||||||
{
|
{
|
||||||
//TODO: Add IIS7 support
|
//TODO: Add IIS7 support
|
||||||
|
|
|
@ -397,7 +397,7 @@ namespace WebsitePanel.Setup
|
||||||
|
|
||||||
private bool SiteBindingsExist(SetupVariables setupVariables)
|
private bool SiteBindingsExist(SetupVariables setupVariables)
|
||||||
{
|
{
|
||||||
bool iis7 = (setupVariables.IISVersion.Major == 7);
|
bool iis7 = (setupVariables.IISVersion.Major >= 7);
|
||||||
string ip = setupVariables.WebSiteIP;
|
string ip = setupVariables.WebSiteIP;
|
||||||
string port = setupVariables.WebSitePort;
|
string port = setupVariables.WebSitePort;
|
||||||
string domain = setupVariables.WebSiteDomain;
|
string domain = setupVariables.WebSiteDomain;
|
||||||
|
|
|
@ -362,7 +362,7 @@ namespace WebsitePanel.Setup
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.Load(webConfigPath);
|
doc.Load(webConfigPath);
|
||||||
// do Windows 2008 platform-specific changes
|
// do Windows 2008 platform-specific changes
|
||||||
bool iis7 = (Wizard.SetupVariables.IISVersion.Major == 7);
|
bool iis7 = (Wizard.SetupVariables.IISVersion.Major >= 7);
|
||||||
//
|
//
|
||||||
#region Do IIS 7 and IIS 6 specific web.config file changes
|
#region Do IIS 7 and IIS 6 specific web.config file changes
|
||||||
if (iis7)
|
if (iis7)
|
||||||
|
@ -776,7 +776,7 @@ namespace WebsitePanel.Setup
|
||||||
serviceInfo.Comments = string.Empty;
|
serviceInfo.Comments = string.Empty;
|
||||||
|
|
||||||
//check IIS version
|
//check IIS version
|
||||||
if (Wizard.SetupVariables.IISVersion.Major == 7)
|
if (Wizard.SetupVariables.IISVersion.Major >= 7)
|
||||||
{
|
{
|
||||||
serviceInfo.ProviderId = 101;
|
serviceInfo.ProviderId = 101;
|
||||||
}
|
}
|
||||||
|
@ -1610,7 +1610,7 @@ namespace WebsitePanel.Setup
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
Log.WriteStart("Stopping IIS Application Pool");
|
Log.WriteStart("Stopping IIS Application Pool");
|
||||||
Log.WriteInfo(string.Format("Stopping \"{0}\"", appPool));
|
Log.WriteInfo(string.Format("Stopping \"{0}\"", appPool));
|
||||||
|
@ -1645,7 +1645,7 @@ namespace WebsitePanel.Setup
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
Log.WriteStart("Starting IIS Application Pool");
|
Log.WriteStart("Starting IIS Application Pool");
|
||||||
Log.WriteInfo(string.Format("Starting \"{0}\"", appPool));
|
Log.WriteInfo(string.Format("Starting \"{0}\"", appPool));
|
||||||
|
@ -2256,7 +2256,7 @@ namespace WebsitePanel.Setup
|
||||||
string domain = Wizard.SetupVariables.WebSiteDomain;
|
string domain = Wizard.SetupVariables.WebSiteDomain;
|
||||||
bool update = Wizard.SetupVariables.UpdateWebSite;
|
bool update = Wizard.SetupVariables.UpdateWebSite;
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
if (!update)
|
if (!update)
|
||||||
return;
|
return;
|
||||||
|
@ -2696,7 +2696,7 @@ namespace WebsitePanel.Setup
|
||||||
string identity = userName;
|
string identity = userName;
|
||||||
string netbiosDomain = userDomain;
|
string netbiosDomain = userDomain;
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2860,7 +2860,7 @@ namespace WebsitePanel.Setup
|
||||||
Log.WriteStart("Creating web site");
|
Log.WriteStart("Creating web site");
|
||||||
Log.WriteInfo(string.Format("Creating web site \"{0}\" ( IP: {1}, Port: {2}, Domain: {3} )", siteName, ip, port, domain));
|
Log.WriteInfo(string.Format("Creating web site \"{0}\" ( IP: {1}, Port: {2}, Domain: {3} )", siteName, ip, port, domain));
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
//check for existing site
|
//check for existing site
|
||||||
string oldSiteId = iis7 ? WebUtils.GetIIS7SiteIdByBinding(ip, port, domain) : WebUtils.GetSiteIdByBinding(ip, port, domain);
|
string oldSiteId = iis7 ? WebUtils.GetIIS7SiteIdByBinding(ip, port, domain) : WebUtils.GetSiteIdByBinding(ip, port, domain);
|
||||||
|
@ -3018,7 +3018,7 @@ namespace WebsitePanel.Setup
|
||||||
SetProgressText("Creating local account...");
|
SetProgressText("Creating local account...");
|
||||||
string componentId = Wizard.SetupVariables.ComponentId;
|
string componentId = Wizard.SetupVariables.ComponentId;
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool poolExists = ( iisVersion.Major == 7) ?
|
bool poolExists = (iisVersion.Major >= 7) ?
|
||||||
WebUtils.IIS7ApplicationPoolExists(name) :
|
WebUtils.IIS7ApplicationPoolExists(name) :
|
||||||
WebUtils.ApplicationPoolExists(name);
|
WebUtils.ApplicationPoolExists(name);
|
||||||
|
|
||||||
|
@ -3027,7 +3027,7 @@ namespace WebsitePanel.Setup
|
||||||
//update app pool
|
//update app pool
|
||||||
Log.WriteStart("Updating application pool");
|
Log.WriteStart("Updating application pool");
|
||||||
Log.WriteInfo(string.Format("Updating application pool \"{0}\"", name));
|
Log.WriteInfo(string.Format("Updating application pool \"{0}\"", name));
|
||||||
if ( iisVersion.Major == 7)
|
if (iisVersion.Major >= 7)
|
||||||
WebUtils.UpdateIIS7ApplicationPool(name, userName, userPassword);
|
WebUtils.UpdateIIS7ApplicationPool(name, userName, userPassword);
|
||||||
else
|
else
|
||||||
WebUtils.UpdateApplicationPool(name, userName, userPassword);
|
WebUtils.UpdateApplicationPool(name, userName, userPassword);
|
||||||
|
@ -3047,13 +3047,13 @@ namespace WebsitePanel.Setup
|
||||||
// create app pool
|
// create app pool
|
||||||
Log.WriteStart("Creating application pool");
|
Log.WriteStart("Creating application pool");
|
||||||
Log.WriteInfo(string.Format("Creating application pool \"{0}\"", name));
|
Log.WriteInfo(string.Format("Creating application pool \"{0}\"", name));
|
||||||
if (iisVersion.Major == 7)
|
if (iisVersion.Major >= 7)
|
||||||
WebUtils.CreateIIS7ApplicationPool(name, userName, userPassword);
|
WebUtils.CreateIIS7ApplicationPool(name, userName, userPassword);
|
||||||
else
|
else
|
||||||
WebUtils.CreateApplicationPool(name, userName, userPassword);
|
WebUtils.CreateApplicationPool(name, userName, userPassword);
|
||||||
|
|
||||||
//register rollback action
|
//register rollback action
|
||||||
if (iisVersion.Major == 7)
|
if (iisVersion.Major >= 7)
|
||||||
RollBack.RegisterIIS7ApplicationPool(name);
|
RollBack.RegisterIIS7ApplicationPool(name);
|
||||||
else
|
else
|
||||||
RollBack.RegisterApplicationPool(name);
|
RollBack.RegisterApplicationPool(name);
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace WebsitePanel.Setup
|
||||||
string component = Wizard.SetupVariables.ComponentFullName;
|
string component = Wizard.SetupVariables.ComponentFullName;
|
||||||
string componentId = Wizard.SetupVariables.ComponentId;
|
string componentId = Wizard.SetupVariables.ComponentId;
|
||||||
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
Version iisVersion = Wizard.SetupVariables.IISVersion;
|
||||||
bool iis7 = (iisVersion.Major == 7);
|
bool iis7 = (iisVersion.Major >= 7);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -326,7 +326,7 @@ namespace WebsitePanel.Setup
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool iis7 = (SetupVariables.IISVersion.Major == 7);
|
bool iis7 = (SetupVariables.IISVersion.Major >= 7);
|
||||||
string siteId = iis7 ?
|
string siteId = iis7 ?
|
||||||
WebUtils.GetIIS7SiteIdByBinding(newIP, newPort, newDomain) :
|
WebUtils.GetIIS7SiteIdByBinding(newIP, newPort, newDomain) :
|
||||||
WebUtils.GetSiteIdByBinding(newIP, newPort, newDomain);
|
WebUtils.GetSiteIdByBinding(newIP, newPort, newDomain);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue