Helicon Ape: Server-wide enbaling/disabling (global registration) added

This commit is contained in:
ruslanht 2012-12-18 16:41:21 +02:00
parent 0817269e1b
commit deddc73f28
8 changed files with 361 additions and 92 deletions

View file

@ -164,6 +164,10 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback DisableHeliconApeOperationCompleted;
private System.Threading.SendOrPostCallback EnableHeliconApeGloballyOperationCompleted;
private System.Threading.SendOrPostCallback DisableHeliconApeGloballyOperationCompleted;
private System.Threading.SendOrPostCallback GetHeliconApeFoldersOperationCompleted;
private System.Threading.SendOrPostCallback GetHeliconApeHttpdFolderOperationCompleted;
@ -384,6 +388,12 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event DisableHeliconApeCompletedEventHandler DisableHeliconApeCompleted;
/// <remarks/>
public event EnableHeliconApeGloballyCompletedEventHandler EnableHeliconApeGloballyCompleted;
/// <remarks/>
public event DisableHeliconApeGloballyCompletedEventHandler DisableHeliconApeGloballyCompleted;
/// <remarks/>
public event GetHeliconApeFoldersCompletedEventHandler GetHeliconApeFoldersCompleted;
@ -2705,6 +2715,88 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableHeliconApeGlobally", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int EnableHeliconApeGlobally(int serviceId) {
object[] results = this.Invoke("EnableHeliconApeGlobally", new object[] {
serviceId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnableHeliconApeGlobally(int serviceId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("EnableHeliconApeGlobally", new object[] {
serviceId}, callback, asyncState);
}
/// <remarks/>
public int EndEnableHeliconApeGlobally(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void EnableHeliconApeGloballyAsync(int serviceId) {
this.EnableHeliconApeGloballyAsync(serviceId, null);
}
/// <remarks/>
public void EnableHeliconApeGloballyAsync(int serviceId, object userState) {
if ((this.EnableHeliconApeGloballyOperationCompleted == null)) {
this.EnableHeliconApeGloballyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableHeliconApeGloballyOperationCompleted);
}
this.InvokeAsync("EnableHeliconApeGlobally", new object[] {
serviceId}, this.EnableHeliconApeGloballyOperationCompleted, userState);
}
private void OnEnableHeliconApeGloballyOperationCompleted(object arg) {
if ((this.EnableHeliconApeGloballyCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.EnableHeliconApeGloballyCompleted(this, new EnableHeliconApeGloballyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableHeliconApeGlobally", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DisableHeliconApeGlobally(int serviceId) {
object[] results = this.Invoke("DisableHeliconApeGlobally", new object[] {
serviceId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDisableHeliconApeGlobally(int serviceId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DisableHeliconApeGlobally", new object[] {
serviceId}, callback, asyncState);
}
/// <remarks/>
public int EndDisableHeliconApeGlobally(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void DisableHeliconApeGloballyAsync(int serviceId) {
this.DisableHeliconApeGloballyAsync(serviceId, null);
}
/// <remarks/>
public void DisableHeliconApeGloballyAsync(int serviceId, object userState) {
if ((this.DisableHeliconApeGloballyOperationCompleted == null)) {
this.DisableHeliconApeGloballyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableHeliconApeGloballyOperationCompleted);
}
this.InvokeAsync("DisableHeliconApeGlobally", new object[] {
serviceId}, this.DisableHeliconApeGloballyOperationCompleted, userState);
}
private void OnDisableHeliconApeGloballyOperationCompleted(object arg) {
if ((this.DisableHeliconApeGloballyCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DisableHeliconApeGloballyCompleted(this, new DisableHeliconApeGloballyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetHeliconApeFolders", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public HtaccessFolder[] GetHeliconApeFolders(int siteItemId) {
@ -5332,6 +5424,58 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void EnableHeliconApeGloballyCompletedEventHandler(object sender, EnableHeliconApeGloballyCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class EnableHeliconApeGloballyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal EnableHeliconApeGloballyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DisableHeliconApeGloballyCompletedEventHandler(object sender, DisableHeliconApeGloballyCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DisableHeliconApeGloballyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DisableHeliconApeGloballyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetHeliconApeFoldersCompletedEventHandler(object sender, GetHeliconApeFoldersCompletedEventArgs e);

View file

@ -2869,7 +2869,6 @@ namespace WebsitePanel.EnterpriseServer
#endregion
#region Helicon Ape
public static int EnableHeliconApe(int siteItemId)
{
@ -2939,7 +2938,48 @@ namespace WebsitePanel.EnterpriseServer
}
}
/// <summary>
/// <summary>
/// Enables Helicon Ape on the server globally. Requires Administrator role to execute.
/// </summary>
/// <param name="ServiceId"></param>
/// <returns></returns>
public static int EnableHeliconApeGlobally(int ServiceId)
{
int accountCheck = SecurityContext.CheckAccount(DemandAccount.IsAdmin | DemandAccount.IsActive | DemandAccount.NotDemo);
if (accountCheck < 0)
{
return accountCheck;
}
WebServer web = GetWebServer(ServiceId);
web.EnableHeliconApe("");
return 0;
}
/// <summary>
/// Disables Helicon Ape on the server globally. Requires Administrator role to execute.
/// </summary>
/// <param name="ServiceId"></param>
/// <returns></returns>
public static int DisableHeliconApeGlobally(int ServiceId)
{
int accountCheck = SecurityContext.CheckAccount(DemandAccount.IsAdmin | DemandAccount.IsActive | DemandAccount.NotDemo);
//
if (accountCheck < 0)
{
return accountCheck;
}
WebServer web = GetWebServer(ServiceId);
web.DisableHeliconApe("");
return 0;
}
/// <summary>
/// Retrieves Helicon Ape extension status from the server. Requires Administrator role to execute.
/// </summary>
/// <param name="ServiceId"></param>

View file

@ -378,6 +378,18 @@ namespace WebsitePanel.EnterpriseServer
return WebServerController.DisableHeliconApe(siteItemId);
}
[WebMethod]
public int EnableHeliconApeGlobally(int serviceId)
{
return WebServerController.EnableHeliconApeGlobally(serviceId);
}
[WebMethod]
public int DisableHeliconApeGlobally(int serviceId)
{
return WebServerController.DisableHeliconApeGlobally(serviceId);
}
[WebMethod]
public HtaccessFolder[] GetHeliconApeFolders(int siteItemId)
{

View file

@ -2159,82 +2159,104 @@ namespace WebsitePanel.Providers.Web
return registrationInfo.StartsWith("Registered to:");
}
/// <summary>
/// Enables Helicon Ape module & handler on the web site or server globally.
/// </summary>
/// <param name="siteId">
/// Web site id or empty string ("") for server-wide enabling
/// </param>
public override void EnableHeliconApe(string siteId)
{
WebSite webSite = null;
using (ServerManager srvman = webObjectsSvc.GetServerManager())
if (null == siteId)
{
//
if (String.IsNullOrEmpty(siteId))
throw new ArgumentNullException("siteId");
// Helicon.Ape.ApeModule works for apps working in Integrated Pipeline mode
// Switch automatically to the app pool with Integrated Pipeline enabled
webSite = webObjectsSvc.GetWebSiteFromIIS(srvman, siteId);
//
if (webSite == null)
throw new ApplicationException(String.Format("Could not find a web site with the following identifier: {0}.", siteId));
// Fill ASP.NET settings
FillAspNetSettingsFromIISObject(srvman, webSite);
throw new ArgumentNullException("siteId");
}
//
var aphl = new WebAppPoolHelper(ProviderSettings);
var currentPool = aphl.match_webapp_pool(webSite);
var dotNetVersion = aphl.dotNetVersion(currentPool.Mode);
var sisMode = aphl.isolation(currentPool.Mode);
// AT least ASP.NET 2.0 is allowed to provide such capabilities...
if (dotNetVersion == SiteAppPoolMode.dotNetFramework1)
dotNetVersion = SiteAppPoolMode.dotNetFramework2;
// and Integrated pipeline...
if (aphl.pipeline(currentPool.Mode) != SiteAppPoolMode.Integrated)
if ("" != siteId)
{
// Lookup for the opposite pool matching the criteria
var oppositePool = Array.Find<WebAppPool>(aphl.SupportedAppPools.ToArray(),
x => aphl.dotNetVersion(x.Mode) == dotNetVersion && aphl.isolation(x.Mode) == sisMode
&& aphl.pipeline(x.Mode) == SiteAppPoolMode.Integrated);
//
webSite.AspNetInstalled = oppositePool.AspNetInstalled;
//
SetWebSiteApplicationPool(webSite, false);
// prepare enabling Ape for web site
WebSite webSite = null;
using (ServerManager srvman = webObjectsSvc.GetServerManager())
{
//
if (String.IsNullOrEmpty(siteId))
// Helicon.Ape.ApeModule works for apps working in Integrated Pipeline mode
// Switch automatically to the app pool with Integrated Pipeline enabled
webSite = webObjectsSvc.GetWebSiteFromIIS(srvman, siteId);
//
if (webSite == null)
throw new ApplicationException(
String.Format("Could not find a web site with the following identifier: {0}.", siteId));
// Fill ASP.NET settings
FillAspNetSettingsFromIISObject(srvman, webSite);
}
//
var aphl = new WebAppPoolHelper(ProviderSettings);
var currentPool = aphl.match_webapp_pool(webSite);
var dotNetVersion = aphl.dotNetVersion(currentPool.Mode);
var sisMode = aphl.isolation(currentPool.Mode);
// AT least ASP.NET 2.0 is allowed to provide such capabilities...
if (dotNetVersion == SiteAppPoolMode.dotNetFramework1)
dotNetVersion = SiteAppPoolMode.dotNetFramework2;
// and Integrated pipeline...
if (aphl.pipeline(currentPool.Mode) != SiteAppPoolMode.Integrated)
{
// Lookup for the opposite pool matching the criteria
var oppositePool = Array.Find<WebAppPool>(aphl.SupportedAppPools.ToArray(),
x =>
aphl.dotNetVersion(x.Mode) == dotNetVersion &&
aphl.isolation(x.Mode) == sisMode
&& aphl.pipeline(x.Mode) == SiteAppPoolMode.Integrated);
//
webSite.AspNetInstalled = oppositePool.AspNetInstalled;
//
SetWebSiteApplicationPool(webSite, false);
//
using (var srvman = webObjectsSvc.GetServerManager())
{
var iisSiteObject = srvman.Sites[siteId];
iisSiteObject.Applications["/"].ApplicationPoolName = webSite.ApplicationPool;
//
srvman.CommitChanges();
}
}
#region Disable automatically Integrated Windows Authentication
using (var srvman = webObjectsSvc.GetServerManager())
{
var iisSiteObject = srvman.Sites[siteId];
iisSiteObject.Applications["/"].ApplicationPoolName = webSite.ApplicationPool;
PropertyBag winAuthBag = winAuthSvc.GetAuthenticationSettings(srvman, siteId);
//
srvman.CommitChanges();
}
}
if ((bool) winAuthBag[AuthenticationGlobals.Enabled])
{
Configuration config = srvman.GetApplicationHostConfiguration();
#region Disable automatically Integrated Windows Authentication
using (var srvman = webObjectsSvc.GetServerManager())
{
PropertyBag winAuthBag = winAuthSvc.GetAuthenticationSettings(srvman, siteId);
//
if ((bool)winAuthBag[AuthenticationGlobals.Enabled])
ConfigurationSection windowsAuthenticationSection = config.GetSection(
"system.webServer/security/authentication/windowsAuthentication",
siteId);
//
windowsAuthenticationSection["enabled"] = false;
//
srvman.CommitChanges();
}
}
#endregion
#region Disable automatically Secured Folders
if (IsSecuredFoldersInstalled(siteId))
{
Configuration config = srvman.GetApplicationHostConfiguration();
ConfigurationSection windowsAuthenticationSection = config.GetSection(
"system.webServer/security/authentication/windowsAuthentication",
siteId);
//
windowsAuthenticationSection["enabled"] = false;
//
srvman.CommitChanges();
UninstallSecuredFolders(siteId);
}
}
#endregion
#region Disable automatically Secured Folders
if (IsSecuredFoldersInstalled(siteId))
{
UninstallSecuredFolders(siteId);
#endregion
}
#endregion
//
using (var srvman = webObjectsSvc.GetServerManager())
@ -2245,34 +2267,39 @@ namespace WebsitePanel.Providers.Web
// add Helicon.Ape module
ConfigurationSection modulesSection = appConfig.GetSection(Constants.ModulesSection, siteId);
ConfigurationElementCollection modulesCollection = modulesSection.GetCollection();
ConfigurationElement moduleAdd = modulesCollection.CreateElement("add");
moduleAdd["name"] = Constants.HeliconApeModule;
moduleAdd["type"] = GetHeliconApeModuleType(siteId);
ConfigurationElement heliconApeModuleEntry = modulesCollection.CreateElement("add");
heliconApeModuleEntry["name"] = Constants.HeliconApeModule;
heliconApeModuleEntry["type"] = GetHeliconApeModuleType(siteId);
//
modulesCollection.Add(moduleAdd);
modulesCollection.AddAt(0, heliconApeModuleEntry);
// add Helicon.Ape handler
ConfigurationSection handlersSection = appConfig.GetSection(Constants.HandlersSection, siteId);
ConfigurationElementCollection handlersCollection = handlersSection.GetCollection();
ConfigurationElement handlerAdd = handlersCollection.CreateElement("add");
handlerAdd["name"] = Constants.HeliconApeModule;
handlerAdd["type"] = GetHeliconApeHandlerType(siteId);
handlerAdd["path"] = Constants.HeliconApeHandlerPath;
handlerAdd["verb"] = "*";
handlerAdd["resourceType"] = "Unspecified";
ConfigurationElement heliconApeHandlerEntry = handlersCollection.CreateElement("add");
heliconApeHandlerEntry["name"] = Constants.HeliconApeModule;
heliconApeHandlerEntry["type"] = GetHeliconApeHandlerType(siteId);
heliconApeHandlerEntry["path"] = Constants.HeliconApeHandlerPath;
heliconApeHandlerEntry["verb"] = "*";
heliconApeHandlerEntry["resourceType"] = "Unspecified";
//
handlersCollection.Add(handlerAdd);
handlersCollection.AddAt(0, heliconApeHandlerEntry);
//
srvman.CommitChanges();
}
}
/// <summary>
/// Disables Helicon Ape module & handler on the web site or server globally.
/// </summary>
/// <param name="siteId">
/// Web site id or empty string ("") for server-wide disabling
/// </param>
public override void DisableHeliconApe(string siteId)
{
//
if (String.IsNullOrEmpty(siteId))
if (null == siteId)
throw new ArgumentNullException("siteId");
//
using (var srvman = webObjectsSvc.GetServerManager())
{
//
@ -2281,40 +2308,40 @@ namespace WebsitePanel.Providers.Web
// remove Helicon.Ape module
ConfigurationSection modulesSection = appConfig.GetSection(Constants.ModulesSection, siteId);
ConfigurationElementCollection modulesCollection = modulesSection.GetCollection();
ConfigurationElement htaccessModuleEntry = null;
ConfigurationElement heliconApeModuleEntry = null;
foreach (ConfigurationElement moduleEntry in modulesCollection)
{
if (String.Equals(moduleEntry["name"].ToString(), Constants.HeliconApeModule, StringComparison.InvariantCultureIgnoreCase))
{
htaccessModuleEntry = moduleEntry;
heliconApeModuleEntry = moduleEntry;
break;
}
}
if (htaccessModuleEntry != null)
if (heliconApeModuleEntry != null)
{
modulesCollection.Remove(htaccessModuleEntry);
modulesCollection.Remove(heliconApeModuleEntry);
}
// remove Helicon.Ape handler
ConfigurationSection handlersSection = appConfig.GetSection(Constants.HandlersSection, siteId);
ConfigurationElementCollection handlersCollection = handlersSection.GetCollection();
ConfigurationElement htaccessHandlerEntry = null;
ConfigurationElement heliconApeHandlerEntry = null;
foreach (ConfigurationElement handlerEntry in handlersCollection)
{
if (String.Equals(handlerEntry["name"].ToString(), Constants.HeliconApeModule, StringComparison.InvariantCultureIgnoreCase))
if (String.Equals(handlerEntry["path"].ToString(), Constants.HeliconApeHandlerPath, StringComparison.InvariantCultureIgnoreCase))
{
htaccessHandlerEntry = handlerEntry;
heliconApeHandlerEntry = handlerEntry;
break;
}
}
//
if (htaccessHandlerEntry != null)
if (heliconApeHandlerEntry != null)
{
handlersCollection.Remove(htaccessHandlerEntry);
handlersCollection.Remove(heliconApeHandlerEntry);
}
// commit changes to metabase
if (htaccessModuleEntry != null || htaccessHandlerEntry != null)
if (heliconApeModuleEntry != null || heliconApeHandlerEntry != null)
{
srvman.CommitChanges();
}

View file

@ -202,7 +202,11 @@
<value>.htaccess</value>
</data>
<data name="lclHeliconApeInstallNote.Text" xml:space="preserve">
<value>Helicon Ape product provides .htaccess and .htpasswd files support on IIS 7+ and includes all major Apache modules. Note that Helicon Ape is not yet installed on the server.</value>
<value>Helicon Ape provides .htaccess and .htpasswd files support and includes all major Apache modules.
This is essential tool to fine-tune IIS web sites, improve performance, security,
search engines rankings and for compatibility with many open source applications.
&lt;br/&gt;
Click on the link below to install Helicon Ape on the server:</value>
</data>
<data name="lblHtaccessAssembly.Text" xml:space="preserve">
<value>Module Assembly:</value>
@ -252,4 +256,7 @@
<data name="txtPublicSharedIP.Text" xml:space="preserve">
<value>Web Sites Public Shared Address:</value>
</data>
<data name="chkHeliconApeGlobalRegistration.Text">
<value xml:space="preserve">Register Helicon Ape module globally:</value>
</data>
</root>

View file

@ -460,9 +460,19 @@
</td>
<td class="Normal" valign="top">
<asp:Button ID="EditHeliconApeConfButton" runat="server" class="Button2"
Text="Edit httpd.conf (server config)" onclick="EditHeliconApeConfButton_Click"
/></td>
Text="Edit httpd.conf (server config)" onclick="EditHeliconApeConfButton_Click" />
</td>
</tr>
<tr>
<td valign="top">
<asp:Label runat="server" AssociatedControlID="chkHeliconApeGlobalRegistration" meta:resourcekey="chkHeliconApeGlobalRegistration">Register Helicon Ape module globally:</asp:Label>
</td>
<td>
<asp:CheckBox ID="chkHeliconApeGlobalRegistration" runat="server" style="margin-left: -4px;"/>
<br/>
<asp:Label runat="server" AssociatedControlID="chkHeliconApeGlobalRegistration">Uncheck this box to enable managing Helicon Ape using hosting plan policies.</asp:Label>
</td>
</tr>
</table>
</asp:Panel>
</fieldset>

View file

@ -150,13 +150,19 @@ namespace WebsitePanel.Portal.ProviderControls
txtSecureFoldersModuleAsm.Text = settings["SecureFoldersModuleAssembly"];
//Helicon Ape
WebsitePanel.Providers.ResultObjects.HeliconApeStatus sts = ES.Services.WebServers.GetHeliconApeStatus(int.Parse(Request.QueryString["ServiceID"]));
Providers.ResultObjects.HeliconApeStatus sts = ES.Services.WebServers.GetHeliconApeStatus(int.Parse(Request.QueryString["ServiceID"]));
if (sts.IsInstalled)
{
downloadApePanel.Visible = false;
txtHeliconApeVersion.Text = sts.Version;
lblHeliconRegistrationText.Text = sts.RegistrationInfo;
if (sts.IsEnabled)
{
chkHeliconApeGlobalRegistration.Checked = true;
}
ViewState["HeliconApeInitiallyEnabled"] = chkHeliconApeGlobalRegistration.Checked;
}
else
{
@ -173,7 +179,6 @@ namespace WebsitePanel.Portal.ProviderControls
qsParts.Add("ServerID=" + Request.QueryString["ServerID"]);
qsParts.Add("WPIProduct=HeliconApe");
// TODO: make button here
InstallHeliconApeLink.Attributes["href"] = "Default.aspx?" + String.Join("&", qsParts.ToArray());
}
@ -268,6 +273,19 @@ namespace WebsitePanel.Portal.ProviderControls
ActiveDirectoryIntegration.SaveSettings(settings);
// Helicon Ape
bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked;
if (registerHeliconApeGlobbally != (bool)ViewState["HeliconApeInitiallyEnabled"])
{
if (registerHeliconApeGlobbally)
{
ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"]));
}
else
{
ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"]));
}
}
@ -293,6 +311,7 @@ namespace WebsitePanel.Portal.ProviderControls
settings["GalleryAppsAlwaysIgnoreDependencies"] = chkGalleryAppsAlwaysIgnoreDependencies.Checked.ToString();
}
/*
protected void DownladAndIstallApeLinkButton_Click(object sender, EventArgs e)
{
ES.Services.WebServers.InstallHeliconApe(PanelRequest.ServiceId);
@ -300,6 +319,7 @@ namespace WebsitePanel.Portal.ProviderControls
//Redirect to avoid 2-nd call
Response.Redirect(this.Context.Request.Url.AbsoluteUri);
}
*/
public string GetHttpdEditControlUrl(string ctrlKey, string name)
{

View file

@ -741,6 +741,15 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Button EditHeliconApeConfButton;
/// <summary>
/// chkHeliconApeGlobalRegistration control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkHeliconApeGlobalRegistration;
/// <summary>
/// secOther control.
/// </summary>