diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 155f5514..20b16499 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1,4 +1,4 @@ -USE [${install.database}] +USE [${install.database}] GO -- update database version @@ -44,14 +44,23 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDe END GO - IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.RecoverableItemsSpace') BEGIN INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (421, 12, 25,N'Exchange2007.RecoverableItemsSpace',N'Recoverable Items Space',2, 0 , NULL) END GO +IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'HeliconZoo') +BEGIN +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (42, N'HeliconZoo', 2, N'WebsitePanel.EnterpriseServer.HeliconZooController', 1) +END +GO +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HeliconZoo') +BEGIN +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (135, 42, N'HeliconZoo', N'Web Application Engines', N'WebsitePanel.Providers.Web.HeliconZoo.HeliconZoo, WebsitePanel.Providers.Web.HeliconZoo', N'HeliconZoo', NULL) +END +GO IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeMailboxPlans' AND COLS.name='AllowLitigationHold') BEGIN @@ -423,4 +432,4 @@ GO UPDATE Providers SET ProviderType = N'WebsitePanel.Providers.HostedSolution.CRMProvider2011, WebsitePanel.Providers.HostedSolution.CRMProvider2011' WHERE ProviderID = 1201 -GO +GO \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/WebPlatformInstaller.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/WebPlatformInstaller.cs index d7e28612..fbc57ed9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/WebPlatformInstaller.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/WebPlatformInstaller.cs @@ -8,6 +8,6 @@ namespace WebsitePanel.EnterpriseServer.Base.Common public class WebPlatformInstaller { public const string MAIN_FEED_URL = "https://www.microsoft.com/web/webpi/4.2/webproductlist.xml"; - public const string ZOO_FEED = "http://www.helicontech.com/zoo/feed/wsp4"; + public const string ZOO_FEED = "http://www.helicontech.com/zoo/feed/wsp21"; } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 6444c610..0632b962 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -226,7 +226,9 @@ order by rg.groupOrder public const string LYNC_EVNATIONAL = "Lync.EVNational"; public const string LYNC_EVMOBILE = "Lync.EVMobile"; public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational"; - public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing"; - + public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing"; + + public const string HELICON_ZOO = "HeliconZoo.*"; + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HeliconZooProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HeliconZooProxy.cs new file mode 100644 index 00000000..72272bb0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HeliconZooProxy.cs @@ -0,0 +1,519 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.5456 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// + +using WebsitePanel.Providers.HeliconZoo; + +namespace WebsitePanel.EnterpriseServer { + using System.Xml.Serialization; + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="esHeliconZooSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] + public partial class esHeliconZoo : Microsoft.Web.Services3.WebServicesClientProtocol { + + private System.Threading.SendOrPostCallback GetEnginesOperationCompleted; + + private System.Threading.SendOrPostCallback SetEnginesOperationCompleted; + + private System.Threading.SendOrPostCallback IsEnginesEnabledOperationCompleted; + + private System.Threading.SendOrPostCallback SwithEnginesEnabledOperationCompleted; + + private System.Threading.SendOrPostCallback GetAllowedHeliconZooQuotasForPackageOperationCompleted; + + private System.Threading.SendOrPostCallback GetEnabledEnginesForSiteOperationCompleted; + + private System.Threading.SendOrPostCallback SetEnabledEnginesForSiteOperationCompleted; + + /// + public esHeliconZoo() { + this.Url = "http://localhost:9005/esHeliconZoo.asmx"; + } + + /// + public event GetEnginesCompletedEventHandler GetEnginesCompleted; + + /// + public event SetEnginesCompletedEventHandler SetEnginesCompleted; + + /// + public event IsEnginesEnabledCompletedEventHandler IsEnginesEnabledCompleted; + + /// + public event SwithEnginesEnabledCompletedEventHandler SwithEnginesEnabledCompleted; + + /// + public event GetAllowedHeliconZooQuotasForPackageCompletedEventHandler GetAllowedHeliconZooQuotasForPackageCompleted; + + /// + public event GetEnabledEnginesForSiteCompletedEventHandler GetEnabledEnginesForSiteCompleted; + + /// + public event SetEnabledEnginesForSiteCompletedEventHandler SetEnabledEnginesForSiteCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEngines", 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 HeliconZooEngine[] GetEngines(int serviceId) { + object[] results = this.Invoke("GetEngines", new object[] { + serviceId}); + return ((HeliconZooEngine[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetEngines(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetEngines", new object[] { + serviceId}, callback, asyncState); + } + + /// + public HeliconZooEngine[] EndGetEngines(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((HeliconZooEngine[])(results[0])); + } + + /// + public void GetEnginesAsync(int serviceId) { + this.GetEnginesAsync(serviceId, null); + } + + /// + public void GetEnginesAsync(int serviceId, object userState) { + if ((this.GetEnginesOperationCompleted == null)) { + this.GetEnginesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnginesOperationCompleted); + } + this.InvokeAsync("GetEngines", new object[] { + serviceId}, this.GetEnginesOperationCompleted, userState); + } + + private void OnGetEnginesOperationCompleted(object arg) { + if ((this.GetEnginesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetEnginesCompleted(this, new GetEnginesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEngines", 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 void SetEngines(int serviceId, HeliconZooEngine[] userEngines) { + this.Invoke("SetEngines", new object[] { + serviceId, + userEngines}); + } + + /// + public System.IAsyncResult BeginSetEngines(int serviceId, HeliconZooEngine[] userEngines, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetEngines", new object[] { + serviceId, + userEngines}, callback, asyncState); + } + + /// + public void EndSetEngines(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetEnginesAsync(int serviceId, HeliconZooEngine[] userEngines) { + this.SetEnginesAsync(serviceId, userEngines, null); + } + + /// + public void SetEnginesAsync(int serviceId, HeliconZooEngine[] userEngines, object userState) { + if ((this.SetEnginesOperationCompleted == null)) { + this.SetEnginesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnginesOperationCompleted); + } + this.InvokeAsync("SetEngines", new object[] { + serviceId, + userEngines}, this.SetEnginesOperationCompleted, userState); + } + + private void OnSetEnginesOperationCompleted(object arg) { + if ((this.SetEnginesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetEnginesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/IsEnginesEnabled", 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 bool IsEnginesEnabled(int serviceId) { + object[] results = this.Invoke("IsEnginesEnabled", new object[] { + serviceId}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginIsEnginesEnabled(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("IsEnginesEnabled", new object[] { + serviceId}, callback, asyncState); + } + + /// + public bool EndIsEnginesEnabled(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void IsEnginesEnabledAsync(int serviceId) { + this.IsEnginesEnabledAsync(serviceId, null); + } + + /// + public void IsEnginesEnabledAsync(int serviceId, object userState) { + if ((this.IsEnginesEnabledOperationCompleted == null)) { + this.IsEnginesEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnIsEnginesEnabledOperationCompleted); + } + this.InvokeAsync("IsEnginesEnabled", new object[] { + serviceId}, this.IsEnginesEnabledOperationCompleted, userState); + } + + private void OnIsEnginesEnabledOperationCompleted(object arg) { + if ((this.IsEnginesEnabledCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.IsEnginesEnabledCompleted(this, new IsEnginesEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SwithEnginesEnabled", 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 void SwithEnginesEnabled(int serviceId, bool enabled) { + this.Invoke("SwithEnginesEnabled", new object[] { + serviceId, + enabled}); + } + + /// + public System.IAsyncResult BeginSwithEnginesEnabled(int serviceId, bool enabled, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SwithEnginesEnabled", new object[] { + serviceId, + enabled}, callback, asyncState); + } + + /// + public void EndSwithEnginesEnabled(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SwithEnginesEnabledAsync(int serviceId, bool enabled) { + this.SwithEnginesEnabledAsync(serviceId, enabled, null); + } + + /// + public void SwithEnginesEnabledAsync(int serviceId, bool enabled, object userState) { + if ((this.SwithEnginesEnabledOperationCompleted == null)) { + this.SwithEnginesEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSwithEnginesEnabledOperationCompleted); + } + this.InvokeAsync("SwithEnginesEnabled", new object[] { + serviceId, + enabled}, this.SwithEnginesEnabledOperationCompleted, userState); + } + + private void OnSwithEnginesEnabledOperationCompleted(object arg) { + if ((this.SwithEnginesEnabledCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SwithEnginesEnabledCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAllowedHeliconZooQuotasForPackage" + + "", 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 ShortHeliconZooEngine[] GetAllowedHeliconZooQuotasForPackage(int packageId) { + object[] results = this.Invoke("GetAllowedHeliconZooQuotasForPackage", new object[] { + packageId}); + return ((ShortHeliconZooEngine[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetAllowedHeliconZooQuotasForPackage(int packageId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetAllowedHeliconZooQuotasForPackage", new object[] { + packageId}, callback, asyncState); + } + + /// + public ShortHeliconZooEngine[] EndGetAllowedHeliconZooQuotasForPackage(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ShortHeliconZooEngine[])(results[0])); + } + + /// + public void GetAllowedHeliconZooQuotasForPackageAsync(int packageId) { + this.GetAllowedHeliconZooQuotasForPackageAsync(packageId, null); + } + + /// + public void GetAllowedHeliconZooQuotasForPackageAsync(int packageId, object userState) { + if ((this.GetAllowedHeliconZooQuotasForPackageOperationCompleted == null)) { + this.GetAllowedHeliconZooQuotasForPackageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAllowedHeliconZooQuotasForPackageOperationCompleted); + } + this.InvokeAsync("GetAllowedHeliconZooQuotasForPackage", new object[] { + packageId}, this.GetAllowedHeliconZooQuotasForPackageOperationCompleted, userState); + } + + private void OnGetAllowedHeliconZooQuotasForPackageOperationCompleted(object arg) { + if ((this.GetAllowedHeliconZooQuotasForPackageCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetAllowedHeliconZooQuotasForPackageCompleted(this, new GetAllowedHeliconZooQuotasForPackageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnabledEnginesForSite", 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 string[] GetEnabledEnginesForSite(string siteId, int packageId) { + object[] results = this.Invoke("GetEnabledEnginesForSite", new object[] { + siteId, + packageId}); + return ((string[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetEnabledEnginesForSite(string siteId, int packageId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetEnabledEnginesForSite", new object[] { + siteId, + packageId}, callback, asyncState); + } + + /// + public string[] EndGetEnabledEnginesForSite(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string[])(results[0])); + } + + /// + public void GetEnabledEnginesForSiteAsync(string siteId, int packageId) { + this.GetEnabledEnginesForSiteAsync(siteId, packageId, null); + } + + /// + public void GetEnabledEnginesForSiteAsync(string siteId, int packageId, object userState) { + if ((this.GetEnabledEnginesForSiteOperationCompleted == null)) { + this.GetEnabledEnginesForSiteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnabledEnginesForSiteOperationCompleted); + } + this.InvokeAsync("GetEnabledEnginesForSite", new object[] { + siteId, + packageId}, this.GetEnabledEnginesForSiteOperationCompleted, userState); + } + + private void OnGetEnabledEnginesForSiteOperationCompleted(object arg) { + if ((this.GetEnabledEnginesForSiteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetEnabledEnginesForSiteCompleted(this, new GetEnabledEnginesForSiteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnabledEnginesForSite", 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 void SetEnabledEnginesForSite(string siteId, int packageId, string[] engines) { + this.Invoke("SetEnabledEnginesForSite", new object[] { + siteId, + packageId, + engines}); + } + + /// + public System.IAsyncResult BeginSetEnabledEnginesForSite(string siteId, int packageId, string[] engines, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetEnabledEnginesForSite", new object[] { + siteId, + packageId, + engines}, callback, asyncState); + } + + /// + public void EndSetEnabledEnginesForSite(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetEnabledEnginesForSiteAsync(string siteId, int packageId, string[] engines) { + this.SetEnabledEnginesForSiteAsync(siteId, packageId, engines, null); + } + + /// + public void SetEnabledEnginesForSiteAsync(string siteId, int packageId, string[] engines, object userState) { + if ((this.SetEnabledEnginesForSiteOperationCompleted == null)) { + this.SetEnabledEnginesForSiteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnabledEnginesForSiteOperationCompleted); + } + this.InvokeAsync("SetEnabledEnginesForSite", new object[] { + siteId, + packageId, + engines}, this.SetEnabledEnginesForSiteOperationCompleted, userState); + } + + private void OnSetEnabledEnginesForSiteOperationCompleted(object arg) { + if ((this.SetEnabledEnginesForSiteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetEnabledEnginesForSiteCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetEnginesCompletedEventHandler(object sender, GetEnginesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetEnginesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetEnginesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public HeliconZooEngine[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((HeliconZooEngine[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetEnginesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void IsEnginesEnabledCompletedEventHandler(object sender, IsEnginesEnabledCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class IsEnginesEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal IsEnginesEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SwithEnginesEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetAllowedHeliconZooQuotasForPackageCompletedEventHandler(object sender, GetAllowedHeliconZooQuotasForPackageCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetAllowedHeliconZooQuotasForPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetAllowedHeliconZooQuotasForPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ShortHeliconZooEngine[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ShortHeliconZooEngine[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetEnabledEnginesForSiteCompletedEventHandler(object sender, GetEnabledEnginesForSiteCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetEnabledEnginesForSiteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetEnabledEnginesForSiteCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetEnabledEnginesForSiteCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj index 1390dff3..d2540553 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj @@ -87,6 +87,7 @@ code + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs index 762d78bf..0aaf98a5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs @@ -3578,5 +3578,123 @@ namespace WebsitePanel.EnterpriseServer return -1; } + #region Helicon Zoo + + public static void GetHeliconZooProviderAndGroup(string providerName, out int providerId, out int groupId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + ProviderID, GroupID + FROM Providers + WHERE ProviderName = @ProviderName", + new SqlParameter("@ProviderName", providerName)); + + reader.Read(); + + providerId = (int) reader["ProviderID"]; + groupId = (int) reader["GroupID"]; + + } + + public static IDataReader GetHeliconZooQuotas(int providerId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT + Q.QuotaID, + Q.GroupID, + Q.QuotaName, + Q.QuotaDescription, + Q.QuotaTypeID, + Q.ServiceQuota + FROM Providers AS P + INNER JOIN Quotas AS Q ON P.GroupID = Q.GroupID + WHERE P.ProviderID = @ProviderID", + new SqlParameter("@ProviderID", providerId)); + + return reader; + } + + public static void RemoveHeliconZooQuota(int groupId, string engineName) + { + int quotaId; + + // find quota id + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + QuotaID + FROM Quotas + WHERE QuotaName = @QuotaName AND GroupID = @GroupID", + new SqlParameter("@QuotaName", engineName), + new SqlParameter("@GroupID", groupId)); + + reader.Read(); + quotaId = (int)reader["QuotaID"]; + + // delete references from HostingPlanQuotas + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + "DELETE FROM HostingPlanQuotas WHERE QuotaID = @QuotaID", + new SqlParameter("@QuotaID", quotaId) + ); + + // delete from Quotas + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + "DELETE FROM Quotas WHERE QuotaID = @QuotaID", + new SqlParameter("@QuotaID", quotaId) + ); + + } + + public static void AddHeliconZooQuota(int groupId, int quotaId, string engineName, string engineDescription, int quotaOrder) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.Text, + @"INSERT INTO Quotas (QuotaID, GroupID, QuotaOrder, QuotaName, QuotaDescription, QuotaTypeID, ServiceQuota) + VALUES (@QuotaID, @GroupID, @QuotaOrder, @QuotaName, @QuotaDescription, 1, 0)", + new SqlParameter("@QuotaID", quotaId), + new SqlParameter("@GroupID", groupId), + new SqlParameter("@QuotaOrder", quotaOrder), + new SqlParameter("@QuotaName", engineName), + new SqlParameter("@QuotaDescription", engineDescription) + ); + } + + public static IDataReader GetEnabledHeliconZooQuotasForPackage(int packageId) + { + int providerId, groupId; + + GetHeliconZooProviderAndGroup("HeliconZoo", out providerId, out groupId); + + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT HostingPlanQuotas.QuotaID, Quotas.QuotaName, Quotas.QuotaDescription + FROM HostingPlanQuotas + INNER JOIN Packages ON HostingPlanQuotas.PlanID = Packages.PlanID + INNER JOIN Quotas ON HostingPlanQuotas.QuotaID = Quotas.QuotaID + WHERE + (Packages.PackageID = @PackageID) AND (Quotas.GroupID = @GroupID) AND (HostingPlanQuotas.QuotaValue = 1)", + new SqlParameter("@PackageID", packageId), + new SqlParameter("@GroupID", groupId) + ); + + return reader; + } + + public static int GetServerIdForPackage(int packageId) + { + IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.Text, + @"SELECT TOP 1 + ServerID + FROM Packages + WHERE PackageID = @PackageID", + new SqlParameter("@PackageID", packageId) + ); + + if (reader.Read()) + { + return (int)reader["ServerID"]; + } + + return -1; + } + + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HeliconZoo/HeliconZooController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HeliconZoo/HeliconZooController.cs new file mode 100644 index 00000000..d2f4c5dd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HeliconZoo/HeliconZooController.cs @@ -0,0 +1,228 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Data; +using System.Web; +using Microsoft.ApplicationBlocks.Data; +using WebsitePanel.Providers.HeliconZoo; +using WebsitePanel.Providers.Web; +using WebsitePanel.Server; + +namespace WebsitePanel.EnterpriseServer +{ + public class HeliconZooController + { + public const string HeliconZooQuotaPrefix = "HeliconZoo."; + + public static HeliconZooEngine[] GetEngines(int serviceId) + { + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + return zooServer.GetEngines(); + } + + public static void SetEngines(int serviceId, HeliconZooEngine[] userEngines) + { + // update applicationHost.config + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + zooServer.SetEngines(userEngines); + + // update Helicon Zoo quotas in Quotas table + UpdateQuotas(serviceId, userEngines); + } + + public static bool IsEnginesEnabled(int serviceId) + { + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + return zooServer.IsEnginesEnabled(); + } + + public static void SwithEnginesEnabled(int serviceId, bool enabled) + { + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + zooServer.SwithEnginesEnabled(enabled); + } + + public static ShortHeliconZooEngine[] GetAllowedHeliconZooQuotasForPackage(int packageId) + { + List allowedEngines = new List(); + + IDataReader reader = DataProvider.GetEnabledHeliconZooQuotasForPackage(packageId); + + while (reader.Read()) + { + allowedEngines.Add( new ShortHeliconZooEngine(){ + Name = (string)reader["QuotaName"], + DisplayName= (string)reader["QuotaDescription"], + }); + } + + return allowedEngines.ToArray(); + } + + public static string[] GetEnabledEnginesForSite(string siteId, int packageId) + { + int serviceId = GetHeliconZooServiceIdByPackageId(packageId); + + if (-1 == serviceId) + { + // Helicon Zoo is not enabled for this package + return new string[0]; + } + + // ask Server to enabled engines for site + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + string[] enabledEngines = zooServer.GetEnabledEnginesForSite(siteId); + + return enabledEngines; + } + + public static void SetEnabledEnginesForSite(string siteId, int packageId, string[] engines) + { + int serviceId = GetHeliconZooServiceIdByPackageId(packageId); + + // tell Server to enable engines for site + HeliconZoo zooServer = new HeliconZoo(); + ServiceProviderProxy.Init(zooServer, serviceId); + zooServer.SetEnabledEnginesForSite(siteId, engines); + } + + + #region private helpers + private static void UpdateQuotas(int serviceId, HeliconZooEngine[] userEngines) + { + List updatedEngines = new List(userEngines); + + int providerId, groupId; + DataProvider.GetHeliconZooProviderAndGroup("HeliconZoo", out providerId, out groupId); + + + // get existing Helicon Zoo quotas + List existingQuotas = new List(); + IDataReader reader = DataProvider.GetHeliconZooQuotas(providerId); + while (reader.Read()) + { + string quota = (string) reader["QuotaName"]; + if (quota.StartsWith(HeliconZooQuotaPrefix)) + { + quota = quota.Substring(HeliconZooQuotaPrefix.Length); + } + existingQuotas.Add(quota); + } + + // sort: engine to remove and add + List engineNamesToRemove = new List(); + List enginesToAdd = new List(); + + // find engine to remove in existing engines + foreach (string existingEngineName in existingQuotas) + { + if ( + Array.Find(updatedEngines.ToArray(), engine => engine.name == existingEngineName) == null + && + !engineNamesToRemove.Contains(existingEngineName) + ) + { + engineNamesToRemove.Add(existingEngineName); + } + } + + + // find engines to add + foreach (HeliconZooEngine engine in updatedEngines) + { + if (!existingQuotas.Contains(engine.name)) + { + enginesToAdd.Add(engine); + } + } + + // remove engines + foreach (string engineName in engineNamesToRemove) + { + DataProvider.RemoveHeliconZooQuota(groupId, HeliconZooQuotaPrefix+engineName); + } + + // add engines + int order = 0; + foreach (HeliconZooEngine engine in enginesToAdd) + { + int quotaId = GenerateIntId(engine); + DataProvider.AddHeliconZooQuota(groupId, quotaId, + HeliconZooQuotaPrefix+engine.name, + engine.displayName, + order++); + } + } + + private static int GenerateIntId(HeliconZooEngine engine) + { + return engine.name.GetHashCode(); + } + + private static int GetHeliconZooServiceIdByPackageId(int packageId) + { + // get server id + int serverId = DataProvider.GetServerIdForPackage(packageId); + if (-1 == serverId) + { + throw new Exception(string.Format("Server not found for package {0}", packageId)); + } + + // get Helicon Zoo provider + int heliconZooProviderId = -1; + List providers = ServerController.GetProviders(); + foreach (ProviderInfo providerInfo in providers) + { + if (string.Equals("HeliconZoo", providerInfo.ProviderName, StringComparison.OrdinalIgnoreCase)) + { + heliconZooProviderId = providerInfo.ProviderId; + break; + } + } + + if (-1 == heliconZooProviderId) + { + throw new Exception("Helicon Zoo provider not found"); + } + + // get Helicon Zoo service for site + int serviceId = DataProvider.GetServiceIdByProviderForServer(heliconZooProviderId, serverId); + return serviceId; + } + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs index 0d0a3b6d..6cf961b8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs @@ -1314,8 +1314,18 @@ namespace WebsitePanel.EnterpriseServer // load organization Organization org = GetOrganization(itemId); + if (org == null) + { return -1; + } + + StringDictionary serviceSettings = ServerController.GetServiceSettings(org.ServiceId); + + if (serviceSettings == null) + { + return -1; + } // check package int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); @@ -1329,7 +1339,7 @@ namespace WebsitePanel.EnterpriseServer Organizations orgProxy = GetOrganizationProxy(org.ServiceId); string upn = string.Format("{0}@{1}", name, domain); - string sAMAccountName = BuildAccountName(org.OrganizationId, name, org.ServiceId); + string sAMAccountName = AppendOrgId(serviceSettings) ? BuildAccountNameWithOrgId(org.OrganizationId, name, org.ServiceId) : BuildAccountName(org.OrganizationId, name, org.ServiceId); TaskManager.Write("accountName :" + sAMAccountName); TaskManager.Write("upn :" + upn); @@ -1367,7 +1377,23 @@ namespace WebsitePanel.EnterpriseServer return userId; } + /// Checks should or not user name include organization id. + /// The service settings. + /// True - if organization id should be appended. + private static bool AppendOrgId(StringDictionary serviceSettings) + { + if (!serviceSettings.ContainsKey("usernameformat")) + { + return false; + } + if (!serviceSettings["usernameformat"].Equals("Append OrgId", StringComparison.CurrentCultureIgnoreCase)) + { + return false; + } + + return true; + } public static int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) { @@ -1474,6 +1500,40 @@ namespace WebsitePanel.EnterpriseServer return accountName; } + /// Building account name with organization Id. + /// The organization identifier. + /// The name. + /// The service identifier. + /// The account name with organization Id. + private static string BuildAccountNameWithOrgId(string orgId, string name, int serviceId) + { + int maxLen = 19 - orgId.Length; + + // try to choose name + int i = 0; + + while (true) + { + string num = i > 0 ? i.ToString() : ""; + int len = maxLen - num.Length; + + if (name.Length > len) + { + name = name.Substring(0, len); + } + + string accountName = name + num + "_" + orgId; + + // check if already exists + if (!AccountExists(accountName, serviceId)) + { + return accountName; + } + + i++; + } + } + private static string genSamLogin(string login, string strCounter) { int maxLogin = 20; @@ -2132,6 +2192,7 @@ namespace WebsitePanel.EnterpriseServer catch(Exception ex) { TaskManager.WriteError(ex); + res.IsSuccess = false; } return res; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs index 61ac1666..268391b7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs @@ -33,6 +33,7 @@ using System.Collections; using System.Diagnostics; using System.Collections.Generic; using System.Text; +using System.Data.SqlClient; namespace WebsitePanel.EnterpriseServer { @@ -145,7 +146,22 @@ namespace WebsitePanel.EnterpriseServer schedule.ScheduleInfo.LastRun = DateTime.Now; // update schedule - SchedulerController.UpdateSchedule(schedule.ScheduleInfo); + int MAX_RETRY_COUNT = 10; + int counter = 0; + while (counter < MAX_RETRY_COUNT) + { + try + { + SchedulerController.UpdateSchedule(schedule.ScheduleInfo); + break; + } + catch (SqlException) + { + System.Threading.Thread.Sleep(1000); + } + + counter++; + } // skip execution if the current task is still running scheduledTasks = TaskManager.GetScheduledTasks(); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs index e7b3c904..f69cb478 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs @@ -150,8 +150,8 @@ namespace WebsitePanel.EnterpriseServer { // ERROR WriteLogRecord(2, ex.Message, ex.StackTrace); - return new Exception(String.Format("Error executing '{0}' task on '{1}' {2}", - TopTask.TaskName, TopTask.ItemName, TopTask.Source), ex); + return new Exception((TopTask != null) ? String.Format("Error executing '{0}' task on '{1}' {2}", + TopTask.TaskName, TopTask.ItemName, TopTask.Source) : String.Format("Error executing task"), ex); } public static void WriteError(Exception ex, string text, params string[] textParameters) @@ -182,12 +182,15 @@ namespace WebsitePanel.EnterpriseServer logRecord.TextParameters = textParameters; logRecord.TextIdent = TasksStack.Count - 1; logRecord.ExceptionStackTrace = stackTrace; - RootTask.LogRecords.Add(logRecord); - RootTask.LastLogRecord = logRecord; + if (RootTask != null) + { + RootTask.LogRecords.Add(logRecord); + RootTask.LastLogRecord = logRecord; - // change entire task severity - if (severity > RootTask.Severity) - RootTask.Severity = severity; + // change entire task severity + if (severity > RootTask.Severity) + RootTask.Severity = severity; + } } public static void CompleteTask() diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs index a1dc2caa..64282fa2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs @@ -46,7 +46,12 @@ namespace WebsitePanel.EnterpriseServer protected void Application_Start(object sender, EventArgs e) { - Scheduler.Start(); + if (ConfigurationManager.AppSettings["WebsitePanel.DistableScheduler"] != null) + if (Boolean.Parse(ConfigurationManager.AppSettings["WebsitePanel.DistableScheduler"]) == false) + { + if (Scheduler.nextSchedule == null) + Scheduler.Start(); + } } protected void Application_End(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 99362901..3766094f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -18,9 +18,6 @@ - - - diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj index 8dba7817..98a5db62 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj @@ -83,6 +83,7 @@ + @@ -138,6 +139,7 @@ + @@ -245,6 +247,10 @@ + + esHeliconZoo.asmx + Component + esLync.asmx Component diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx new file mode 100644 index 00000000..c8fcae11 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="esHeliconZoo.asmx.cs" Class="WebsitePanel.EnterpriseServer.esHeliconZoo" %> diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx.cs new file mode 100644 index 00000000..6d812019 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHeliconZoo.asmx.cs @@ -0,0 +1,101 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Web; +using System.Collections; +using System.Collections.Generic; +using System.Web.Services; +using System.Web.Services.Protocols; +using System.ComponentModel; + +using Microsoft.Web.Services3; + + +using WebsitePanel.Providers; +using WebsitePanel.Providers.Web; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.HeliconZoo; + +namespace WebsitePanel.EnterpriseServer +{ + /// + /// Summary description for esHeliconZoo + /// + [WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [Policy("ServerPolicy")] + [ToolboxItem(false)] + public class esHeliconZoo : System.Web.Services.WebService + { + + [WebMethod] + public HeliconZooEngine[] GetEngines(int serviceId) + { + return HeliconZooController.GetEngines(serviceId); + } + + [WebMethod] + public void SetEngines(int serviceId, HeliconZooEngine[] userEngines) + { + HeliconZooController.SetEngines(serviceId, userEngines); + } + + [WebMethod] + public bool IsEnginesEnabled(int serviceId) + { + return HeliconZooController.IsEnginesEnabled(serviceId); + } + + [WebMethod] + public void SwithEnginesEnabled(int serviceId, bool enabled) + { + HeliconZooController.SwithEnginesEnabled(serviceId, enabled); + } + + [WebMethod] + public ShortHeliconZooEngine[] GetAllowedHeliconZooQuotasForPackage(int packageId) + { + return HeliconZooController.GetAllowedHeliconZooQuotasForPackage(packageId); + } + + [WebMethod] + public string[] GetEnabledEnginesForSite(string siteId, int packageId) + { + return HeliconZooController.GetEnabledEnginesForSite(siteId, packageId); + } + + [WebMethod] + public void SetEnabledEnginesForSite(string siteId, int packageId, string[] engines) + { + HeliconZooController.SetEnabledEnginesForSite(siteId, packageId, engines); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs index a61106c7..dd3c94d3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs @@ -33,6 +33,7 @@ using System.Text; namespace WebsitePanel.Server { + [Serializable] public class WPIProduct { private string productId; @@ -45,11 +46,13 @@ namespace WebsitePanel.Server private string downloadedLocation; private string longDescription; private bool isInstalled; + private bool isUpgrade; private int fileSize; private DateTime published; private string author; private string authorUri; + public WPIProduct() { } @@ -91,6 +94,12 @@ namespace WebsitePanel.Server set { this.isInstalled = value; } } + public bool IsUpgrade + { + get { return this.isUpgrade; } + set { this.isUpgrade = value; } + } + public string Version { get { return this.version; } @@ -138,6 +147,11 @@ namespace WebsitePanel.Server get { return authorUri; } set { authorUri = value; } } + + public new string ToString() + { + return productId; + } } public class WPITab @@ -185,6 +199,8 @@ namespace WebsitePanel.Server public class WPIKeyword { + public const string HOSTING_PACKAGE_KEYWORD = "ZooPackage"; + private string id; private string text; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HeliconZoo/IHeliconZooServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HeliconZoo/IHeliconZooServer.cs new file mode 100644 index 00000000..a20189a9 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HeliconZoo/IHeliconZooServer.cs @@ -0,0 +1,96 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Web; +using WebsitePanel.Providers.WebAppGallery; +using WebsitePanel.Providers.Common; + +namespace WebsitePanel.Providers.HeliconZoo +{ + [Serializable] + public class HeliconZooEngine //: ServiceProviderItem + { + public string name { get; set; } + public string displayName { get; set; } + public string fullPath { get; set; } + public string arguments { get; set; } + public string transport { get; set; } + public string protocol { get; set; } + public string host { get; set; } + public long portLower { get; set; } + public long portUpper { get; set; } + public long maxInstances { get; set; } + public long minInstances { get; set; } + public long timeLimit { get; set; } + public long gracefulShutdownTimeout { get; set; } + public long memoryLimit { get; set; } + + public HeliconZooEnv[] environmentVariables; + + public bool isUserEngine { get; set; } + public bool disabled { get; set; } + } + + [Serializable] + public class HeliconZooEnv + { + public string Name { get; set; } + public string Value { get; set; } + } + + [Serializable] + public class ShortHeliconZooEngine + { + public string Name { get; set; } + public string DisplayName { get; set; } + public bool Enabled { get; set; } + + public string KeywordedName + { + get + { + // python.2.7.wsgi -> python27wsgi + return Name.Replace(".", ""); + } + } + } + + public interface IHeliconZooServer + { + HeliconZooEngine[] GetEngines(); + void SetEngines(HeliconZooEngine[] userEngines); + bool IsEnginesEnabled(); + void SwithEnginesEnabled(bool enabled); + string[] GetEnabledEnginesForSite(string siteId); + void SetEnabledEnginesForSite(string siteId, string[] engineNames); + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index f65c7c25..51aff26b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -75,6 +75,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index a932dae7..92cd5378 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -74,6 +74,11 @@ namespace WebsitePanel.Providers.HostedSolution #region Properties + internal string PowerShellUrl + { + get { return ProviderSettings["PowerShellUrl"]; } + } + internal string RootOU { get { return ProviderSettings["RootOU"]; } @@ -1853,6 +1858,7 @@ namespace WebsitePanel.Providers.HostedSolution string ret = null; ExchangeTransaction transaction = StartTransaction(); Runspace runSpace = null; + Runspace runSpaceEx = null; int attempts = 0; string id = null; @@ -1860,6 +1866,7 @@ namespace WebsitePanel.Providers.HostedSolution try { runSpace = OpenRunspace(); + runSpaceEx = OpenRunspaceEx(); Command cmd = null; Collection result = null; @@ -1934,13 +1941,22 @@ namespace WebsitePanel.Providers.HostedSolution if (enabledLitigationHold) { - cmd.Parameters.Add("LitigationHoldEnabled", true); cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace)); cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning)); } ExecuteShellCommand(runSpace, cmd); + //Litigation Hold + if (enabledLitigationHold) + { + cmd = new Command("New-MailboxSearch"); + cmd.Parameters.Add("Name", upn); + cmd.Parameters.Add("InPlaceHoldEnabled", enabledLitigationHold); + cmd.Parameters.Add("SourceMailboxes", upn); + ExecuteShellCommandEx(runSpaceEx, cmd); + } + //Client Access cmd = new Command("Set-CASMailbox"); cmd.Parameters.Add("Identity", id); @@ -2249,9 +2265,11 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeMailbox info = new ExchangeMailbox(); info.AccountName = accountName; Runspace runSpace = null; + Runspace runSpaceEx = null; try { runSpace = OpenRunspace(); + runSpaceEx = OpenRunspaceEx(); Collection result = GetMailboxObject(runSpace, accountName); PSObject mailbox = result[0]; @@ -2267,7 +2285,7 @@ namespace WebsitePanel.Providers.HostedSolution info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName"); info.HideFromAddressBook = (bool)GetPSObjectProperty(mailbox, "HiddenFromAddressListsEnabled"); - info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled"); + Command cmd = new Command("Get-User"); cmd.Parameters.Add("Identity", accountName); @@ -2298,6 +2316,18 @@ namespace WebsitePanel.Providers.HostedSolution info.WebPage = (string)GetPSObjectProperty(user, "WebPage"); info.Notes = (string)GetPSObjectProperty(user, "Notes"); + //Litigation Hold + info.EnableLitigationHold = false; + cmd = new Command("Get-MailboxSearch"); + cmd.Parameters.Add("Identity", accountName); + result = ExecuteShellCommandEx(runSpaceEx, cmd); + if ((result != null) & (result.Count > 0)) + { + mailbox = result[0]; + info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled"); + } + + } finally { @@ -2462,9 +2492,11 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeMailbox info = new ExchangeMailbox(); info.AccountName = accountName; Runspace runSpace = null; + Runspace runSpaceEx = null; try { runSpace = OpenRunspace(); + runSpaceEx = OpenRunspaceEx(); Collection result = GetMailboxObject(runSpace, accountName); PSObject mailbox = result[0]; @@ -2478,8 +2510,6 @@ namespace WebsitePanel.Providers.HostedSolution info.KeepDeletedItemsDays = ConvertEnhancedTimeSpanToDays((EnhancedTimeSpan)GetPSObjectProperty(mailbox, "RetainDeletedItemsFor")); - info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled"); - info.RecoverabelItemsSpace = ConvertUnlimitedToKB((Unlimited)GetPSObjectProperty(mailbox, "RecoverableItemsQuota")); info.RecoverabelItemsWarning = @@ -2497,6 +2527,18 @@ namespace WebsitePanel.Providers.HostedSolution info.EnablePOP = (bool)GetPSObjectProperty(mailbox, "PopEnabled"); info.EnableIMAP = (bool)GetPSObjectProperty(mailbox, "ImapEnabled"); + //Litigation Hold + info.EnableLitigationHold = false; + cmd = new Command("Get-MailboxSearch"); + cmd.Parameters.Add("Identity", accountName); + result = ExecuteShellCommandEx(runSpaceEx, cmd); + if ((result != null) & (result.Count > 0)) + { + mailbox = result[0]; + info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled"); + } + + //Statistics cmd = new Command("Get-MailboxStatistics"); cmd.Parameters.Add("Identity", accountName); @@ -2543,9 +2585,11 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.DebugInfo("Account: {0}", accountName); Runspace runSpace = null; + Runspace runSpaceEx = null; try { runSpace = OpenRunspace(); + runSpaceEx = OpenRunspaceEx(); Command cmd = new Command("Set-Mailbox"); @@ -2558,9 +2602,7 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); - cmd.Parameters.Add("LitigationHoldEnabled", enabledLitigationHold); cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace)); - cmd.Parameters.Add("RetentionUrl", litigationHoldUrl); cmd.Parameters.Add("RetentionComment", litigationHoldMsg); @@ -2568,6 +2610,16 @@ namespace WebsitePanel.Providers.HostedSolution ExecuteShellCommand(runSpace, cmd); + //LitigationHold + cmd = new Command("Get-MailboxSearch"); + cmd.Parameters.Add("Identity", accountName); + Collection result = ExecuteShellCommandEx(runSpaceEx, cmd); + cmd = new Command((result == null) || (result.Count == 0) ? "New-MailboxSearch" : "Set-MailboxSearch"); + cmd.Parameters.Add((result == null) || (result.Count == 0) ? "Name" : "Identity", accountName); + cmd.Parameters.Add("InPlaceHoldEnabled", enabledLitigationHold); + cmd.Parameters.Add("SourceMailboxes", accountName); + ExecuteShellCommandEx(runSpaceEx, cmd); + //Client Access cmd = new Command("Set-CASMailbox"); cmd.Parameters.Add("Identity", accountName); @@ -2932,9 +2984,11 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeMailboxStatistics info = new ExchangeMailboxStatistics(); Runspace runSpace = null; + Runspace runSpaceEx = null; try { runSpace = OpenRunspace(); + runSpaceEx = OpenRunspaceEx(); Collection result = GetMailboxObject(runSpace, id); PSObject mailbox = result[0]; @@ -2943,7 +2997,6 @@ namespace WebsitePanel.Providers.HostedSolution string path = AddADPrefix(dn); DirectoryEntry entry = GetADObject(path); info.Enabled = !(bool)entry.InvokeGet("AccountDisabled"); - info.LitigationHoldEnabled = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled"); info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName"); SmtpAddress smtpAddress = (SmtpAddress)GetPSObjectProperty(mailbox, "PrimarySmtpAddress"); @@ -2953,6 +3006,7 @@ namespace WebsitePanel.Providers.HostedSolution info.MaxSize = ConvertUnlimitedToBytes((Unlimited)GetPSObjectProperty(mailbox, "ProhibitSendReceiveQuota")); DateTime? whenCreated = (DateTime?)GetPSObjectProperty(mailbox, "WhenCreated"); info.AccountCreated = ConvertNullableToDateTime(whenCreated); + //Client Access Command cmd = new Command("Get-CASMailbox"); cmd.Parameters.Add("Identity", id); @@ -2965,6 +3019,17 @@ namespace WebsitePanel.Providers.HostedSolution info.POPEnabled = (bool)GetPSObjectProperty(mailbox, "PopEnabled"); info.IMAPEnabled = (bool)GetPSObjectProperty(mailbox, "ImapEnabled"); + //Litigation Hold + info.LitigationHoldEnabled = false; + cmd = new Command("Get-MailboxSearch"); + cmd.Parameters.Add("Identity", id); + result = ExecuteShellCommandEx(runSpaceEx, cmd); + if ((result != null) & (result.Count > 0)) + { + mailbox = result[0]; + info.LitigationHoldEnabled = (bool)GetPSObjectProperty(mailbox, "InPlaceHoldEnabled"); + } + //Statistics cmd = new Command("Get-MailboxStatistics"); cmd.Parameters.Add("Identity", id); @@ -5778,26 +5843,8 @@ namespace WebsitePanel.Providers.HostedSolution #endregion #region PowerShell integration - /*private Collection ExecuteShellCommand2(Runspace runSpace, string cmd) - { - ExchangeLog.LogStart("ExecuteShellCommand"); - RunspaceInvoke invoker = new RunspaceInvoke(runSpace); - System.Collections.IList errors = null; - Collection results = invoker.Invoke(cmd, null, out errors); - if (errors != null && errors.Count > 0) - { - foreach (PSObject err in errors) - { - string errorMessage = string.Format("Invoke error: {0}", err.ToString()); - ExchangeLog.LogError(errorMessage, null); - } - } - invoker = null; - ExchangeLog.LogEnd("ExecuteShellCommand"); - return results; - }*/ - private static RunspaceConfiguration runspaceConfiguration = null; + private static WSManConnectionInfo connectionInfo = null; private static string ExchangePath = null; internal static string GetExchangePath() @@ -5869,6 +5916,35 @@ namespace WebsitePanel.Providers.HostedSolution return runSpace; } + internal virtual Runspace OpenRunspaceEx() + { + ExchangeLog.LogStart("OpenRunspace Ex"); + ExchangeLog.DebugInfo("PowerShelll Url: {0}", PowerShellUrl); + + if (connectionInfo == null) + { + PSCredential credential = (PSCredential)null; + + connectionInfo = new WSManConnectionInfo(new Uri(PowerShellUrl), + "http://schemas.microsoft.com/powershell/Microsoft.Exchange", + credential); + + connectionInfo.AuthenticationMechanism = AuthenticationMechanism.NegotiateWithImplicitCredential; + } + + Runspace runSpace = RunspaceFactory.CreateRunspace(connectionInfo); + + runSpace.Open(); + + ExchangeLog.LogEnd("OpenRunspace"); + + Command cmd = new Command("Set-ADServerSettings"); + cmd.Parameters.Add("PreferredServer", PrimaryDomainController); + ExecuteShellCommand(runSpace, cmd, false); + return runSpace; + } + + internal void CloseRunspace(Runspace runspace) { try @@ -5884,6 +5960,23 @@ namespace WebsitePanel.Providers.HostedSolution } } + internal void CloseRunspaceEx(Runspace runspace) + { + try + { + if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) + { + runspace.Dispose(); + runspace = null; + } + } + catch (Exception ex) + { + ExchangeLog.LogError("Runspace error", ex); + } + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) { return ExecuteShellCommand(runSpace, cmd, true); @@ -5945,6 +6038,73 @@ namespace WebsitePanel.Providers.HostedSolution return results; } + + internal Collection ExecuteShellCommandEx(Runspace runSpace, Command cmd) + { + return ExecuteShellCommandEx(runSpace, cmd, true); + } + + internal Collection ExecuteShellCommandEx(Runspace runSpace, Command cmd, bool useDomainController) + { + object[] errors; + return ExecuteShellCommandEx(runSpace, cmd, useDomainController, out errors); + } + + internal Collection ExecuteShellCommandEx(Runspace runSpace, Command cmd, out object[] errors) + { + return ExecuteShellCommandEx(runSpace, cmd, true, out errors); + } + + internal Collection ExecuteShellCommandEx(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors) + { + ExchangeLog.LogStart("ExecuteShellCommandEx"); + List errorList = new List(); + + if (useDomainController) + { + CommandParameter dc = new CommandParameter("DomainController", PrimaryDomainController); + if (!cmd.Parameters.Contains(dc)) + { + cmd.Parameters.Add(dc); + } + } + + ExchangeLog.DebugCommand(cmd); + Collection results = null; + // Create a pipeline + Pipeline pipeLine = runSpace.CreatePipeline(); + using (pipeLine) + { + // Add the command + pipeLine.Commands.Add(cmd); + // Execute the pipeline and save the objects returned. + results = pipeLine.Invoke(); + + // Log out any errors in the pipeline execution + // NOTE: These errors are NOT thrown as exceptions! + // Be sure to check this to ensure that no errors + // happened while executing the command. + if (pipeLine.Error != null && pipeLine.Error.Count > 0) + { + var error = pipeLine.Error.Read() as Collection; + if (error != null) + { + foreach (ErrorRecord er in error) + { + errorList.Add(er); + string errorMessage = string.Format("Invoke error: {0}", er.Exception.Message); + ExchangeLog.LogWarning(errorMessage); + } + } + } + } + pipeLine = null; + errors = errorList.ToArray(); + ExchangeLog.LogEnd("ExecuteShellCommandEx"); + return results; + } + + /// /// Returns the distinguished name of the object from the shell execution result /// diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb index 9229def6..15126d0b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb @@ -2035,7 +2035,7 @@ Public Class MailEnable If [String].IsNullOrEmpty(version) = False Then Dim split As String() = version.Split(New [Char]() {"."c}) - Return split(0).Equals("1") Or split(0).Equals("2") Or split(0).Equals("3") Or split(0).Equals("4") Or split(0).Equals("5") Or split(0).Equals("6") + Return split(0).Equals("1") Or split(0).Equals("2") Or split(0).Equals("3") Or split(0).Equals("4") Or split(0).Equals("5") Or split(0).Equals("6") Or split(0).Equals("7") Else Return False End If diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/HeliconZoo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/HeliconZoo.cs new file mode 100644 index 00000000..7ebd4b72 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/HeliconZoo.cs @@ -0,0 +1,553 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.Win32; +using Microsoft.Web.Administration; +using Microsoft.Web.Management.Server; +using WebsitePanel.Providers; +using WebsitePanel.Providers.HeliconZoo; + + + +namespace WebsitePanel.Providers.Web.HeliconZoo +{ + public class HeliconZoo : HostingServiceProviderBase, IHeliconZooServer + { + const string ZooInstalledRegistryKey = @"SOFTWARE\Helicon\Zoo"; + const string ZooInstalledRegistryKeyWow6432 = @"SOFTWARE\Wow6432Node\Helicon\Zoo"; + private const int ZooCompatibleBuild = 52; + + public override bool IsInstalled() + { + // always return true; + return true; + + /* + RegistryKey HKLM = Registry.LocalMachine; + string fullVersion = string.Empty; + RegistryKey key = HKLM.OpenSubKey(ZooInstalledRegistryKey); + if (key != null) + { + fullVersion = key.GetValue("Version", null) as string; + } + else + { + key = HKLM.OpenSubKey(ZooInstalledRegistryKeyWow6432); + if (key != null) + { + fullVersion = key.GetValue("Version", null) as string; + } + } + + if (string.IsNullOrEmpty(fullVersion)) + { + return false; + } + + Match match = Regex.Match(fullVersion, @"\.(\d+)$"); + if (match.Success) + { + int version = int.Parse(match.Groups[1].ToString()); + if (version >= ZooCompatibleBuild) + { + return true; + } + } + + return false; + */ + } + + public HeliconZooEngine[] GetEngines() + { + // Read applicationHost.config + + List result = new List(); + + using (var srvman = new ServerManager()) + { + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + + ConfigurationSection heliconZooServer = appConfig.GetSection("system.webServer/heliconZooServer"); + + ConfigurationElement engines = heliconZooServer.GetChildElement("engines"); + ConfigurationElementCollection enginesCollection = engines.GetCollection(); + + //switchboard + ConfigurationElement switchboard = heliconZooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + + + bool switchboardDisabledDefault = true; + foreach (ConfigurationElement switchboardElement in switchboardCollection) + { + if ((string)switchboardElement.GetAttributeValue("name") == "*") + { + switchboardDisabledDefault = !(bool)switchboardElement.GetAttributeValue("enabled"); + break; + } + } + + foreach (ConfigurationElement item in enginesCollection) + { + HeliconZooEngine newItem = ConvertElementToHeliconZooEngine(item); + newItem.disabled = switchboardDisabledDefault; + result.Add(newItem); + } + + ConfigurationElement userEngines = heliconZooServer.GetChildElement("userEngines"); + ConfigurationElementCollection userEnginesCollection = userEngines.GetCollection(); + foreach (ConfigurationElement item in userEnginesCollection) + { + HeliconZooEngine newItem = ConvertElementToHeliconZooEngine(item); + + //remove if exists + HeliconZooEngine serverItem = Collection_GetHeliconZooEngineByName(result, newItem.name); + if (serverItem != null) + { + result.Remove(serverItem); + } + + //override settings + newItem.isUserEngine = true; + newItem.disabled = switchboardDisabledDefault; + result.Add(newItem); + } + + + + foreach (ConfigurationElement switchboardElement in switchboardCollection) + { + HeliconZooEngine item = Collection_GetHeliconZooEngineByName(result, (string)switchboardElement.GetAttributeValue("name")); + if (item != null) + { + item.disabled = !(bool)switchboardElement.GetAttributeValue("enabled"); + } + else + { + //default value + //item.disabled = !switchboardEnabledDefaults; + } + + } + + + } + + return result.ToArray(); + } + + HeliconZooEngine Collection_GetHeliconZooEngineByName(List collection, string name) + { + foreach (HeliconZooEngine r in collection) + { + if (r.name == name) + { + return r; + } + } + + return null; + } + + + public void SetEngines(HeliconZooEngine[] userEngines) + { + // Write to applicationHost.config + + using (var srvman = new ServerManager()) + { + + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + + + ConfigurationSection heliconZooServer = appConfig.GetSection("system.webServer/heliconZooServer"); + ConfigurationElement engines = heliconZooServer.GetChildElement("userEngines"); + ConfigurationElementCollection enginesCollection = engines.GetCollection(); + enginesCollection.Clear(); + + + ConfigurationElement switchboard = heliconZooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + switchboardCollection.Clear(); + + + //Disable all engines, by default for WSP + /* + ConfigurationElement disableAll = switchboardCollection.CreateElement(); + disableAll.SetAttributeValue("name", "*"); + disableAll.SetAttributeValue("enabled", "false"); + switchboardCollection.Add(disableAll); + */ + + + foreach(HeliconZooEngine item in userEngines) + { + if (item.isUserEngine) + { + ConfigurationElement engine = enginesCollection.CreateElement(); + ConvertHeliconZooEngineToElement(item, engine); + enginesCollection.Add(engine); + } + + /* + ConfigurationElement disable = switchboardCollection.CreateElement(); + disable.SetAttributeValue("name", item.name ); + disable.SetAttributeValue("enabled", item.disabled? "false": "true" ); + switchboardCollection.Add(disable); + */ + } + + srvman.CommitChanges(); + } + } + + public bool IsEnginesEnabled() + { + bool isEnginesEnabled = true; + + using (var srvman = new ServerManager()) + { + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + + ConfigurationSection heliconZooServer = appConfig.GetSection("system.webServer/heliconZooServer"); + + //switchboard + ConfigurationElement switchboard = heliconZooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + + + foreach (ConfigurationElement switchboardElement in switchboardCollection) + { + if ((string) switchboardElement.GetAttributeValue("name") == "*") + { + isEnginesEnabled = (bool) switchboardElement.GetAttributeValue("enabled"); + break; + } + } + } + + return isEnginesEnabled; + } + + public void SwithEnginesEnabled(bool enabled) + { + using (var srvman = new ServerManager()) + { + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + + ConfigurationSection heliconZooServer = appConfig.GetSection("system.webServer/heliconZooServer"); + + ConfigurationElement switchboard = heliconZooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + + bool wildCardFound = false; + foreach (ConfigurationElement switchboardElement in switchboardCollection) + { + if ((string)switchboardElement.GetAttributeValue("name") == "*") + { + switchboardElement.SetAttributeValue("enabled", enabled ? "true" : "false"); + wildCardFound = true; + break; + } + } + + if (!wildCardFound) + { + ConfigurationElement element = switchboardCollection.CreateElement(); + element.SetAttributeValue("name", "*"); + element.SetAttributeValue("enabled", enabled ? "true" : "false"); + switchboardCollection.Add(element); + } + + srvman.CommitChanges(); + } + } + + public string[] GetEnabledEnginesForSite(string siteId) + { + if (string.IsNullOrEmpty(siteId)) + { + return new string[0]; + } + + List engines = new List(); + + using (var srvman = new ServerManager()) + { + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + ConfigurationSection zooServer = appConfig.GetSection("system.webServer/heliconZooServer", siteId); + ConfigurationElement switchboard = zooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + + foreach (ConfigurationElement element in switchboardCollection) + { + string enabled = element.GetAttributeValue("enabled").ToString(); + if (string.Equals(enabled, "true", StringComparison.OrdinalIgnoreCase)) + { + engines.Add(element.GetAttributeValue("name").ToString()); + } + } + } + + return engines.ToArray(); + } + + public void SetEnabledEnginesForSite(string siteId, string[] engineNames) + { + if (string.IsNullOrEmpty(siteId)) + { + return; + } + + using (var srvman = new ServerManager()) + { + Configuration appConfig = srvman.GetApplicationHostConfiguration(); + ConfigurationSection zooServer = appConfig.GetSection("system.webServer/heliconZooServer", siteId); + ConfigurationElement switchboard = zooServer.GetChildElement("switchboard"); + ConfigurationElementCollection switchboardCollection = switchboard.GetCollection(); + + switchboardCollection.Clear(); + + ConfigurationElement elementDisableAll = switchboardCollection.CreateElement(); + elementDisableAll.SetAttributeValue("name", "*"); + elementDisableAll.SetAttributeValue("enabled", "false"); + switchboardCollection.Add(elementDisableAll); + + foreach (string engineName in engineNames) + { + ConfigurationElement element = switchboardCollection.CreateElement(); + element.SetAttributeValue("name", engineName); + element.SetAttributeValue("enabled", "true"); + switchboardCollection.Add(element); + } + + RegisterZooPhpHandlers(siteId, engineNames, appConfig); + + srvman.CommitChanges(); + } + + } + + #region private methods + + private void ConvertHeliconZooEngineToElement(HeliconZooEngine item, ConfigurationElement engine) + { + engine.SetAttributeValue("name", item.name); + engine.SetAttributeValue("displayName", item.displayName); + engine.SetAttributeValue("arguments", item.arguments); + engine.SetAttributeValue("fullPath", item.fullPath); + engine.SetAttributeValue("arguments", item.arguments); + engine.SetAttributeValue("transport", item.transport); + engine.SetAttributeValue("protocol", item.protocol); + engine.SetAttributeValue("host", item.host); + + engine.SetAttributeValue("portLower", item.portLower); + engine.SetAttributeValue("portUpper", item.portUpper); + engine.SetAttributeValue("maxInstances", item.maxInstances); + engine.SetAttributeValue("minInstances", item.minInstances); + engine.SetAttributeValue("timeLimit", item.timeLimit); + engine.SetAttributeValue("gracefulShutdownTimeout", item.gracefulShutdownTimeout); + engine.SetAttributeValue("memoryLimit", item.memoryLimit); + + + ConfigurationElementCollection envColl = engine.GetChildElement("environmentVariables").GetCollection(); + + + foreach(HeliconZooEnv env in item.environmentVariables) + { + ConfigurationElement envElement = envColl.CreateElement(); + envElement.SetAttributeValue("name", env.Name); + envElement.SetAttributeValue("value", env.Value); + envColl.Add(envElement); + } + + + } + + private HeliconZooEngine ConvertElementToHeliconZooEngine(ConfigurationElement item) + { + HeliconZooEngine result = new HeliconZooEngine(); + + result.name = (string)item.GetAttributeValue("name"); + result.displayName = (string)item.GetAttributeValue("displayName"); + result.arguments = (string)item.GetAttributeValue("arguments"); + result.fullPath = (string)item.GetAttributeValue("fullPath"); + result.arguments = (string)item.GetAttributeValue("arguments"); + result.transport = (string)item.GetAttributeValue("transport"); + result.protocol = (string)item.GetAttributeValue("protocol"); + result.host = (string)item.GetAttributeValue("host"); + + result.portLower = (long) item.GetAttributeValue("portLower"); + result.portUpper = (long) item.GetAttributeValue("portUpper"); + result.maxInstances = (long) item.GetAttributeValue("maxInstances"); + result.minInstances = (long) item.GetAttributeValue("minInstances"); + result.timeLimit = (long) item.GetAttributeValue("timeLimit"); + result.gracefulShutdownTimeout = (long) item.GetAttributeValue("gracefulShutdownTimeout"); + result.memoryLimit = (long) item.GetAttributeValue("memoryLimit"); + + List envList = new List(); + ConfigurationElementCollection envColl = item.GetChildElement("environmentVariables").GetCollection(); + foreach (ConfigurationElement el in envColl) + { + envList.Add(ConvertElementToHeliconZooEnv(el)); + } + result.environmentVariables = envList.ToArray(); + + // TODO: fix this + result.isUserEngine = false; + + // TODO: disabled + + return result; + + } + + private HeliconZooEnv ConvertElementToHeliconZooEnv(ConfigurationElement item) + { + HeliconZooEnv result = new HeliconZooEnv(); + result.Name = (string)item.GetAttributeValue("name"); + result.Value = (string)item.GetAttributeValue("value"); + return result; + } + + private static void RegisterZooPhpHandlers(string siteId, string[] engineNames, Configuration appConfig) + { + // set up zoo php handler if php engine was enabled + string enabledPhpEngine = string.Empty; + foreach (string engineName in engineNames) + { + if (engineName.StartsWith("php", StringComparison.OrdinalIgnoreCase)) + { + enabledPhpEngine = engineName; + } + } + + if (!string.IsNullOrEmpty(enabledPhpEngine)) + { + ConfigurationSection handlers = appConfig.GetSection("system.webServer/handlers", siteId); + ConfigurationElementCollection handlerCollection = handlers.GetCollection(); + + // remove native php handlers + /* + ConfigurationElement removePhp53 = handlerCollection.CreateElement("remove"); + removePhp53.SetAttributeValue("name", "PHP53_via_FastCGI"); + handlerCollection.Add(removePhp53); + + ConfigurationElement removePhp = handlerCollection.CreateElement("remove"); + removePhp.SetAttributeValue("name", "PHP_via_FastCGI"); + handlerCollection.Add(removePhp); + */ + + // search native php handlers + /* + List elementsToRemove = new List(); + foreach (ConfigurationElement el in handlerCollection) + { + string name = el.GetAttributeValue("name") as string; + if (!string.IsNullOrEmpty(name)) + { + if (string.Equals(name, "PHP_via_FastCGI", StringComparison.OrdinalIgnoreCase) + || + string.Equals(name, "PHP53_via_FastCGI", StringComparison.OrdinalIgnoreCase) + ) + { + elementsToRemove.Add(el); + } + } + } + + foreach (ConfigurationElement element in elementsToRemove) + { + //handlerCollection.Remove(element); + } + */ + + + // check zoo handlers exists + List zooPhpHandlersToRemove = new List(); + foreach (ConfigurationElement el in handlerCollection) + { + string name = el.GetAttributeValue("name") as string; + if (!string.IsNullOrEmpty(name)) + { + if (name.StartsWith("php.", StringComparison.OrdinalIgnoreCase)) + { + string scriptProcessor = el.GetAttributeValue("scriptProcessor") as string; + if (!string.IsNullOrEmpty(scriptProcessor)) + { + zooPhpHandlersToRemove.Add(el); + } + } + } + } + + // remove existing zoo php handlers + foreach (ConfigurationElement element in zooPhpHandlersToRemove) + { + handlerCollection.Remove(element); + } + + // add zoo php handlers + ConfigurationElement zooPhpX86 = handlerCollection.CreateElement(); + zooPhpX86.SetAttributeValue("name", "php.pipe#x86"); + zooPhpX86.SetAttributeValue("scriptProcessor", enabledPhpEngine); + zooPhpX86.SetAttributeValue("path", "*.php"); + zooPhpX86.SetAttributeValue("verb", "*"); + zooPhpX86.SetAttributeValue("modules", "HeliconZoo_x86"); + zooPhpX86.SetAttributeValue("preCondition", "bitness32"); + zooPhpX86.SetAttributeValue("resourceType", "Unspecified"); + zooPhpX86.SetAttributeValue("requireAccess", "Script"); + handlerCollection.AddAt(0, zooPhpX86); + + ConfigurationElement zooPhpX64 = handlerCollection.CreateElement(); + zooPhpX64.SetAttributeValue("name", "php.pipe#x64"); + zooPhpX64.SetAttributeValue("scriptProcessor", enabledPhpEngine); + zooPhpX64.SetAttributeValue("path", "*.php"); + zooPhpX64.SetAttributeValue("verb", "*"); + zooPhpX64.SetAttributeValue("modules", "HeliconZoo_x64"); + zooPhpX64.SetAttributeValue("preCondition", "bitness64"); + zooPhpX64.SetAttributeValue("resourceType", "Unspecified"); + zooPhpX64.SetAttributeValue("requireAccess", "Script"); + handlerCollection.AddAt(1, zooPhpX64); + + // process index.php as default document + ConfigurationSection defaultDocument = appConfig.GetSection("system.webServer/defaultDocument", siteId); + RegisterPhpDefaultDocument(defaultDocument); + } + } + + private static void RegisterPhpDefaultDocument(ConfigurationSection defaultDocument) + { + ConfigurationElement defaultFiles = defaultDocument.GetChildElement("files"); + ConfigurationElementCollection filesCollection = defaultFiles.GetCollection(); + + // search index.php in default documents + bool indexPhpPresent = false; + foreach (ConfigurationElement configurationElement in filesCollection) + { + string value = configurationElement.GetAttributeValue("value") as string; + if (!string.IsNullOrEmpty(value)) + { + if (string.Equals(value, "index.php", StringComparison.OrdinalIgnoreCase)) + { + indexPhpPresent = true; + break; + } + } + } + + if (!indexPhpPresent) + { + // add index.php + ConfigurationElement indexPhp = filesCollection.CreateElement(); + indexPhp.SetAttributeValue("value", "index.php"); + filesCollection.AddAt(0, indexPhp); + } + } + + #endregion + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..2a5aaabe --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebsitePanel.Providers.Web.HeliconZoo")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyProduct("WebsitePanel.Providers.Web.HeliconZoo")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("36ce3717-bdb5-40c3-ba56-c91ab9bf1903")] + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/WebsitePanel.Providers.Web.HeliconZoo.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/WebsitePanel.Providers.Web.HeliconZoo.csproj new file mode 100644 index 00000000..5a620918 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.HeliconZoo/WebsitePanel.Providers.Web.HeliconZoo.csproj @@ -0,0 +1,70 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4} + Library + Properties + WebsitePanel.Providers.Web.HeliconZoo + WebsitePanel.Providers.Web.HeliconZoo + v3.5 + 512 + + + true + full + false + ..\WebsitePanel.Server\bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\WebsitePanel.Server\bin\ + TRACE + prompt + 4 + + + + False + ..\..\Lib\References\Microsoft\Microsoft.Web.Administration.dll + + + False + ..\..\Lib\References\Microsoft\Microsoft.Web.Management.dll + + + + + + + + + + + VersionInfo.cs + + + + + + + {684C932A-6C75-46AC-A327-F3689D89EB42} + WebsitePanel.Providers.Base + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs index 2b2ba11d..3f99d1a6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs @@ -30,6 +30,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Security; using System.Text; using Microsoft.Practices.EnterpriseLibrary.Caching; @@ -167,7 +168,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery foreach (Keyword keyword in wpi.GetKeywords()) { - if (wpi.IsKeywordApplication(keyword)) + if (wpi.IsKeywordApplication(keyword) && !wpi.IsHiddenKeyword(keyword)) { categories.Add(new GalleryCategory { @@ -395,7 +396,8 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery LastUpdated = product.Published, Published = product.Published, Link = (null==product.Link) ? "" :product.Link.ToString(), - InstallerFileSize = size + InstallerFileSize = size, + Keywords = product.Keywords.Select(keyword => keyword.Id).ToList() }; } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/HeliconZooProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/HeliconZooProxy.cs new file mode 100644 index 00000000..356be78d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/HeliconZooProxy.cs @@ -0,0 +1,405 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.5456 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// +namespace WebsitePanel.Providers.HeliconZoo { + using System.Xml.Serialization; + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="HeliconZooSoap", Namespace="http://smbsaas/websitepanel/server/")] + public partial class HeliconZoo : Microsoft.Web.Services3.WebServicesClientProtocol { + + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; + + private System.Threading.SendOrPostCallback GetEnginesOperationCompleted; + + private System.Threading.SendOrPostCallback SetEnginesOperationCompleted; + + private System.Threading.SendOrPostCallback IsEnginesEnabledOperationCompleted; + + private System.Threading.SendOrPostCallback SwithEnginesEnabledOperationCompleted; + + private System.Threading.SendOrPostCallback GetEnabledEnginesForSiteOperationCompleted; + + private System.Threading.SendOrPostCallback SetEnabledEnginesForSiteOperationCompleted; + + /// + public HeliconZoo() { + this.Url = "http://localhost:9003/HeliconZoo.asmx"; + } + + /// + public event GetEnginesCompletedEventHandler GetEnginesCompleted; + + /// + public event SetEnginesCompletedEventHandler SetEnginesCompleted; + + /// + public event IsEnginesEnabledCompletedEventHandler IsEnginesEnabledCompleted; + + /// + public event SwithEnginesEnabledCompletedEventHandler SwithEnginesEnabledCompleted; + + /// + public event GetEnabledEnginesForSiteCompletedEventHandler GetEnabledEnginesForSiteCompleted; + + /// + public event SetEnabledEnginesForSiteCompletedEventHandler SetEnabledEnginesForSiteCompleted; + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetEngines", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public HeliconZooEngine[] GetEngines() { + object[] results = this.Invoke("GetEngines", new object[0]); + return ((HeliconZooEngine[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetEngines(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetEngines", new object[0], callback, asyncState); + } + + /// + public HeliconZooEngine[] EndGetEngines(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((HeliconZooEngine[])(results[0])); + } + + /// + public void GetEnginesAsync() { + this.GetEnginesAsync(null); + } + + /// + public void GetEnginesAsync(object userState) { + if ((this.GetEnginesOperationCompleted == null)) { + this.GetEnginesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnginesOperationCompleted); + } + this.InvokeAsync("GetEngines", new object[0], this.GetEnginesOperationCompleted, userState); + } + + private void OnGetEnginesOperationCompleted(object arg) { + if ((this.GetEnginesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetEnginesCompleted(this, new GetEnginesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetEngines", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetEngines(HeliconZooEngine[] userEngines) { + this.Invoke("SetEngines", new object[] { + userEngines}); + } + + /// + public System.IAsyncResult BeginSetEngines(HeliconZooEngine[] userEngines, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetEngines", new object[] { + userEngines}, callback, asyncState); + } + + /// + public void EndSetEngines(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetEnginesAsync(HeliconZooEngine[] userEngines) { + this.SetEnginesAsync(userEngines, null); + } + + /// + public void SetEnginesAsync(HeliconZooEngine[] userEngines, object userState) { + if ((this.SetEnginesOperationCompleted == null)) { + this.SetEnginesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnginesOperationCompleted); + } + this.InvokeAsync("SetEngines", new object[] { + userEngines}, this.SetEnginesOperationCompleted, userState); + } + + private void OnSetEnginesOperationCompleted(object arg) { + if ((this.SetEnginesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetEnginesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/IsEnginesEnabled", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool IsEnginesEnabled() { + object[] results = this.Invoke("IsEnginesEnabled", new object[0]); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginIsEnginesEnabled(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("IsEnginesEnabled", new object[0], callback, asyncState); + } + + /// + public bool EndIsEnginesEnabled(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void IsEnginesEnabledAsync() { + this.IsEnginesEnabledAsync(null); + } + + /// + public void IsEnginesEnabledAsync(object userState) { + if ((this.IsEnginesEnabledOperationCompleted == null)) { + this.IsEnginesEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnIsEnginesEnabledOperationCompleted); + } + this.InvokeAsync("IsEnginesEnabled", new object[0], this.IsEnginesEnabledOperationCompleted, userState); + } + + private void OnIsEnginesEnabledOperationCompleted(object arg) { + if ((this.IsEnginesEnabledCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.IsEnginesEnabledCompleted(this, new IsEnginesEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SwithEnginesEnabled", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SwithEnginesEnabled(bool enabled) { + this.Invoke("SwithEnginesEnabled", new object[] { + enabled}); + } + + /// + public System.IAsyncResult BeginSwithEnginesEnabled(bool enabled, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SwithEnginesEnabled", new object[] { + enabled}, callback, asyncState); + } + + /// + public void EndSwithEnginesEnabled(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SwithEnginesEnabledAsync(bool enabled) { + this.SwithEnginesEnabledAsync(enabled, null); + } + + /// + public void SwithEnginesEnabledAsync(bool enabled, object userState) { + if ((this.SwithEnginesEnabledOperationCompleted == null)) { + this.SwithEnginesEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSwithEnginesEnabledOperationCompleted); + } + this.InvokeAsync("SwithEnginesEnabled", new object[] { + enabled}, this.SwithEnginesEnabledOperationCompleted, userState); + } + + private void OnSwithEnginesEnabledOperationCompleted(object arg) { + if ((this.SwithEnginesEnabledCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SwithEnginesEnabledCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetEnabledEnginesForSite", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetEnabledEnginesForSite(string siteId) { + object[] results = this.Invoke("GetEnabledEnginesForSite", new object[] { + siteId}); + return ((string[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetEnabledEnginesForSite(string siteId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetEnabledEnginesForSite", new object[] { + siteId}, callback, asyncState); + } + + /// + public string[] EndGetEnabledEnginesForSite(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string[])(results[0])); + } + + /// + public void GetEnabledEnginesForSiteAsync(string siteId) { + this.GetEnabledEnginesForSiteAsync(siteId, null); + } + + /// + public void GetEnabledEnginesForSiteAsync(string siteId, object userState) { + if ((this.GetEnabledEnginesForSiteOperationCompleted == null)) { + this.GetEnabledEnginesForSiteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnabledEnginesForSiteOperationCompleted); + } + this.InvokeAsync("GetEnabledEnginesForSite", new object[] { + siteId}, this.GetEnabledEnginesForSiteOperationCompleted, userState); + } + + private void OnGetEnabledEnginesForSiteOperationCompleted(object arg) { + if ((this.GetEnabledEnginesForSiteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetEnabledEnginesForSiteCompleted(this, new GetEnabledEnginesForSiteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetEnabledEnginesForSite", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetEnabledEnginesForSite(string siteId, string[] engineNames) { + this.Invoke("SetEnabledEnginesForSite", new object[] { + siteId, + engineNames}); + } + + /// + public System.IAsyncResult BeginSetEnabledEnginesForSite(string siteId, string[] engineNames, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetEnabledEnginesForSite", new object[] { + siteId, + engineNames}, callback, asyncState); + } + + /// + public void EndSetEnabledEnginesForSite(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetEnabledEnginesForSiteAsync(string siteId, string[] engineNames) { + this.SetEnabledEnginesForSiteAsync(siteId, engineNames, null); + } + + /// + public void SetEnabledEnginesForSiteAsync(string siteId, string[] engineNames, object userState) { + if ((this.SetEnabledEnginesForSiteOperationCompleted == null)) { + this.SetEnabledEnginesForSiteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnabledEnginesForSiteOperationCompleted); + } + this.InvokeAsync("SetEnabledEnginesForSite", new object[] { + siteId, + engineNames}, this.SetEnabledEnginesForSiteOperationCompleted, userState); + } + + private void OnSetEnabledEnginesForSiteOperationCompleted(object arg) { + if ((this.SetEnabledEnginesForSiteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetEnabledEnginesForSiteCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetEnginesCompletedEventHandler(object sender, GetEnginesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetEnginesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetEnginesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public HeliconZooEngine[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((HeliconZooEngine[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetEnginesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void IsEnginesEnabledCompletedEventHandler(object sender, IsEnginesEnabledCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class IsEnginesEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal IsEnginesEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SwithEnginesEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetEnabledEnginesForSiteCompletedEventHandler(object sender, GetEnabledEnginesForSiteCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetEnabledEnginesForSiteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetEnabledEnginesForSiteCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetEnabledEnginesForSiteCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj index 44b375f0..4412a312 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj @@ -80,6 +80,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Server.sln b/WebsitePanel/Sources/WebsitePanel.Server.sln index e7e517f5..6e34a22d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.sln +++ b/WebsitePanel/Sources/WebsitePanel.Server.sln @@ -110,6 +110,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.OS.Windows2012", "WebsitePanel.Providers.OS.Windows2012\WebsitePanel.Providers.OS.Windows2012.csproj", "{27130BBB-76FA-411E-8B4D-51CD4DC821AF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Web.HeliconZoo", "WebsitePanel.Providers.Web.HeliconZoo\WebsitePanel.Providers.Web.HeliconZoo.csproj", "{A1FCFF8F-4977-462B-A81A-EE67B56D52A4}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Web.IIs80", "WebsitePanel.Providers.Web.IIs80\WebsitePanel.Providers.Web.IIs80.csproj", "{6E348968-461D-45A1-B235-4F552947B9F1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.FTP.IIs80", "WebsitePanel.Providers.FTP.IIs80\WebsitePanel.Providers.FTP.IIs80.csproj", "{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}" @@ -608,6 +610,16 @@ Global {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.Build.0 = Release|Any CPU {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|x86.ActiveCfg = Release|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Debug|x86.ActiveCfg = Debug|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Release|Any CPU.Build.0 = Release|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {A1FCFF8F-4977-462B-A81A-EE67B56D52A4}.Release|x86.ActiveCfg = Release|Any CPU {6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs index 5ad0f643..c6c4c130 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs @@ -161,18 +161,37 @@ namespace WebsitePanel.Server.Code return true; } + + public bool IsHiddenKeyword(Keyword keyword) + { + if (keyword.Id.StartsWith("ZooEngine", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + + return false; + } #endregion #region Products public List GetProductsToInstall(string FeedLocation, string keywordId) { Keyword keyword = null; + List products = new List(); + if (!string.IsNullOrEmpty(keywordId)) { keyword = _productManager.GetKeyword(keywordId); } - List products = new List(); + // if we do not find keyword object by keyword string + // then return empty list + if (null == keyword && !string.IsNullOrEmpty(keywordId)) + { + WriteLog(string.Format("Keyword '{0}' not found, return empty product list", keywordId)); + return products; + } + foreach (Product product in _productManager.Products) { @@ -490,7 +509,12 @@ namespace WebsitePanel.Server.Code Installer appInstaller = app.GetInstaller(GetLanguage(languageId)); WpiAppInstallLogger logger = new WpiAppInstallLogger(); - + /* + if (null == _installManager) + { + Debugger.Break(); + } + */ if (null != installStatusUpdatedHandler) { @@ -847,6 +871,7 @@ namespace WebsitePanel.Server.Code } } + #endregion private members } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx b/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx new file mode 100644 index 00000000..c0e82789 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="HeliconZoo.asmx.cs" Class="WebsitePanel.Server.HeliconZoo" %> diff --git a/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx.cs new file mode 100644 index 00000000..24dce0d6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server/HeliconZoo.asmx.cs @@ -0,0 +1,105 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Data; +using System.Web; +using System.Collections; +using System.Collections.Generic; +using System.Web.Services; +using System.Web.Services.Protocols; +using System.ComponentModel; +using Microsoft.Web.Services3; + +using WebsitePanel.Providers; +using WebsitePanel.Providers.Web; +using WebsitePanel.Server.Utils; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.WebAppGallery; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HeliconZoo; + + +namespace WebsitePanel.Server +{ + /// + /// Summary description for HeliconZoo + /// + [WebService(Namespace = "http://smbsaas/websitepanel/server/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [Policy("ServerPolicy")] + [ToolboxItem(false)] + public class HeliconZoo : HostingServiceProviderWebService, IHeliconZooServer + { + + private IHeliconZooServer ZooProvider + { + get { return (IHeliconZooServer)Provider; } + } + + + [WebMethod, SoapHeader("settings")] + public HeliconZooEngine[] GetEngines() + { + + return ZooProvider.GetEngines(); + + } + + [WebMethod, SoapHeader("settings")] + public void SetEngines(HeliconZooEngine[] userEngines) + { + ZooProvider.SetEngines(userEngines); + } + + [WebMethod, SoapHeader("settings")] + public bool IsEnginesEnabled() + { + return ZooProvider.IsEnginesEnabled(); + } + + [WebMethod, SoapHeader("settings")] + public void SwithEnginesEnabled(bool enabled) + { + ZooProvider.SwithEnginesEnabled(enabled); + } + + + [WebMethod, SoapHeader("settings")] + public string[] GetEnabledEnginesForSite(string siteId) + { + return ZooProvider.GetEnabledEnginesForSite(siteId); + } + + [WebMethod, SoapHeader("settings")] + public void SetEnabledEnginesForSite(string siteId, string[] engineNames) + { + ZooProvider.SetEnabledEnginesForSite(siteId, engineNames); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj index 72c5835a..54e11a29 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj @@ -85,6 +85,7 @@ + @@ -126,6 +127,10 @@ + + HeliconZoo.asmx + Component + LyncServer.asmx Component diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs index c6398bf5..0c79f416 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs @@ -49,6 +49,7 @@ using System.Management; using System.Collections.Specialized; using Microsoft.Web.PlatformInstaller; using Microsoft.Web.Services3; +using Microsoft.Win32; using WebsitePanel.Providers.Utils; using WebsitePanel.Server.Code; using WebsitePanel.Server.Utils; @@ -301,7 +302,7 @@ namespace WebsitePanel.Server - private string makeHref(string value) + private string Linkify(string value) { if (string.IsNullOrEmpty(value)) return value; @@ -318,7 +319,7 @@ namespace WebsitePanel.Server WPIProduct p = new WPIProduct(); p.ProductId = product.ProductId; p.Summary = product.Summary; - p.LongDescription = makeHref(product.LongDescription); + p.LongDescription = Linkify(product.LongDescription); p.Published = product.Published; p.Author = product.Author; p.AuthorUri = (product.AuthorUri != null) ? product.AuthorUri.ToString() : ""; @@ -355,6 +356,30 @@ namespace WebsitePanel.Server return p; } + private void CheckHostingPackagesUpgrades(IList products) + { + foreach (WPIProduct product in products) + { + string installedHostingPackageVersion = GetInstalledHostingPackageVersion(product.ProductId); + if (!string.IsNullOrEmpty(installedHostingPackageVersion) && string.Compare(product.Version, installedHostingPackageVersion, StringComparison.OrdinalIgnoreCase) > 0) + { + product.IsUpgrade = true; + } + } + } + + private string GetInstalledHostingPackageVersion(string productId) + { + string installedVersion = Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Zoo", productId+"Version", string.Empty) as string; + if (string.IsNullOrEmpty(installedVersion)) + { + installedVersion = Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Helicon\\Zoo", productId + "Version", string.Empty) as string; + } + + return installedVersion; + } + + [WebMethod] public WPIProduct[] GetWPIProducts(string tabId, string keywordId) { @@ -391,6 +416,13 @@ namespace WebsitePanel.Server } } + // check upgrades for Hosting Packages (ZooPackage keyword) + if (WPIKeyword.HOSTING_PACKAGE_KEYWORD == keywordId) + { + CheckHostingPackagesUpgrades(wpiProducts); + } + + } @@ -642,6 +674,7 @@ namespace WebsitePanel.Server wpiServiceExe.StartInfo.WorkingDirectory = workingDirectory; wpiServiceExe.StartInfo.UseShellExecute = false; wpiServiceExe.StartInfo.LoadUserProfile = true; + wpiServiceExe.StartInfo.EnvironmentVariables["MySqlPassword"] = ""; //wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile; //wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData; //wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx index 87c03346..4d4e954b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx @@ -771,4 +771,8 @@ System Hard Quota + + + Helicon Zoo + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 154ff84e..46bf2425 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -3287,6 +3287,9 @@ Office Communications Server + + Web Engines + SharePoint Site Collections per Organization @@ -3299,6 +3302,9 @@ CRM Organization + + Web Engines + Error occurred while delete SharePoint site collection. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx index 8d6cfce8..7ef313a2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx @@ -303,6 +303,9 @@ .htaccess + + Web Engines + Virtual Dirs diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesHeliconZooControl.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesHeliconZooControl.ascx.resx new file mode 100644 index 00000000..da362e19 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesHeliconZooControl.ascx.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Install + + + Select web application engine to set up + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/ES.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/ES.cs index aae6f6d5..d39706a8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/ES.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/ES.cs @@ -213,6 +213,11 @@ namespace WebsitePanel.Portal get { return GetCachedProxy(); } } + + public esHeliconZoo HeliconZoo + { + get { return GetCachedProxy(); } + } protected ES() { } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/PackagesHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/PackagesHelper.cs index 9b15dc35..f56ccbe5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/PackagesHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/PackagesHelper.cs @@ -146,6 +146,10 @@ namespace WebsitePanel.Portal if (!cntx.Groups.ContainsKey(groupName)) return false; + // check wildcard quota name + if (!string.IsNullOrEmpty(groupName) && quotaName.Substring(groupName.Length) == ".*") + return true; + // check quota if (cntx.Quotas.ContainsKey(quotaName)) return !cntx.Quotas[quotaName].QuotaExhausted; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx index 2120e248..1c6b4b43 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx @@ -25,7 +25,7 @@
- <%# GetSharedLocalizedString("Quota." + (string)Eval("QuotaName"))%>: + <%# GetSharedLocalizedStringNotEmpty((string)Eval("QuotaName"), Eval("QuotaDescription"))%>:
0 && result.Substring(result.IndexOf('.')).Length > 1) + { + // drop Quota name prefix + // HeliconZoo.python -> python + + result = result.Substring(result.IndexOf('.')+1); + } + } + + return result; + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx.designer.cs index 65f90d8c..b01a3ef9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostingPlansQuotas.ascx.designer.cs @@ -1,22 +1,43 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.832 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ namespace WebsitePanel.Portal { - /// - /// HostingPlansQuotas class. - /// - /// - /// Auto-generated class. - /// public partial class HostingPlansQuotas { /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Exchange_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Exchange_Settings.ascx.resx index c2df5d53..8ed90f04 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Exchange_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Exchange_Settings.ascx.resx @@ -192,4 +192,10 @@ Database Availability Group: + + e.g. http://server.domain.com/PowerShell + + + Powershell URL: + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/HeliconZoo_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/HeliconZoo_Settings.ascx.resx new file mode 100644 index 00000000..85c90909 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/HeliconZoo_Settings.ascx.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx index 720490cc..fd7a9c79 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IIS60_Settings.ascx.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Automatically allocate "dedicated" IP addresses on space creation @@ -129,7 +129,6 @@ Click to create a filter... - Gallery feed filter: @@ -235,4 +234,7 @@ <All unassigned> + + Web Sites Public Shared Address: + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Organizations_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Organizations_Settings.ascx.resx index 6f6e1735..340ae559 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Organizations_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/Organizations_Settings.ascx.resx @@ -126,4 +126,13 @@ Tempory Domain Name: + + Username Format: + + + Standard + + + Append OrgID + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx index 48636a4d..be0220cb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx @@ -1,6 +1,25 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Exchange_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.Exchange2010_Settings" %> + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.cs index 944b4d94..51a9393b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.cs @@ -91,6 +91,8 @@ namespace WebsitePanel.Portal.ProviderControls txtStorageGroup.Text = ""; locMailboxDAG.Visible = false; + + powershellUrl1.Visible = powershellUrl2.Visible = false; break; case EXCHANGE2010SP2_PROVIDER_ID: @@ -101,6 +103,7 @@ namespace WebsitePanel.Portal.ProviderControls txtStorageGroup.Text = ""; locMailboxDatabase.Visible = false; + powershellUrl1.Visible = powershellUrl2.Visible = false; break; case EXCHANGE2013_PROVIDER_ID: @@ -111,6 +114,7 @@ namespace WebsitePanel.Portal.ProviderControls txtStorageGroup.Text = ""; locMailboxDatabase.Visible = false; + powershellUrl1.Visible = powershellUrl2.Visible = true; break; default: @@ -147,6 +151,7 @@ namespace WebsitePanel.Portal.ProviderControls txtActiveSyncServer.Text = settings["ActiveSyncServer"]; txtOABServer.Text = settings["OABServer"]; txtPublicFolderServer.Text = settings["PublicFolderServer"]; + txtPowerShellUrl.Text = settings["PowerShellUrl"]; UpdateHubTransportsGrid(); UpdateClientAccessGrid(); @@ -173,6 +178,7 @@ namespace WebsitePanel.Portal.ProviderControls settings["PublicFolderServer"] = txtPublicFolderServer.Text; settings["StorageGroup"] = txtStorageGroup.Text; + settings["PowerShellUrl"] = txtPowerShellUrl.Text; } public void BindExchangeServices(DropDownList ddl, bool isHubservice) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.designer.cs index 771c7fb0..bc155a48 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Exchange_Settings.ascx.designer.cs @@ -1,3 +1,31 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -12,6 +40,51 @@ namespace WebsitePanel.Portal.ProviderControls { public partial class Exchange2010_Settings { + /// + /// powershellUrl1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow powershellUrl1; + + /// + /// lblFileServiceInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblFileServiceInfo; + + /// + /// powershellUrl2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow powershellUrl2; + + /// + /// loclocPowerShellUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize loclocPowerShellUrl; + + /// + /// txtPowerShellUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPowerShellUrl; + /// /// storageGroup control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx new file mode 100644 index 00000000..273c6ad2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx @@ -0,0 +1,399 @@ +<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="HeliconZoo_Settings.ascx.cs" Inherits="HeliconZoo_Settings" %> +<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %> +<%@ Import Namespace="WebsitePanel.Portal.ProviderControls" %> +<%@ Import Namespace="WebsitePanel.Server" %> + + + +
+ + Hosting Packages + + + + + + + + + + + +

<%# Eval("Title")%>

+

<%# Eval("Summary") %>

+
+
+ + + + + + + + + +
+
+ + +
+ +
+
+ + +

Unable to load Hosting Package list with exception:

+ +
+ +
+ + +
+ + Helicon Zoo engine quotas settings + +
+ +
+
+ + +
+ + Engines management + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Name + + + +

Id for the engine

+
+ Friendly name + + + +

Frendly engine name

+
+ Full path to executable + + + +

Path to a worker executable file

+
+ Executable`s arguments + + +

Set of arguments to be passed to a worker on a call, can include special environment variables

+
+ Transport + + +
+ Protocol + + +
+ Lower port + + + +

Specifies lower automatic port range bound for TCP transport, default = 49152

+
+ Upper port + + + +

Specifies upper automatic port range bound for TCP transport, default = 65535

+
+ Minimum instances + + + +

Minimum number of worker instances

+
+ Maximum instances + + + +

Maximum number of instances of worker processes to start under high load. Default value of 0 means start as many instances as there are cores.

+
+ Time limit + + + +

Restart the worker after it has worked for specific amount of time (minutes), default = 0 (infinite)

+
+ Graceful Shutdown Timeout + + + +

XXXXXXXXXXXXXXXXXXX

+
+ Memory limit + + + +

Restart the worker if it has consumed specific amount of memory (megabytes), default = 0 (unlimited)

+
+ Environment variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
+
+
+
+
+ +
+ +
+ +   + +
+
+ + + + + + <%# Eval("displayName")%> + + + + + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.cs new file mode 100644 index 00000000..dcafbfe1 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.cs @@ -0,0 +1,426 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Globalization; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.Portal; +using WebsitePanel.Providers.HeliconZoo; +using WebsitePanel.Server; + + +public partial class HeliconZoo_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings +{ + private class EnvBoxPair + { + + public TextBox Name; + public TextBox Value; + public EnvBoxPair(TextBox name, TextBox value) + { + Name = name; + Value = value; + } + } + + private EnvBoxPair[] _envBoxsPair; + + protected void Page_Load(object sender, EventArgs e) + { + + _envBoxsPair = new EnvBoxPair[] + { + new EnvBoxPair(EnvKey1, EnvValue1), + new EnvBoxPair(EnvKey2, EnvValue2), + new EnvBoxPair(EnvKey3, EnvValue3), + new EnvBoxPair(EnvKey4, EnvValue4), + new EnvBoxPair(EnvKey5, EnvValue5), + new EnvBoxPair(EnvKey6, EnvValue6), + new EnvBoxPair(EnvKey7, EnvValue7), + new EnvBoxPair(EnvKey8, EnvValue8), + }; + + if (!IsPostBack) + { + BindHostingPackages(); + + EngineTransport.Items.Clear(); + EngineTransport.Items.AddRange( + new ListItem[] + { + new ListItem("Named pipe", "namedpipe"), + new ListItem("TCP", "tcp"), + } + ); + EngineProtocol.Items.Clear(); + EngineProtocol.Items.AddRange( + new ListItem[] + { + new ListItem("FastCGI", "fastcgi"), + new ListItem("HTTP", "http"), + } + ); + + BindEngines(); + } + } + + private void BindHostingPackages() + { + // TODO: try...catch? + WPIProduct[] products = null; + try + { + products = GetHostingPackages(); + } + catch(Exception e) + { + HostingPackagesGrid.Visible = false; + HostingPackagesInstallButtonsPanel.Visible = false; + HostingPackagesErrorsPanel.Visible = true; + if (e.InnerException != null) + { + e = e.InnerException; + } + HostingPackagesLoadingError.Text = e.Message; + } + HostingPackagesGrid.DataSource = products; + HostingPackagesGrid.DataBind(); + } + + + private void BindEngines() + { + // get all engines from IIS + HeliconZooEngine[] engineList = ES.Services.HeliconZoo.GetEngines(PanelRequest.ServiceId); + + if (null != engineList && engineList.Length > 0) + { + // convert list to dict + Dictionary enginesDict = new Dictionary(); + foreach (HeliconZooEngine engine in engineList) + { + enginesDict[engine.name] = engine; + } + + // save engines in view state + ViewState["HeliconZooEngines"] = enginesDict; + + // bind to grid + EngineGrid.DataSource = engineList; + EngineGrid.DataBind(); + + // bind 'Enable quotas' checkbox + bool enabled = ES.Services.HeliconZoo.IsEnginesEnabled(PanelRequest.ServiceId); + QuotasEnabled.Checked = !enabled; + } + else + { + EnginesPanel.Visible = false; + } + } + + private void RebindEngines() + { + Dictionary engines = GetEngines(); + EngineGrid.DataSource = engines.Values; + EngineGrid.DataBind(); + } + + public void BindSettings(StringDictionary settings) + { + } + + public void SaveSettings(StringDictionary settings) + { + // save engines + ES.Services.HeliconZoo.SetEngines(PanelRequest.ServiceId, new List(GetEngines().Values).ToArray()); + + // save switcher + ES.Services.HeliconZoo.SwithEnginesEnabled(PanelRequest.ServiceId, !QuotasEnabled.Checked); + } + + protected void ClearEngineForm() + { + EngineName.Text = string.Empty; + EngineFriendlyName.Text = string.Empty; + EngineFullPath.Text = string.Empty; + EngineArguments.Text = string.Empty; + EngineProtocol.SelectedIndex = 0; + EngineTransport.SelectedIndex = 0; + + foreach (EnvBoxPair envBoxPair in _envBoxsPair) + { + envBoxPair.Name.Text = string.Empty; + envBoxPair.Value.Text = string.Empty; + } + } + + protected void ShowEngineForm() + { + EngineForm.Visible = true; + EngineFormButtons.Visible = true; + } + + protected void HideEngineForm() + { + EngineForm.Visible = false; + EngineFormButtons.Visible = false; + } + + protected void ButtonAddEngine_Click(object sender, EventArgs e) + { + ClearEngineForm(); + ShowEngineForm(); + } + + protected void ButtonSaveEngine_Click(object sender, EventArgs e) + { + HeliconZooEngine engine = EngineFromForm(); + HeliconZooEngine savedEngine = FindEngineByName(engine.name); + Dictionary engines = GetEngines(); + + // new user engine or update existing + engines[engine.name] = engine; + + ClearEngineForm(); + HideEngineForm(); + + // rebind grid + RebindEngines(); + } + + public static long ParseLong(string s, long deflt) + { + long result; + if (!long.TryParse(s, out result)) + { + result = deflt; + } + + return result; + } + + private HeliconZooEngine EngineFromForm() + { + HeliconZooEngine engine = new HeliconZooEngine() + { + name = EngineName.Text.Trim(), + displayName = EngineFriendlyName.Text.Trim(), + arguments = EngineArguments.Text.Trim(), + fullPath = EngineFullPath.Text.Trim(), + transport = EngineTransport.SelectedValue, + protocol = EngineProtocol.SelectedValue, + portLower = ParseLong(EnginePortLower.Text, -1), + portUpper = ParseLong(EnginePortUpper.Text, -1), + minInstances = ParseLong(EngineMinInstances.Text, -1), + maxInstances = ParseLong(EngineMaxInstances.Text, -1), + timeLimit = ParseLong(EngineTimeLimit.Text, -1), + gracefulShutdownTimeout = ParseLong(EngineGracefulShutdownTimeout.Text, -1), + memoryLimit = ParseLong(EngineMemoryLimit.Text, -1), + isUserEngine = true + }; + + // envs + List tempEnvList = new List(); + for (int i = 0; i < _envBoxsPair.Length; i++) + { + EnvBoxPair pair = _envBoxsPair[i]; + if (!string.IsNullOrEmpty(pair.Name.Text.Trim()) && !string.IsNullOrEmpty(pair.Value.Text.Trim())) + { + tempEnvList.Add(new HeliconZooEnv(){Name = pair.Name.Text.Trim(), Value = pair.Value.Text.Trim()}); + } + } + + engine.environmentVariables = tempEnvList.ToArray(); + + return engine; + } + + protected void ButtonCancelEngineForm_Click(object sender, EventArgs e) + { + ClearEngineForm(); + HideEngineForm(); + } + + protected void EngineGrid_OnRowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "EngineEdit") + { + HeliconZooEngine engine = FindEngineByName((string)e.CommandArgument); + if (null != engine) + { + BindEngineForm(engine); + ShowEngineForm(); + } + } + if (e.CommandName == "EngineDisable") + { + HeliconZooEngine engine = FindEngineByName((string)e.CommandArgument); + if (null != engine) + { + engine.disabled = !engine.disabled; + RebindEngines(); + } + } + if (e.CommandName == "EngineDelete") + { + HeliconZooEngine engine = FindEngineByName((string)e.CommandArgument); + if (null != engine) + { + Dictionary engines = GetEngines(); + engines.Remove(engine.name); + RebindEngines(); + } + } + } + + public static string ToStringClearDeafult(long l) + { + if (-1 == l) + { + return string.Empty; + } + + return l.ToString(CultureInfo.InvariantCulture); + } + + private void BindEngineForm(HeliconZooEngine engine) + { + EngineName.Text = engine.name; + EngineFriendlyName.Text = engine.displayName; + EngineFullPath.Text = engine.fullPath; + EngineArguments.Text = engine.arguments; + EngineTransport.Text = engine.transport.ToLower(); + EngineProtocol.Text = engine.protocol.ToLower(); + EnginePortLower.Text = ToStringClearDeafult(engine.portLower); + EnginePortUpper.Text = ToStringClearDeafult(engine.portUpper); + EngineMinInstances.Text = ToStringClearDeafult(engine.minInstances); + EngineMaxInstances.Text = ToStringClearDeafult(engine.maxInstances); + EngineTimeLimit.Text = ToStringClearDeafult(engine.timeLimit); + EngineGracefulShutdownTimeout.Text = ToStringClearDeafult(engine.gracefulShutdownTimeout); + EngineMemoryLimit.Text = ToStringClearDeafult(engine.memoryLimit); + + + for (int i = 0; i < engine.environmentVariables.Length && i < _envBoxsPair.Length; i++) + { + HeliconZooEnv env = engine.environmentVariables[i]; + _envBoxsPair[i].Name.Text = env.Name; + _envBoxsPair[i].Value.Text = env.Value; + } + + } + + private Dictionary GetEngines() + { + return ViewState["HeliconZooEngines"] as Dictionary; + } + + private HeliconZooEngine FindEngineByName(string engineName) + { + Dictionary engines = GetEngines(); + if (null != engines) + { + if (engines.ContainsKey(engineName)) + { + return engines[engineName]; + } + } + + return null; + } + + protected void HostingPackagesGrid_OnRowCommand(object sender, GridViewCommandEventArgs e) + { + ArrayList wpiProductsForInstall = GetProductsToInstallList(); + + int productIndex = int.Parse((string)e.CommandArgument); + WPIProduct wpiProduct = GetHostingPackages()[productIndex]; + + if (null != wpiProduct) + { + if (e.CommandName == "WpiAdd") + { + wpiProductsForInstall = GetProductsToInstallList(); + wpiProductsForInstall.Add(wpiProduct.ProductId); + SetProductsToInstallList(wpiProductsForInstall); + + ((Button)e.CommandSource).Text = AddUpgradeRemoveText(wpiProduct); ; + ((Button)e.CommandSource).CommandName = "WpiRemove"; + } + + if (e.CommandName == "WpiRemove") + { + wpiProductsForInstall = GetProductsToInstallList(); + wpiProductsForInstall.Remove(wpiProduct.ProductId); + SetProductsToInstallList(wpiProductsForInstall); + + ((Button)e.CommandSource).Text = AddUpgradeRemoveText(wpiProduct); + ((Button)e.CommandSource).CommandName = "WpiAdd"; + } + + btnInstall.Enabled = wpiProductsForInstall.Count > 0; + } + } + + private ArrayList GetProductsToInstallList() + { + if (ViewState["wpiProductsForInstall"] != null) + { + return (ArrayList)ViewState["wpiProductsForInstall"]; + } + return new ArrayList(); + } + + private void SetProductsToInstallList(ArrayList wpiProductsForInstall) + { + ViewState["wpiProductsForInstall"] = wpiProductsForInstall; + } + + private WPIProduct[] GetHostingPackages() + { + if (ViewState["HeliconZooHostingPackages"] == null) + { + ViewState["HeliconZooHostingPackages"] = RequestHostingPackages(); + } + + return (WPIProduct[])ViewState["HeliconZooHostingPackages"]; + } + + private static WPIProduct[] RequestHostingPackages() + { + return ES.Services.Servers.GetWPIProducts(PanelRequest.ServerId, null, "ZooPackage"); + } + + protected string AddUpgradeRemoveText(WPIProduct wpiProduct) + { + if (GetProductsToInstallList().Contains(wpiProduct.ProductId)) + { + return "- cancel"; + } + else + { + return wpiProduct.IsUpgrade ? "+ upgrade" : "+ add"; + } + } + + protected void btnInstall_Click(object sender, EventArgs e) + { + ArrayList wpiProductsForInstall = GetProductsToInstallList(); + + List qsParts = new List(); + + qsParts.Add("pid=Servers"); + qsParts.Add("ctl=edit_platforminstaller"); + qsParts.Add("mid=" + Request.QueryString["mid"]); + qsParts.Add("ServerID=" + Request.QueryString["ServerID"]); + qsParts.Add("WPIProduct=" + string.Join(",", wpiProductsForInstall.ToArray())); + qsParts.Add("ReturnUrl=" + Server.UrlEncode(Request.RawUrl)); + + string installUrl = "Default.aspx?" + String.Join("&", qsParts.ToArray()); + + Response.Redirect(installUrl); + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.designer.cs new file mode 100644 index 00000000..d2b3dbb0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HeliconZoo_Settings.ascx.designer.cs @@ -0,0 +1,419 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + + +public partial class HeliconZoo_Settings { + + /// + /// HostingPackagesGrid control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView HostingPackagesGrid; + + /// + /// HostingPackagesInstallButtonsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel HostingPackagesInstallButtonsPanel; + + /// + /// btnInstall control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnInstall; + + /// + /// HostingPackagesErrorsPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel HostingPackagesErrorsPanel; + + /// + /// HostingPackagesLoadingError control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label HostingPackagesLoadingError; + + /// + /// QuotasEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox QuotasEnabled; + + /// + /// EnginesPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel EnginesPanel; + + /// + /// ButtonAddEngine control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button ButtonAddEngine; + + /// + /// EngineForm control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.UpdatePanel EngineForm; + + /// + /// EngineName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineName; + + /// + /// EngineFriendlyName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineFriendlyName; + + /// + /// EngineFullPath control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineFullPath; + + /// + /// EngineArguments control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineArguments; + + /// + /// EngineTransport control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList EngineTransport; + + /// + /// EngineProtocol control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList EngineProtocol; + + /// + /// EnginePortLower control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnginePortLower; + + /// + /// EnginePortUpper control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnginePortUpper; + + /// + /// EngineMinInstances control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineMinInstances; + + /// + /// EngineMaxInstances control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineMaxInstances; + + /// + /// EngineTimeLimit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineTimeLimit; + + /// + /// EngineGracefulShutdownTimeout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineGracefulShutdownTimeout; + + /// + /// EngineMemoryLimit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EngineMemoryLimit; + + /// + /// EnvKey1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey1; + + /// + /// EnvValue1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue1; + + /// + /// EnvKey2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey2; + + /// + /// EnvValue2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue2; + + /// + /// EnvKey3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey3; + + /// + /// EnvValue3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue3; + + /// + /// EnvKey4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey4; + + /// + /// EnvValue4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue4; + + /// + /// EnvKey5 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey5; + + /// + /// EnvValue5 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue5; + + /// + /// EnvKey6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey6; + + /// + /// EnvValue6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue6; + + /// + /// EnvKey7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey7; + + /// + /// EnvValue7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue7; + + /// + /// EnvKey8 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvKey8; + + /// + /// EnvValue8 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox EnvValue8; + + /// + /// EngineFormButtons control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel EngineFormButtons; + + /// + /// ButtonSaveEngine control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button ButtonSaveEngine; + + /// + /// ButtonCancelEngineForm control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button ButtonCancelEngineForm; + + /// + /// EngineGrid control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView EngineGrid; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx index a914ecae..adf3f630 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx @@ -20,6 +20,14 @@
+ + + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs index dcaa7c46..5aad9691 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.cs @@ -102,6 +102,7 @@ namespace WebsitePanel.Portal.ProviderControls { ipAddress.AddressId = (settings["SharedIP"] != null) ? Utils.ParseInt(settings["SharedIP"], 0) : 0; ipAddress.SelectValueText = GetLocalizedString("ipAddress.SelectValueText"); + txtPublicSharedIP.Text = settings["PublicSharedIP"]; txtWebGroupName.Text = settings["WebGroupName"]; chkAssignIPAutomatically.Checked = Utils.ParseBool(settings["AutoAssignDedicatedIP"], true); @@ -140,6 +141,7 @@ namespace WebsitePanel.Portal.ProviderControls public void SaveSettings(StringDictionary settings) { settings["SharedIP"] = ipAddress.AddressId.ToString(); + settings["PublicSharedIP"] = txtPublicSharedIP.Text.Trim(); settings["WebGroupName"] = txtWebGroupName.Text.Trim(); settings["AutoAssignDedicatedIP"] = chkAssignIPAutomatically.Checked.ToString(); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs index 84883d46..ebb3486f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS60_Settings.ascx.designer.cs @@ -1,31 +1,3 @@ -// Copyright (c) 2012, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -67,6 +39,24 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::WebsitePanel.Portal.SelectIPAddress ipAddress; + /// + /// lblPublicSharedIP control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblPublicSharedIP; + + /// + /// txtPublicSharedIP control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtPublicSharedIP; + /// /// lblGroupName control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx index fbbf9ffd..3905c282 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx @@ -23,4 +23,13 @@
+ + + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.cs index a3596f40..e7fb8f87 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.cs @@ -35,6 +35,7 @@ namespace WebsitePanel.Portal.ProviderControls public const string RootOU = "RootOU"; public const string PrimaryDomainController = "PrimaryDomainController"; public const string TemporyDomainName = "TempDomain"; + public const string UserNameFormat = "UserNameFormat"; protected void Page_Load(object sender, EventArgs e) { @@ -46,6 +47,12 @@ namespace WebsitePanel.Portal.ProviderControls txtPrimaryDomainController.Text = settings[PrimaryDomainController]; txtRootOU.Text = settings[RootOU]; txtTemporyDomainName.Text = settings[TemporyDomainName]; + + if (settings.ContainsKey(UserNameFormat)) + { + UserNameFormatDropDown.SelectedValue = + UserNameFormatDropDown.Items.FindByText(settings[UserNameFormat]).Value; + } } public void SaveSettings(System.Collections.Specialized.StringDictionary settings) @@ -53,6 +60,7 @@ namespace WebsitePanel.Portal.ProviderControls settings[RootOU] = txtRootOU.Text.Trim(); settings[PrimaryDomainController] = txtPrimaryDomainController.Text.Trim(); settings[TemporyDomainName] = txtTemporyDomainName.Text.Trim(); + settings[UserNameFormat] = UserNameFormatDropDown.SelectedItem.Text; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.designer.cs index 5faeea8c..2cbecd62 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/Organizations_Settings.ascx.designer.cs @@ -1,22 +1,15 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1378 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ namespace WebsitePanel.Portal.ProviderControls { - /// - /// Organizations_Settings class. - /// - /// - /// Auto-generated class. - /// public partial class Organizations_Settings { /// @@ -81,5 +74,23 @@ namespace WebsitePanel.Portal.ProviderControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtTemporyDomainName; + + /// + /// UserNameFormatLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label UserNameFormatLabel; + + /// + /// UserNameFormatDropDown control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList UserNameFormatDropDown; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs index 3987a1b5..ede2fe60 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditWebPlatformInstaller.ascx.cs @@ -108,11 +108,11 @@ namespace WebsitePanel.Portal ShowProgressPanel(); } - string gotoProduct = Request.QueryString["WPIProduct"]; - if (!string.IsNullOrEmpty(gotoProduct)) + string gotoProducts = Request.QueryString["WPIProduct"]; + if (!string.IsNullOrEmpty(gotoProducts)) { ArrayList wpiProductsForInstall = GetProductsToInstallList(); - wpiProductsForInstall.Add(gotoProduct); + wpiProductsForInstall.AddRange(gotoProducts.Split(',')); SetProductsToInstallList(wpiProductsForInstall); btnInstall_Click(sender, e); @@ -440,6 +440,13 @@ namespace WebsitePanel.Portal } ShowLogButton(); + + // fix btnBackToServer button text + if (null != Request["returnurl"]) + { + btnBackToServer.Text = "Ok"; + BackToGalleryButton.Visible = false; + } } private void ShowLogButton() @@ -523,9 +530,45 @@ namespace WebsitePanel.Portal } } + private bool IsLocalUrl(string url) + { + if (string.IsNullOrEmpty(url)) + { + return false; + } + + Uri absoluteUri; + if (Uri.TryCreate(url, UriKind.Absolute, out absoluteUri)) + { + return String.Equals(this.Request.Url.Host, absoluteUri.Host, StringComparison.OrdinalIgnoreCase); + } + else + { + bool isLocal = !url.StartsWith("http:", StringComparison.OrdinalIgnoreCase) + && !url.StartsWith("https:", StringComparison.OrdinalIgnoreCase) + && Uri.IsWellFormedUriString(url, UriKind.Relative); + return isLocal; + } + } + protected void btnCancel_Click(object sender, EventArgs e) { - Response.Redirect(EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_server")); + string redirectUrl = ""; + if (Request["returnurl"] != null) + { + redirectUrl = HttpUtility.UrlDecode(Request["returnurl"]); + if (!IsLocalUrl(redirectUrl)) + { + redirectUrl = ""; + } + } + + if (string.IsNullOrEmpty(redirectUrl)) + { + redirectUrl = EditUrl("ServerID", PanelRequest.ServerId.ToString(), "edit_server"); + } + + Response.Redirect(redirectUrl); } protected void SearchButton_Click(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryInstall.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryInstall.ascx.cs index caa57525..fdd8e555 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryInstall.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryInstall.ascx.cs @@ -27,7 +27,8 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; -using WebsitePanel.Providers.WebAppGallery; +using System.Web; +using WebsitePanel.Providers.WebAppGallery; using WebsitePanel.Providers.ResultObjects; namespace WebsitePanel.Portal @@ -121,14 +122,38 @@ namespace WebsitePanel.Portal if (isSuccess) { - Response.Redirect(EditUrl("ApplicationID", PanelRequest.ApplicationID, "editParams", - "SpaceID=" + PanelSecurity.PackageId)); + // web app downloaded successfully + string url = EditUrl("ApplicationID", PanelRequest.ApplicationID, "editParams", + "SpaceID=" + PanelSecurity.PackageId); + + string targetSite = HttpContext.Current.Request["SiteId"]; + if (!string.IsNullOrEmpty(targetSite)) + { + url += "&SiteId=" + targetSite; + } + string returnUrl = HttpContext.Current.Request["ReturnUrl"]; + if (!string.IsNullOrEmpty(returnUrl)) + { + url += "&ReturnUrl=" + Server.UrlEncode(returnUrl); + } + + Response.Redirect(url); } } protected void btnCancel_Click(object sender, EventArgs e) { - RedirectSpaceHomePage(); + string returnUrl = HttpContext.Current.Request["ReturnUrl"]; + if (!string.IsNullOrEmpty(returnUrl)) + { + string redirectUrl = HttpUtility.UrlDecode(returnUrl); + Response.Redirect(redirectUrl); + + } + else + { + RedirectSpaceHomePage(); + } } protected void chIgnoreDependencies_CheckedChanged(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs index 0222ec36..72976f80 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebApplicationGalleryParams.ascx.cs @@ -30,7 +30,8 @@ using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Web.UI.WebControls; +using System.Web; +using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.WebAppGallery; @@ -129,6 +130,24 @@ namespace WebsitePanel.Portal ddlWebSite.DataBind(); ddlWebSite.Items.Insert(0, new ListItem(GetLocalizedString("Text.SelectWebSite"), "")); + // select site from query string parameter + string targetSite = HttpContext.Current.Request["SiteId"]; + if (!string.IsNullOrEmpty(targetSite)) + { + foreach (ListItem item in ddlWebSite.Items) + { + if (item.Text == targetSite) + { + item.Selected = true; + ddlWebSite.Enabled = false; + locWebSiteDescription.Visible = false; + break; + } + } + + ddlWebSite.SelectedValue = targetSite; + } + // apply policy to virtual dirs directoryName.SetPackagePolicy(PanelSecurity.PackageId, UserSettings.WEB_POLICY, "VirtDirNamePolicy"); } @@ -612,12 +631,32 @@ namespace WebsitePanel.Portal protected void btnCancel_Click(object sender, EventArgs e) { - RedirectSpaceHomePage(); + string returnUrl = HttpContext.Current.Request["ReturnUrl"]; + if (!string.IsNullOrEmpty(returnUrl)) + { + string redirectUrl = HttpUtility.UrlDecode(returnUrl); + Response.Redirect(redirectUrl); + + } + else + { + RedirectSpaceHomePage(); + } } protected void btnOK_Click(object sender, EventArgs e) { - RedirectSpaceHomePage(); + string returnUrl = HttpContext.Current.Request["ReturnUrl"]; + if (!string.IsNullOrEmpty(returnUrl)) + { + string redirectUrl = HttpUtility.UrlDecode(returnUrl); + Response.Redirect(redirectUrl); + + } + else + { + RedirectSpaceHomePage(); + } } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx index 0ae495ee..6f6e8bee 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx @@ -8,6 +8,7 @@ <%@ Register Src="WebSitesCustomHeadersControl.ascx" TagName="WebSitesCustomHeadersControl" TagPrefix="uc6" %> <%@ Register Src="WebSitesSecuredFoldersControl.ascx" TagName="WebSitesSecuredFoldersControl" TagPrefix="wsp" %> <%@ Register Src="WebSitesHeliconApeControl.ascx" TagName="WebSitesHeliconApeControl" TagPrefix="wsp" %> +<%@ Register Src="WebSitesHeliconZooControl.ascx" TagName="WebSitesHeliconZooControl" TagPrefix="wsp" %> <%@ Register Src="UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %> <%@ Register Src="UserControls/UsernameControl.ascx" TagName="UsernameControl" TagPrefix="wsp" %> <%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> @@ -241,6 +242,9 @@ + + + @@ -510,4 +514,4 @@ CssClass="Button1" CausesValidation="false" OnClientClick="return confirm('Delete this web site?');" OnClick="btnDelete_Click" /> -
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs index 162d35ce..41f60173 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs @@ -60,6 +60,7 @@ namespace WebsitePanel.Portal new Tab { Id = "htaccessfolders", ResourceKey = "Tab.Htaccess", Quota = Quotas.WEB_HTACCESS, ViewId = "tabHeliconApe" }, new Tab { Id = "frontpage", ResourceKey = "Tab.FrontPage", Quota = Quotas.WEB_FRONTPAGE, ViewId = "tabFrontPage" }, new Tab { Id = "extensions", ResourceKey = "Tab.Extensions", ViewId = "tabExtensions" }, + new Tab { Id = "HeliconZoo", ResourceKey = "Tab.HeliconZoo", Quota = Quotas.HELICON_ZOO, ResourceGroup = "HeliconZoo", ViewId = "tabHeliconZoo" }, new Tab { Id = "errors", ResourceKey = "Tab.CustomErrors", Quota = Quotas.WEB_ERRORS, ViewId = "tabErrors" }, new Tab { Id = "headers", ResourceKey = "Tab.CustomHeaders", Quota = Quotas.WEB_HEADERS, ViewId = "tabHeaders" }, new Tab { Id = "webpub", ResourceKey = "Tab.WebDeployPublishing", Quota = Quotas.WEB_REMOTEMANAGEMENT, ViewId = "tabWebDeployPublishing" }, @@ -106,7 +107,6 @@ namespace WebsitePanel.Portal private void BindTabs() { - // var filteredTabs = TabsList.FilterTabsByHostingPlanQuotas(PackageId).ToList(); // remove "SSL" tab for a site with dynamic IP @@ -114,6 +114,7 @@ namespace WebsitePanel.Portal if (!IsDedicatedIP && sslTab != null) filteredTabs.Remove(sslTab); + var selectedValue = dlTabs.SelectedValue; if (dlTabs.SelectedIndex == -1) @@ -272,6 +273,7 @@ namespace WebsitePanel.Portal webSitesMimeTypesControl.BindWebItem(site); webSitesCustomHeadersControl.BindWebItem(site); webSitesCustomErrorsControl.BindWebItem(site); + webSitesHeliconZooControl.BindWebItem(site); if (site.IsDedicatedIP) { @@ -889,6 +891,7 @@ namespace WebsitePanel.Portal webSitesMimeTypesControl.SaveWebItem(site); webSitesCustomHeadersControl.SaveWebItem(site); webSitesCustomErrorsControl.SaveWebItem(site); + webSitesHeliconZooControl.SaveWebItem(site); // update web site try diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.designer.cs index fe3cda42..710488b3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.designer.cs @@ -490,6 +490,24 @@ namespace WebsitePanel.Portal { ///
protected global::WebsitePanel.Portal.WebSitesHeliconApeControl webSitesHeliconApeControl; + /// + /// tabHeliconZoo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.View tabHeliconZoo; + + /// + /// webSitesHeliconZooControl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.WebSitesHeliconZooControl webSitesHeliconZooControl; + /// /// tabFrontPage control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx new file mode 100644 index 00000000..4757bbcb --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx @@ -0,0 +1,79 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebSitesHeliconZooControl.ascx.cs" Inherits="WebsitePanel.Portal.WebSitesHeliconZooControl" %> +<%@ Import Namespace="WebsitePanel.Portal" %> + +<%-- +

Web engines allowed for this site:

+ + + +
+ <%# Eval("DisplayName") %> +
+
+
+
+
+ +

Web engines enabled for this site:

+ + + +
+ <%# Container.DataItem.ToString() %> +
+
+
+
+
+ +

+ +

+
+ + + + + + +
+ <%-- + --%> + + + <%-- --%> +
+
+
+ + +
+ <%-- + --%> + <%# Eval("Title")%> + <%-- --%> +
+
+ <%# Eval("Summary") %> +
+
+
+ + + + + + +
+
+ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.cs new file mode 100644 index 00000000..e12d06f5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.Providers.HeliconZoo; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Web; +using WebsitePanel.Providers.WebAppGallery; + +namespace WebsitePanel.Portal +{ + public class ShortHeliconZooEngineComparer:IComparer + { + public int Compare(ShortHeliconZooEngine x, ShortHeliconZooEngine y) + { + return string.Compare(x.DisplayName, y.DisplayName, StringComparison.OrdinalIgnoreCase); + } + } + + public partial class WebSitesHeliconZooControl : WebsitePanelControlBase + { + protected void Page_Load(object sender, EventArgs e) + { + } + + public void BindWebItem(WebSite site) + { + ViewState["WebSiteId"] = site.SiteId; + ViewState["WebSitePackageId"] = site.PackageId; + + BindEngines(site); + BindApplications(); + } + + private void BindEngines(WebSite site) + { + // get allowed engines for current hosting plan + ShortHeliconZooEngine[] allowedEngineArray = + ES.Services.HeliconZoo.GetAllowedHeliconZooQuotasForPackage(site.PackageId); + Array.Sort(allowedEngineArray, new ShortHeliconZooEngineComparer()); + + // get enabled engines for this site + string[] enabledEngineNames = ES.Services.HeliconZoo.GetEnabledEnginesForSite(site.SiteId, site.PackageId); + ViewState["EnabledEnginesNames"] = enabledEngineNames; + + //EnabledEnginesList.DataSource = enabledEngineNames; + //EnabledEnginesList.DataBind(); + + + List allowedEngines = new List(allowedEngineArray); + + foreach (ShortHeliconZooEngine engine in allowedEngines) + { + engine.Name = engine.Name.Replace("HeliconZoo.", ""); + engine.Enabled = enabledEngineNames.Contains(engine.Name, StringComparer.OrdinalIgnoreCase); + } + + ViewState["AllowedEngines"] = allowedEngines; + + //AllowedEnginesList.DataSource = allowedEngines; + //AllowedEnginesList.DataBind(); + } + + private void BindApplications() + { + WebAppGalleryHelpers helper = new WebAppGalleryHelpers(); + GalleryApplicationsResult result = helper.GetGalleryApplications("ZooTemplate", PanelSecurity.PackageId); + + List applications = result.Value as List; + List filteredApplications = new List(); + + List allowedEngines = (List)ViewState["AllowedEngines"]; + if (null != allowedEngines) + { + foreach (GalleryApplication application in applications) + { + foreach (string keyword in application.Keywords) + { + if (keyword.StartsWith("ZooEngine", StringComparison.OrdinalIgnoreCase)) + { + string appEngine = keyword.Substring("ZooEngine".Length); + foreach (ShortHeliconZooEngine engine in allowedEngines) + { + if (string.Equals(appEngine, engine.KeywordedName, StringComparison.OrdinalIgnoreCase)) + { + filteredApplications.Add(application); + break; + } + } + } + } + } + } + else + { + filteredApplications.AddRange(applications); + } + + + gvApplications.DataSource = filteredApplications; + gvApplications.DataBind(); + } + + public void SaveWebItem(WebSite site) + { + UpdatedAllowedEngines(); + } + + protected void gvApplications_RowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "Install") + { + UpdatedAllowedEngines(); + Response.Redirect(GetWebAppInstallUrl(e.CommandArgument.ToString())); + } + } + + private void UpdatedAllowedEngines() + { + List allowedEngines = (List)ViewState["AllowedEngines"]; + string[] enabledEngineNames = (string[])ViewState["EnabledEnginesNames"]; + + // check that all allowed engines are enabled + bool allAllowedAreEnabled = true; + + if (allowedEngines.Count != enabledEngineNames.Length) + { + allAllowedAreEnabled = false; + } + else + { + foreach (ShortHeliconZooEngine allowedEngine in allowedEngines) + { + if (!enabledEngineNames.Contains(allowedEngine.Name, StringComparer.OrdinalIgnoreCase)) + { + allAllowedAreEnabled = false; + } + } + } + + if (!allAllowedAreEnabled) + { + List updateEnabledEngineNames = new List(); + + // by default allow for site all engines allowed by hosting plan + foreach (ShortHeliconZooEngine heliconZooEngine in allowedEngines) + { + updateEnabledEngineNames.Add(heliconZooEngine.Name); + } + + string siteId = ViewState["WebSiteId"] as string; + int packageId = (int) ViewState["WebSitePackageId"]; + + ES.Services.HeliconZoo.SetEnabledEnginesForSite(siteId, packageId, updateEnabledEngineNames.ToArray()); + } + + } + + protected void gvApplications_PageIndexChanging(object sender, GridViewPageEventArgs e) + { + gvApplications.PageIndex = e.NewPageIndex; + // categorized app list + BindApplications(); + } + + protected string GetIconUrlOrDefault(string url) + { + if (string.IsNullOrEmpty(url)) + { + return "/App_Themes/Default/icons/sphere_128.png"; + } + + return "~/DesktopModules/WebsitePanel/ResizeImage.ashx?width=120&height=120&url=" + Server.UrlEncode(url); + } + + protected string GetWebAppInstallUrl(string appId) + { + //http://localhost:9001/Default.aspx?pid=SpaceWebApplicationsGallery&mid=122&ctl=edit&ApplicationID=DotNetNuke&SpaceID=7 + + List url = new List(); + url.Add("pid=SpaceWebApplicationsGallery"); + url.Add("mid=122"); + url.Add("ctl=edit"); + url.Add("SpaceID="+PanelSecurity.PackageId.ToString(CultureInfo.InvariantCulture)); + url.Add("ApplicationID=" + appId); + string siteId = ViewState["WebSiteId"] as string; + if (!string.IsNullOrEmpty(siteId)) + { + url.Add("SiteId="+siteId); + } + url.Add("ReturnUrl=" + Server.UrlEncode(Request.RawUrl)); + + return "~/Default.aspx?" + String.Join("&", url.ToArray()); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.designer.cs new file mode 100644 index 00000000..23332593 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesHeliconZooControl.ascx.designer.cs @@ -0,0 +1,52 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class WebSitesHeliconZooControl { + + /// + /// gvApplications control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvApplications; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index efab9bc2..30e889aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -325,6 +325,13 @@ CRM2011_Settings.ascx + + HeliconZoo_Settings.ascx + ASPXCodeBehind + + + HeliconZoo_Settings.ascx + hMailServer5_EditAccount.ascx ASPXCodeBehind @@ -3725,6 +3732,13 @@ WebSitesEditHeliconApeUser.ascx + + WebSitesHeliconZooControl.ascx + ASPXCodeBehind + + + WebSitesHeliconZooControl.ascx + WebSitesEditWebFolder.ascx ASPXCodeBehind @@ -3831,6 +3845,7 @@ + @@ -3915,6 +3930,7 @@ + @@ -4987,6 +5003,7 @@ + Designer @@ -4994,6 +5011,7 @@ Designer + Designer diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj index b28564d3..d4f55c36 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj @@ -224,7 +224,9 @@ Designer - + + Designer + diff --git a/WebsitePanel/Sources/generate_es_proxies.bat b/WebsitePanel/Sources/generate_es_proxies.bat index 5a4fbd8d..4bde5550 100644 --- a/WebsitePanel/Sources/generate_es_proxies.bat +++ b/WebsitePanel/Sources/generate_es_proxies.bat @@ -95,7 +95,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxy REM %WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs - +REM %WSDL% %SERVER_URL%/esHeliconZoo.asmx /out:.\WebsitePanel.EnterpriseServer.Client\HeliconZooProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient +REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\HeliconZooProxy.cs diff --git a/WebsitePanel/Sources/generate_server_proxies.bat b/WebsitePanel/Sources/generate_server_proxies.bat index 2ef3d080..0256ae16 100644 --- a/WebsitePanel/Sources/generate_server_proxies.bat +++ b/WebsitePanel/Sources/generate_server_proxies.bat @@ -59,4 +59,5 @@ REM %WSE_CLEAN% .\WebsitePanel.Server.Client\WindowsServerProxy.cs REM %WSDL% %SERVER_URL%/LyncServer.asmx /out:.\WebsitePanel.Server.Client\LyncServerProxy.cs /namespace:WebsitePanel.Providers.Lync /type:webClient /fields REM %WSE_CLEAN% .\WebsitePanel.Server.Client\LyncServerProxy.cs - +REM %WSDL% %SERVER_URL%/HeliconZoo.asmx /out:.\WebsitePanel.Server.Client\HeliconZooProxy.cs /namespace:WebsitePanel.Providers.HeliconZoo /type:webClient /fields +REM %WSE_CLEAN% .\WebsitePanel.Server.Client\HeliconZooProxy.cs diff --git a/WebsitePanel/WebsitePanelFeedTemplate.xml b/WebsitePanel/WebsitePanelFeedTemplate.xml index 7a8b7dc0..5be25d7c 100644 --- a/WebsitePanel/WebsitePanelFeedTemplate.xml +++ b/WebsitePanel/WebsitePanelFeedTemplate.xml @@ -70,8 +70,8 @@ SQLExpress - - WDeploy + + WDeployNoSMO diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index 67b30f16..9178c818 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -21,7 +21,7 @@ "$(RootFolder)\tools\sqlcmd\sqlcmd.exe" -S (local)\SQLEXPRESS -E "$(RootFolder)\tools\webdeploy\msdeploy.exe" - "C:\Program Files\7-Zip\7z.exe" + "$(RootFolder)\tools\7-Zip\7z.exe" WebsitePanel_build server=(local)\SQLEXPRESS;database=$(DataBaseName);Integrated Security=true; @@ -724,11 +724,11 @@ - + - + diff --git a/tools/7-Zip/7-zip.chm b/tools/7-Zip/7-zip.chm new file mode 100644 index 00000000..08e4df23 Binary files /dev/null and b/tools/7-Zip/7-zip.chm differ diff --git a/tools/7-Zip/7-zip.dll b/tools/7-Zip/7-zip.dll new file mode 100644 index 00000000..c32a6673 Binary files /dev/null and b/tools/7-Zip/7-zip.dll differ diff --git a/tools/7-Zip/7z.dll b/tools/7-Zip/7z.dll new file mode 100644 index 00000000..48bd32f2 Binary files /dev/null and b/tools/7-Zip/7z.dll differ diff --git a/tools/7-Zip/7z.exe b/tools/7-Zip/7z.exe new file mode 100644 index 00000000..5ec90671 Binary files /dev/null and b/tools/7-Zip/7z.exe differ diff --git a/tools/7-Zip/7z.sfx b/tools/7-Zip/7z.sfx new file mode 100644 index 00000000..8145654d Binary files /dev/null and b/tools/7-Zip/7z.sfx differ diff --git a/tools/7-Zip/7zCon.sfx b/tools/7-Zip/7zCon.sfx new file mode 100644 index 00000000..6fc40e43 Binary files /dev/null and b/tools/7-Zip/7zCon.sfx differ diff --git a/tools/7-Zip/7zFM.exe b/tools/7-Zip/7zFM.exe new file mode 100644 index 00000000..b0f84553 Binary files /dev/null and b/tools/7-Zip/7zFM.exe differ diff --git a/tools/7-Zip/7zG.exe b/tools/7-Zip/7zG.exe new file mode 100644 index 00000000..c89f4b6f Binary files /dev/null and b/tools/7-Zip/7zG.exe differ diff --git a/tools/7-Zip/History.txt b/tools/7-Zip/History.txt new file mode 100644 index 00000000..b9a45459 --- /dev/null +++ b/tools/7-Zip/History.txt @@ -0,0 +1,1022 @@ +HISTORY of the 7-Zip +-------------------- + +9.20 2010-11-18 +------------------------- +- Some bugs were fixed. + + +9.19 beta 2010-11-11 +------------------------- +- The console version now doesn't show entered password. +- Some bugs were fixed. + + +9.18 beta 2010-11-02 +------------------------- +- 7-Zip now can unpack SquashFS and CramFS filesystem images. +- 7-Zip now can unpack some TAR and ISO archives with incorrect headers. +- New small SFX module for installers (in Extra package). +- Some bugs were fixed. + + +9.17 beta 2010-10-04 +------------------------- +- Disk fragmentation problem for ZIP archives created by 7-Zip was fixed. + + +9.16 beta 2010-09-08 +------------------------- +- 7-Zip now supports files that are larger than 8 GB in TAR archives. +- NSIS support was improved. +- Some bugs were fixed. +- New localizations: Hindi, Gujarati, Sanskrit. + + +9.15 beta 2010-06-20 +------------------------- +- Some bugs were fixed. +- New localization: Tatar. + + +9.14 beta 2010-06-04 +------------------------- +- WIM support was improved. + + +9.13 beta 2010-04-15 +------------------------- +- 7-Zip now stores NTFS file timestamps to ZIP archives. +- New additional "Open archive >" item in context menu allows to select + archive type for some files. +- Some bugs were fixed. +- New localization: Uyghur. + + +9.12 beta 2010-03-24 +------------------------- +- ZIP / PPMd compression ratio was improved in Maximum and Ultra modes. +- The BUG in 7-Zip 9.* beta was fixed: LZMA2 codec didn't work, + if more than 10 threads were used (or more than 20 threads in some modes). + + +9.11 beta 2010-03-15 +------------------------- +- 7-Zip now supports PPMd compression in ZIP archives. +- Speed optimizations in PPMd codec. +- The support for archives in installers was improved. +- Some bugs were fixed. +- New localization: Kazakh. + + +9.10 beta 2009-12-22 +------------------------- +- The BUG in 7-Zip 9.09 beta was fixed: + 7-Zip created incorrect ZIP archives, if ZipCrypto encryption was used. + + +9.09 beta 2009-12-12 +------------------------- +- 7-Zip now can unpack Apple Partition Map (APM) disk images. +- Speed optimizations in AES code for Intel's 32nm CPUs. +- Speed optimizations in CRC calculation code for Intel's Atom CPUs. +- Some bugs were fixed. + + +9.07 beta 2009-08-27 +------------------------- +- It's possible to specify Diff program in options (7-Zip File Manager). +- Some bugs were fixed. + + +9.06 beta 2009-08-17 +------------------------- +- 7-Zip now can unpack MSLZ archives. +- Partial parsing for EXE resources, SWF and FLV. +- Some bugs were fixed. + + +9.04 beta 2009-05-30 +------------------------- +- 7-Zip now can update solid .7z archives. +- 7-Zip now supports LZMA2 compression method. +- 7-Zip now supports XZ archives. +- 7-Zip now can unpack NTFS, FAT, VHD and MBR archives. +- 7-Zip now can unpack GZip, BZip2, LZMA, XZ and TAR archives from stdin. +- 7-Zip now can open/copy/compress disk images (like \\.\c:) from \\.\ folder. +- 7-Zip File Manager now doesn't use temp files to open nested archives + stored without compression. +- New -scrc switch to calculate total CRC-32 during extracting / testing. +- New -scc{WIN|DOS|UTF-8} switch to specify charset for console input/output (default = DOS). +- Some bugs were fixed. + + +4.65 2009-02-03 +------------------------- +- 7-Zip File Manager now can calculate SHA-256 checksum. +- Some bugs were fixed. + + +4.64 2009-01-03 +------------------------- +- The bug in 7-Zip 4.63 was fixed: 7-Zip could not decrypt .ZIP archives + encrypted with WinZip-AES method. + + +4.63 2008-12-31 +------------------------- +- 7-Zip now can unpack ZIP archives encrypted with PKWARE-AES. +- Some bugs were fixed. + + +4.62 2008-12-02 +------------------------- +- Some bugs were fixed. + + +4.61 beta 2008-11-23 +------------------------- +- 7-Zip now supports LZMA compression for .ZIP archives. +- Some bugs were fixed. +- New localization: Sinhala. + + +4.60 beta 2008-08-19 +------------------------- +- Some bugs were fixed. + + +4.59 beta 2008-08-13 +------------------------- +- 7-Zip now can unpack UDF, XAR and DMG/HFS archives. +- 7-Zip File Manager now keeps encryption when you edit encrypted file inside archive. +- 7-Zip File Manager now allows to change current folder from the address bar drop-down list. +- It's allowed to use -t switch for "list" and "extract" commands. +- Some bugs were fixed. +- New localizations: Icelandic, Kurdish Sorani. + + +4.58 beta 2008-05-05 +------------------------- +- Some speed optimizations. +- 7-Zip now can unpack .lzma archives. +- Unicode (UTF-8) support for filenames in .ZIP archives. Now there are 3 modes: + 1) Default mode: 7-Zip uses UTF-8, if the local code page doesn't contain required symbols. + 2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols. + 3) -mcl switch: 7-Zip uses local code page. +- Now it's possible to store file creation time in 7z and ZIP archives (-mtc switch). +- 7-Zip now can unpack multivolume RAR archives created with + "old style volume names" scheme and names *.001, *.002, ... +- Now it's possible to use -mSW- and -mSW+ switches instead of -mSW=off and -mSW=on +- Some bugs were fixed. +- New localizations: Punjabi (Indian), Pashto. + + +4.57 2007-12-06 +------------------------- +- The BUG in command line version was fixed: -up3 switch + could work incorrectly. + + +4.56 beta 2007-10-24 +------------------------- +- Some bugs were fixed. + + +4.55 beta 2007-09-05 +------------------------- +- Some bugs were fixed. + + +4.54 beta 2007-09-04 +------------------------- +- Decompression speed was increased. + + +4.53 beta 2007-08-27 +------------------------- +- "Test" and "Info" buttons now work for open archives. +- The bug in 7-Zip 4.48 - 4.52 beta was fixed: + 7-Zip could create .ZIP archives with broken files. +- Some bugs were fixed. + + +4.52 beta 2007-08-03 +------------------------- +- 7-Zip now can unpack Compound files (msi, doc, ...). +- Some bugs were fixed. + + +4.51 beta 2007-07-25 +------------------------- +- Bug was fixed: 7-Zip 4.50 beta could not open some .7z archives. + + +4.50 beta 2007-07-24 +------------------------- +- New switch for command line version: + -ssc[-] enables/disables case-sensitive mode for file names. +- Speed optimizations for AES encryption. +- Some bugs were fixed. + + +4.49 beta 2007-07-11 +------------------------- +- 7-Zip now can unpack WIM archives. +- 7-Zip now replaces incorrect characters in filenames during extracting. + + +4.48 beta 2007-06-26 +------------------------- +- Encryption strength for .7z format was increased. + Now it uses random initialization vectors. +- Some bugs were fixed. + + +4.47 beta 2007-05-27 +------------------------- +- Bugs of 7-Zip 4.46 beta were fixed: BZip2 could work incorrectly. + + +4.46 beta 2007-05-25 +------------------------- +- New fast compression mode for Deflate method in Zip and GZip. +- New "Compress shared files" option in GUI and -ssw switch. +- Some bugs were fixed. +- New localization: Norwegian Nynorsk. + + +4.45 beta 2007-04-17 +------------------------- +- Now it's possible to specify the size of solid block and the number + of CPU threads in "Add to archive" dialog box. +- Default dictionary size was increased: Normal: 16 MB, Max: 32 MB. +- Speed optimizations. +- Benchmark was improved (new "b" command in command line version). +- The number of DLL files was reduced. +- Now it's possible to associate 7-zip with combined types like .tbz2 +- switch -mhcf=off is not supported now. +- If -t{Type} switch is not specified, 7-Zip now uses extension of archive to + detect the type of archive. +- Some bugs were fixed. +- New localization: Welsh. + + +4.44 beta 2007-01-20 +------------------------- +- Speed optimizations for LZMA, Deflate, BZip2 and unRAR. +- 7-Zip now supports file pathnames longer than 260 characters. +- Some bugs were fixed. +- New localizations: Bangla, Bashkir, Nepali. + + +4.43 beta 2006-09-15 +------------------------- +- 7-Zip now can use multi-threading mode for compressing to .ZIP archives. +- ZIP format supporting was improved. +- 7-Zip now supports WinZip-compatible AES-256 encryption for .ZIP archives. +- New context menu items for .ZIP archives creating. +- 7-Zip now uses order list (list of extensions) for files sorting for compressing + to .7z archives. It can slightly increase compression ratio in some cases. +- 7-Zip now restores modification time of folders during .7z archives extracting. +- Some bugs were fixed. +- New localizations: Armenian, Marathi. + + + +4.42 2006-05-14 +------------------------- +- Compressing speed and Memory requirements were increased. + Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB, + Normal: 4 MB, Max: 16 MB, Ultra: 64 MB. +- BZip2 compressing / decompressing now can work in multi-threading mode +- Multi-threading mode now is default for multi-processor systems +- 64-bit version now supports 1 GB dictionary +- 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4 +- Compression ratio in Zip/GZip/Deflate in Ultra mode was increased +- 7-Zip now can unpack ISO archives and some installers created by NSIS +- Optional "Flat View" mode in 7-Zip File Manager +- 7-Zip File Manager now can calculate CRC checksums for files +- -x switch with relative paths now affects files specified with absolute paths +- New switch for 7za.exe (console version): -slt. + "l" (list) command with -slt shows technical information for archive. +- New switch: -scs{WIN|DOS|UTF-8} specifies charset for list files. + Default charset for list files is UTF-8 now. +- Some bugs were fixed +- New localizations: Albanian, Kurdish + + +4.32 2005-12-09 +------------------------- +- Bug was fixed: 7-Zip 4.31 didn't work in Windows 95 + + +4.31 2005-12-04 +------------------------- +- Small changes +- New localization: Basque + + +4.30 beta 2005-11-18 +------------------------- +- Files 7zFMn.exe, 7zGn.exe, 7-zipn, 7za.exe, 7zC.sfx were removed from 7-zip package +- 7-Zip now uses uncompressed SFX: 7z.sfx +- Sfx modules 7z.sfx and 7zCon.sfx now use msvcrt.dll +- Speed optimizations in LZMA maximum/ultra compressing. +- LZMA now supports word size up to 273 +- 7-Zip now reduces dictionary size for LZMA, if you compress files + smaller than specified dictionary size. +- 7-Zip now can use large memory pages: + GUI: 7-Zip File Manager / Options / Settings / Use large memory pages. + Command line version: -slp switch. + This feature allows to increase speed of compressing. + But 7-Zip can make some pause at starting of compressing for allocating large pages. + Also Task Manager doesn't show real memory usage of program, if 7-Zip uses large pages. + This feature works only on Windows 2003 / XP x64 / Vista. + Also you must have administrator's rights for your system. + Recommended size of RAM: 1 GB or more. + To install this feature you must run 7-Zip File Manager at least once, + close it and reboot system. +- Some bugs were fixed + + +4.29 beta 2005-09-28 +------------------------- +- Bug was fixed: 7-Zip 4.28 beta worked incorrectly in Windows 95/98/Me + + +4.28 beta 2005-09-27 +------------------------- +- Bug was fixed: 7-Zip 4.27 beta created incorrect multivolume archives. +- "Duplicate filename" collision problem between names with ligatures was fixed. + + +4.27 beta 2005-09-21 +------------------------- +- 7-Zip can unpack CHM/HXS (MS HTML HELP) archives +- 7-Zip can unpack multivolume CAB archives +- Now 7-Zip deletes files to the Recycle Bin by default. + Shift+Delete deletes files permanently. +- Some bugs were fixed +- New localization: Tatarish + + +4.26 beta 2005-08-05 +------------------------- +- LZH format support (extracting only) +- Some bugs were fixed +- New localization: Ido + + +4.25 beta 2005-07-31 +------------------------- +- 7-Zip now doesn't interrupt the compressing when it can not + find specified file as in version 4.24 beta. It just shows warning. +- 7-Zip now supports standard selection mode in the file list +- Some bugs were fixed + + +4.24 beta 2005-07-06 +------------------------- +- 7-Zip now supports right-click Drag and Drop in Explorer +- Command line version now supports short file names (like FILENA~1.TXT) +- If there are no wildcard names and there is no -r switch in command line, + 7-Zip now checks that specified files exist on disk before compressing. +- Some bugs were fixed + + +4.23 2005-06-29 +------------------------- +- Drag and Drop support +- 7-Zip File Manager now can copy files from one archive to another +- Some bugs were fixed +- New localizations: Extremaduran, Malay + + +4.20 2005-05-30 +------------------------- +- No changes + + +4.19 beta 2005-05-21 +------------------------- +- BZip2 code was rewritten. Now it supports 3 modes: Normal, Maximum and + Ultra. In Normal mode it compresses almost as original BZip2 compressor. + Compression ratio in Maximum and Ultra modes is 1-3% better for some files, + but Maximum Mode is about 3 times slower and Ultra Mode is about 8 times + slower than Normal mode. +- Console version now prints all messages to stdout by default, + and if -so switch is specified, 7-Zip prints messages to stderr. +- Some bugs were fixed +- New localizations: Azeri, Georgian + + +4.18 beta 2005-04-19 +------------------------- +- Bug in v4.17 beta was fixed: 7-Zip File Manager could crash + after some operations with archives + + +4.17 beta 2005-04-18 +------------------------- +- To increase protection from viruses, 7-Zip now does not open + files with more than 4 continuous spaces in the name. + And 7-Zip changes such long spaces in name to " ... " in the file list. +- Code size optimization +- Some files were moved from main package to extra package: + - Plugin for FAR Manager + - SFX modules for installers (7zS.sfx and 7zSD.sfx) +- New localizations: Asturian, Indonesian + + +4.16 beta 2005-03-29 +------------------------- +- Speed optimization (5%) for 7z / LZMA +- 7za.exe now supports .Z archives +- -r- switch in command line now is default for all commands +- Some bugs were fixed +- New localization: Uzbek + + +4.15 beta 2005-01-25 +------------------------- +- Z format supporting (extracting only) +- 7-Zip now can extract ZIP archives compressed with "Shrink" method +- 7-Zip now doesn't interrupt the compressing when it can not open file. + 7-Zip just skips that file and shows warning. +- Some bugs were fixed +- New localization: Frisian + + +4.14 beta 2005-01-11 +------------------------- +- 7-Zip installer was created with NSIS. + Now it installs 7-Zip for all users (under Windows 2000/XP). +- Now 7-Zip can create multivolume archives + (switch -v for command line) +- Some bugs were fixed +- New localizations: Breton, Farsi + + +4.13 beta 2004-12-14 +------------------------- +- Switch "--" stops switches parsing +- Some bugs were fixed + + +4.12 beta 2004-11-18 +------------------------- +- Bug in v4.11 beta was fixed: + 7-Zip created incorrect ZIP archives if file size was + from 3.75 GB to 4 GB. + + +4.11 beta 2004-11-16 +------------------------- +- 7-Zip now shows file names during compressing/decompressing +- 7-Zip now supports Zip64 extension of ZIP format. So now it's + possible to compress files bigger than 4 GB to ZIP archives. +- Some bugs were fixed +- New localization: Galician + + +4.10 beta 2004-10-21 +------------------------- +- Bugs in v4.0* were fixed: + - Some commands in command line with "-r" switch worked incorrectly, + so 7-zip could skip some files during compressing + - Some other bugs were fixed +- Small internal changes + + +4.09 beta 2004-10-05 +------------------------- +- Bugs in v4.0* were fixed: + - Renaming inside archives didn't work or worked incorrectly + - GUI SFX didn't show extracting dialog at start +- Small fixes in 7-Zip GUI (7zG.exe) + + +4.08 beta 2004-10-04 +------------------------- +- Bug in installer for v4.07 was fixed: when rebooting + is required, it rebooted without asking user +- Small fixes in 7-Zip GUI (7zG.exe) + + +4.07 beta 2004-10-03 +------------------------- +- Big amount of code was changed in this beta version. + So don't use it for important data compressing. + And test archive after compressing. + +- Unified command line interface to GUI and console versions +- 7-Zip now can extract or test several archives in one command +- 7-Zip now doesn't interrupt the compressing when file is locked by + other application. 7-Zip just skips that file and shows warning. + Note: previous versions of 7-Zip had bug, so they can not unpack + non-solid and some solid 7z archives with such skipped files. +- Command line interface was changed: + - now it's possible to use absolute pathnames + - syntax simplification: + was: 7z a a Folder1\* Folder2\* -r + now: 7z a a Folder1 Folder2 + - now it's possible to use complex wildcard commands, like *\*111*\* +- More smart detection of archive type for files with unusual + file name extensions +- Supporting for RAR archives with encrypted headers +- CPIO format supporting was improved +- For GZip and BZip2 formats you can: + - Compress from stdin (-si switch) + - Compress to stdout (-so switch) + - Extract to stdout (-so switch) +- 7-Zip File Manager: + - Split and Combine commands + - new list view options: Full row select, Show grid lines +- Internal reconstruction +- Some bugs were fixed +- New localizations: Friulian, Macedonian, Mongolian, Tamil, Thai + + +3.13 2003-12-11 +------------------------- +- Some small bugs were fixed + + +3.12 2003-12-10 +------------------------- +- Now you can select compression method, dictionary size + and word size in "Add to archive" dialog box. Also it + shows memory usage. +- 7-Zip File Manager now contains toolbars. +- New "Benchmark" command in 7-Zip File Manager. + It measures compressing and decompressing speeds and + shows rating values. +- Some bugs were fixed. + + +3.11 2003-10-06 +------------------------- +- 7-zip now use limitations for solid block size + for increasing the speed of random file decompressing: + - in Store mode: 0 B + - in Fast mode: 16 MB + - in Normal mode: 256 MB + - in Maximum mode: 1 GB + - in Ultra mode: 4 GB +- 7z.exe, 7za.exe and SFX modules now support Unicode + file names under Windows NT/2000/XP/2003. + 7zn.exe and 7zan.exe were removed from package. +- Some bugs were fixed +- New localization: Afrikaans + + +3.10 2003-09-27 +------------------------- +- Drag-and-Drop from external application +- GUI version (7zG.exe) can compress files with absolute paths +- Compression dialog doesn't suggest bzip2 and gzip2 types when + there are more than one selected file +- Optional auto renaming for existing files during extraction + in command line version (-aot switch). +- Some bugs were fixed + + +3.09.02 2003-09-20 +------------------------- +- Optional limitation for solid block size for increasing + the speed of random file decompressing (-ms switch) + + +3.09.01 beta 2003-09-06 +------------------------- +- Automatic compression filter for executable files: + dll, exe, ocx, sfx, sys, (-mf switch) +- Compression levels in 7z now are: + - Fast: 32 KB dictionary, BCJ filter + - Normal: 2 MB dictionary, BCJ filter + - Maximum: 8 MB dictionary, BCJ filter, max settings + - Ultra: 32 MB dictionary, BCJ2 filter, max settings +- Updating solid 7z archives now is supported, if it doesn't + require repacking solid blocks +- -mhcf switch for 7z format now is default +- Some bugs were fixed + + +3.08.04 beta 2003-08-24 +------------------------- +- Favorites menu in 7-Zip File Manager +- Some bugs were fixed + + +3.08.03 beta 2003-08-21 +------------------------- +- Automatic adding of extension to archive name in Compress Dialog +- Some bugs in previous 3.08.* versions were fixed: + - Storing columns width inside archives in File Manager + - Opening archive inside archive + - Quotes in list files in console version + + +3.08.02 beta 2003-08-20 +------------------------- +- Some bugs were fixed + + +3.08 beta 2003-08-19 +------------------------- +- Compress dialog: + - Supporting fast compressing mode (-mx=1 switch) + - Multi-threading option for Multi-Processor systems + or Pentium 4 with Hyper-Threading + - Encrypt file names option +- New context menu items: + - Extract here + - Extract to + - Compress and email +- Internal reconstruction, registry using was reduced +- New localization: Esperanto + + +2.30 Beta 32 2003-05-15 +------------------------- +- New features in compressing / decompressing window. +- "Show password" option. +- Some other small changes. +- New localization: Valencian. + + +2.30 Beta 31 2003-04-29 +------------------------- +- Some bugs were fixed. + + +2.30 Beta 30 2003-04-19 +------------------------- +- 7-Zip File Manager: + - Showing .. item. + - 1/2 Panels mode switching (F9). +- Supporting Bzip2 compression in ZIP archives. +- Some bugs were fixed. +- Some optimization recompiling for reducing code size. + + +2.30 Beta 29 2003-04-07 +------------------------- +- 7-Zip File Manager: + - "7-Zip" and "System" submenus in "Files" menu. + - Path history and "Browse" button in "Copy" dialog. +- RAR supporting was improved. +- Some bugs were fixed. +- Small changes in LZMA code. +- New localizations: Hebrew, Vietnamese. + + +2.30 Beta 28 2003-02-16 +------------------------- +- Some bugs were fixed: + - Updating 7z archives that are larger than 4 GB. + - Using anti-items in 7z format. + - Compressing empty files with password to zip format. +- In max mode 7z now uses 8 MB dictionary instead of 4 MB. +- 7-Zip File Manager: + - Supporting file comments: Ctrl-Z. + - New key alias for folder bookmarks: [Shift]+Alt+Number. + + +2.30 Beta 27 2003-01-24 +------------------------- +- Two BUGs in two previous beta versions (Beta 25 and Beta 26) + were fixed: + 1. Incorrect compressing to non-solid 7z archive + when files have some very big sizes: + 4 GB, 8 GB, 12 GB, 16 GB, ... + 2. Incorrect percent showing in 7z compressing + when files are bigger than 4 GB. +- Supporting multivolume RAR and SPLIT archives. +- Supporting DEB archives. +- Supporting old version of CPIO format. +- Some bugs were fixed. +- New localizations: Korean, Swedish. + + +2.30 Beta 26 2003-01-12 +------------------------- +- Supporting Deflate64 method in Zip archives. +- Supporting Rar 1.50 archives. +- Some bugs were fixed. + + +2.30 Beta 25 2003-01-02 +------------------------- +- Encryption feature for 7z format (AES-256). +- New optional archive header compressing mode (-mhcf). +- Archive headers now always are compressed with LZMA method. +- Updating non-solid 7z archives without -ms=off now is allowed. +- Folder creating and item renaming inside archive now is supported. +- Supporting encrypted Rar3 archives. +- Supporting Unicode names in Rar3 archives. +- Some bugs were fixed. +- New localizations: Lithuanian, Voro. + + +2.30 Beta 24 2002-11-01 +------------------------- +- Some internal reconstructions. +- -m switch syntax was slightly changed. +- Some bugs were fixed. +- New localizations: Catalan, Norwegian, Romanian. + + +2.30 Beta 23 2002-09-07 +------------------------- +- Encryption feature for zip format. +- Percent indicating for some operations. +- Some bugs were fixed. + + +2.30 Beta 22 2002-08-31 +------------------------- +- New program: 7-Zip File Manager. +- Command line version now doesn't allow absolute paths + for compressing files. +- New localizations: Belarusian, Greek. +- Bug in FAR plugin was fixed: + Incorrect updating when archive has no explicit + directory items for file items. +- Some bugs were fixed. + + +2.30 Beta 21 2002-07-08 +------------------------- +- RAM requirements for LZMA (7z) compression were reduced. +- Small bug in FAR plugin was fixed. + + +2.30 Beta 20 2002-07-01 +------------------------- +- RAM requirements for LZMA (7z) decompression were reduced. +- New localization: Turkish. +- Some bugs were fixed. + + +2.30 Beta 19 2002-04-11 +------------------------- +- Supporting RAR 3.0 archives. +- New localizations: Danish, Ukrainian. + + +2.30 Beta 18 2002-03-25 +------------------------- +- Compressing speed in 7z format was slightly increased. +- New localizations: Estonian, Finnish. +- Some bugs were fixed. + + +2.30 Beta 17 2002-03-03 +------------------------- +- Supporting ARJ archives. +- New localization: Chinese Simplified. + + +2.30 Beta 16 2002-02-24 +------------------------- +- Supporting RPM and CPIO archives. +- New fast compression mode for LZMA: -m0a=0. +- New match finders for LZMA: bt4b, hc3, hc4. +- Some bugs were fixed. + + +2.30 Beta 15 2002-02-17 +------------------------- +- Compression ratio in 7z was slightly improved. +- New localization: Dutch. + + +2.30 Beta 14 2002-02-10 +------------------------- +- Speed optimization for multiprocessor computers (-mmt switch). +- New localizations: Czech, Japanese, Polish. +- Some bugs were fixed. + + +2.30 Beta 13 2002-01-31 +------------------------- +- New SFX module for installers. +- New match finder for LZMA: bt3. +- New localizations: Portuguese, Portuguese Brazil, Serbo-Croatian. +- Some bugs were fixed. + + +2.30 Beta 12 2002-01-16 +------------------------- +- Bug was fixed: memory leak in Beta 11. +- New localization: Hungarian. + + +2.30 Beta 11 2002-01-15 +------------------------- +- Archive testing feature for GUI version. +- Now 7-Zip can use more than 256 MB of RAM in all Windows versions. +- New localizations: Bulgarian, Chinese Traditional, Latvian, Slovak. +- Some bugs were fixed. + + +2.30 Beta 10 2002-01-11 +------------------------- +- Bugs were fixed: + - Updating 7z archives in Beta 8 and 9 didn't work. + - Unicode version in Beta 9 didn't work in Windows NT4. + - Some other bugs were fixed. +- New localizations: Arabic, French, Italian, Slovenian, Spanish. + + +2.30 Beta 9 2002-01-08 +------------------------- +- Program localization: English, German, Russian. +- Additional optimized versions of programs + for Windows NT4/2000/XP. +- Two new match finders for LZMA: pat3h and pat4h. +- Some bugs were fixed. + + +2.30 Beta 8 2001-12-21 +------------------------- +- 7-Zip now supports some zip archives that were not + supported by previous versions. +- 7-Zip now supports new state (-uw switch) for cases + when 7-Zip can not detect whether file is newer or the same. +- Supporting anti-items in 7z format for incremental + update (-u with action #3). +- Some bugs were fixed. + + +2.30 Beta 7 2001-11-04 +------------------------- +- BCJ2: new converter for x86 code. +- Supporting tar archives with very long file names + (GNU extension to 'tar' format). +- Supporting multistream coders in 7z (-mb switch). +- More compressing parameters for zip and gzip + in console version (-m switch). +- Solid compressing option in Windows version. +- Compressing parameters option in Windows version. +- Auto renaming existing files feature for + extracting files. +- Overwrite mode switch for extracting (-ao). +- Some bugs were fixed. + + +2.30 Beta 6 2001-10-13 +------------------------- +- Supporting 7z format in MultiArc plugin for FAR Manager. +- Some bugs were fixed. + + +2.30 Beta 5 2001-10-02 +------------------------- +- Creating SFX archives from explorer. +- 7zWin.sfx: Windows version of SFX module. +- Auto adding .exe extension to SFX archive name. +- 7za.exe now supports 7z, bzip2, gzip, tar, zip. +- Some bugs were fixed. + + +2.30 Beta 4 2001-09-15 +------------------------- +- Self extract capability for 7z format. +- 7z archive format is default for 7z.exe and 7za.exe. +- 7z in default mode now uses bt234 match finder + and solid compression. +- 7z in maximum mode (-mx) now uses 4MB dictionary. + + +2.30 Beta 3 2001-09-10 +------------------------- +- Bug was fixed: decompressing .7z solid archives + containing empty files. +- new 7za.exe: standalone command line version + (only for 7z format). +- Speed of compressing to Deflate format (zip, gzip) + was slightly increased. + + +2.30 Beta 2 2001-08-30 +------------------------- +- Supporting the new 7z format with high compression ratio. +- -bd (Disable percentage indicator) switch in + console version. +- Bug in console version was fixed: + previous versions incorrectly execute compression + commands with non-recursive wildcards in combination + with subfolders. +- Some other bugs were fixed. + + +2.30 Beta 1 2001-05-07 +------------------------- +- Speed of reading of archive contents was increased. +- Bug was fixed: incorrect showing file names with + national charsets in some zip archives. +- Now it is possible to compress files larger than 4GB + to GZip archives. + + +2.24 2001-03-21 +------------------------- +- Bugs in GZip and Cab decoders were fixed. + + +2.23 2001-03-04 +------------------------- +- Opening archive items in Explorer. +- Context menu for archive items in Explorer. +- Automatic adding extension to archive name in console version. +- Some bugs were fixed. + + +2.22 2001-01-21 +------------------------- +- Supporting Zip archives containing more than 65535 files. +- Speed of Plugin for Explorer was increased. +- Searching start position of archive now is limited by + first 1MB part of file. +- Some bugs were fixed. +- Packet now doesn't contain 7zip.exe, far7zip.reg and + far7zip2.reg files. There is new far7z.reg file. + + +2.21 2000-12-21 +------------------------- +- FAR Plugin was improved: + + - Showing process box during opening archives. + - Viewing properties of file by Ctrl-A. + - Alt-F6 in archive now immediately extracts selected files + to current directory. + +- Some bugs were fixed: + + - Entering to archive's subfolders in Explorer by clicking + items in main window didn't work under Windows ME/2000. + - Decompressing solid Rar archives sometimes gave error. + - Console version 7z.exe during list operation incorrectly + showed file names with national (non-english) charsets. + - FAR Plugin didn't execute some operations. + - Showing percents during extracting ZIP archives sometimes + was incorrect. + + +2.20 2000-11-20 +------------------------- +- Supporting BZip2 and Cab. +- New program architecture with external + compression and cryptographic modules. +- Decryption support (Rar and Zip). +- New console client. +- Some bugs were fixed. + + +2.11 2000-06-15 +------------------------- +- Bugs were fixed: + + - FAR Plugin incorrectly processed + names of subdirectories that use national + (non-english) charsets. + - gzip plugin could not compress empty files. + + +2.10 2000-05-16 +------------------------- +- First level 7-Zip Plugin for FAR Manager. +- GUI version with integration to Windows Shell. +- Compression and decompressing GZip and TAR formats. +- Decompression RAR. +- Install & Uninstall support. +- Some bugs were fixed. + + +2.01 1999-09-19 +------------------------- +- Small bug was fixed. +- Compression ratio was improved for some files. + + +2.00 1999-07-18 +------------------------- +- Release. +- Big bug was fixed: previous versions incorrectly worked + during compressing with files that were referred by + direct(without wildcards) paths, containing subdirs parts. +- Compression and decompression speed were improved. +- -mx switch (maXimize compression) was added. +- Small bugs were fixed. + + +2.00 Beta 1 1999-01-02 +------------------------- +- Original beta version. + + +End of document diff --git a/tools/7-Zip/License.txt b/tools/7-Zip/License.txt new file mode 100644 index 00000000..e25910a6 --- /dev/null +++ b/tools/7-Zip/License.txt @@ -0,0 +1,56 @@ + 7-Zip + ~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2010 Igor Pavlov. + + Licenses for files are: + + 1) 7z.dll: GNU LGPL + unRAR restriction + 2) All other files: GNU LGPL + + The GNU LGPL + unRAR restriction means that you must follow both + GNU LGPL rules and unRAR restriction rules. + + + Note: + You can use 7-Zip on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip. + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You can receive a copy of the GNU Lesser General Public License from + http://www.gnu.org/ + + + unRAR restriction + ----------------- + + The decompression engine for RAR archives was developed using source + code of unRAR program. + All copyrights to original unRAR code are owned by Alexander Roshal. + + The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + + -- + Igor Pavlov diff --git a/tools/7-Zip/descript.ion b/tools/7-Zip/descript.ion new file mode 100644 index 00000000..1b2f9a5b --- /dev/null +++ b/tools/7-Zip/descript.ion @@ -0,0 +1,13 @@ +7-zip.chm 7-Zip Help +7-Zip.dll 7-Zip Plugin +7z.dll 7-Zip Engine +7z.exe 7-Zip Console +7z.sfx 7-Zip GUI SFX +7zCon.sfx 7-Zip Console SFX +7zFM.exe 7-Zip File Manager +7zg.exe 7-Zip GUI +descript.ion 7-Zip File Descriptions +history.txt 7-Zip History +Lang 7-Zip Translations +license.txt 7-Zip License +readme.txt 7-Zip Overview diff --git a/tools/7-Zip/readme.txt b/tools/7-Zip/readme.txt new file mode 100644 index 00000000..b7d55457 --- /dev/null +++ b/tools/7-Zip/readme.txt @@ -0,0 +1,48 @@ +7-Zip 9.20 +---------- + +7-Zip is a file archiver for Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7. + +7-Zip Copyright (C) 1999-2010 Igor Pavlov. + +The main features of 7-Zip: + + - High compression ratio in the new 7z format + - Supported formats: + - Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM. + - Unpacking only: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, + MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z. + - Fast compression and decompression + - Self-extracting capability for 7z format + - Strong AES-256 encryption in 7z and ZIP formats + - Integration with Windows Shell + - Powerful File Manager + - Powerful command line version + - Localizations for 79 languages + + +7-Zip is free software distributed under the GNU LGPL (except for unRar code). +Read License.txt for more infomation about license. + + + This distribution contains the following files: + + 7zFM.exe - 7-Zip File Manager + 7-zip.dll - Plugin for Windows Shell and for 7-Zip File Manager + 7zg.exe - GUI module + 7z.exe - Command line version + 7z.dll - 7-Zip engine module + 7z.sfx - SFX module (Windows version) + 7zCon.sfx - SFX module (Console version) + + License.txt - License information + readme.txt - This file + History.txt - History of 7-Zip + 7-zip.chm - User's Manual in HTML Help format + + Lang\en.ttt - English (base) localization file + Lang\*.txt - Localization files + + +--- +End of document diff --git a/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.chw b/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.chw new file mode 100644 index 00000000..2ac7706f Binary files /dev/null and b/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.chw differ