merge commit

This commit is contained in:
robvde 2015-03-31 06:48:43 +08:00
commit ac5ecbf190
88 changed files with 6090 additions and 1195 deletions

View file

@ -8860,10 +8860,14 @@ AND ((@GroupName IS NULL) OR (@GroupName IS NOT NULL AND RG.GroupName = @GroupNa
RETURN RETURN
GO GO
-- Hyper-V 2012 R2 -- Hyper-V 2012 R2 Provider
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2') IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2')
BEGIN BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1) INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV2012R2', 1)
END
ELSE
BEGIN
UPDATE [dbo].[Providers] SET [EditorControl] = N'HyperV2012R2' WHERE [ProviderName] = 'HyperV2012R2'
END END
GO GO
@ -9129,3 +9133,330 @@ BEGIN
INSERT INTO [dbo].[Quotas] (QuotaID, GroupID, QuotaOrder, QuotaName, QuotaDescription, QuotaTypeID, ServiceQuota) INSERT INTO [dbo].[Quotas] (QuotaID, GroupID, QuotaOrder, QuotaName, QuotaDescription, QuotaTypeID, ServiceQuota)
VALUES (552, @group_id, 3, 'HostedSharePointServer.UseSharedSSL', 'Use shared SSL Root', 1, 0) VALUES (552, @group_id, 3, 'HostedSharePointServer.UseSharedSSL', 'Use shared SSL Root', 1, 0)
END END
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetLyncUsers')
DROP PROCEDURE GetLyncUsers
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[GetLyncUsers]
(
@ItemID int,
@SortColumn nvarchar(40),
@SortDirection nvarchar(20),
@StartRow int,
@Count int
)
AS
CREATE TABLE #TempLyncUsers
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[AccountID] [int],
[ItemID] [int] NOT NULL,
[AccountName] [nvarchar](300) NOT NULL,
[DisplayName] [nvarchar](300) NOT NULL,
[UserPrincipalName] [nvarchar](300) NULL,
[SipAddress] [nvarchar](300) NULL,
[SamAccountName] [nvarchar](100) NULL,
[LyncUserPlanId] [int] NOT NULL,
[LyncUserPlanName] [nvarchar] (300) NOT NULL,
)
DECLARE @condition nvarchar(700)
SET @condition = ''
IF (@SortColumn = 'DisplayName')
BEGIN
SET @condition = 'ORDER BY ea.DisplayName'
END
IF (@SortColumn = 'UserPrincipalName')
BEGIN
SET @condition = 'ORDER BY ea.UserPrincipalName'
END
IF (@SortColumn = 'SipAddress')
BEGIN
SET @condition = 'ORDER BY ou.SipAddress'
END
IF (@SortColumn = 'LyncUserPlanName')
BEGIN
SET @condition = 'ORDER BY lp.LyncUserPlanName'
END
DECLARE @sql nvarchar(3500)
set @sql = '
INSERT INTO
#TempLyncUsers
SELECT
ea.AccountID,
ea.ItemID,
ea.AccountName,
ea.DisplayName,
ea.UserPrincipalName,
ou.SipAddress,
ea.SamAccountName,
ou.LyncUserPlanId,
lp.LyncUserPlanName
FROM
ExchangeAccounts ea
INNER JOIN
LyncUsers ou
INNER JOIN
LyncUserPlans lp
ON
ou.LyncUserPlanId = lp.LyncUserPlanId
ON
ea.AccountID = ou.AccountID
WHERE
ea.ItemID = @ItemID ' + @condition
exec sp_executesql @sql, N'@ItemID int',@ItemID
DECLARE @RetCount int
SELECT @RetCount = COUNT(ID) FROM #TempLyncUsers
IF (@SortDirection = 'ASC')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID > @StartRow AND ID <= (@StartRow + @Count)
END
ELSE
BEGIN
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
BEGIN
IF (@SortColumn = 'DisplayName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC
END
IF (@SortColumn = 'UserPrincipalName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY UserPrincipalName DESC
END
IF (@SortColumn = 'SipAddress')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY SipAddress DESC
END
IF (@SortColumn = 'LyncUserPlanName')
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY LyncUserPlanName DESC
END
END
ELSE
BEGIN
SELECT * FROM #TempLyncUsers
WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY UserPrincipalName DESC
END
END
DROP TABLE #TempLyncUsers
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'SearchOrganizationAccounts')
DROP PROCEDURE SearchOrganizationAccounts
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[SearchOrganizationAccounts]
(
@ActorID int,
@ItemID int,
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@SortColumn nvarchar(50),
@IncludeMailboxes bit
)
AS
DECLARE @PackageID int
SELECT @PackageID = PackageID FROM ServiceItems
WHERE ItemID = @ItemID
-- check rights
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
RAISERROR('You are not allowed to access this package', 16, 1)
-- start
DECLARE @condition nvarchar(700)
SET @condition = '
(EA.AccountType = 7 OR (EA.AccountType = 1 AND @IncludeMailboxes = 1) )
AND EA.ItemID = @ItemID
'
IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL
AND @FilterValue <> '' AND @FilterValue IS NOT NULL
SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + ''''
IF @SortColumn IS NULL OR @SortColumn = ''
SET @SortColumn = 'EA.DisplayName ASC'
DECLARE @sql nvarchar(3500)
set @sql = '
SELECT
EA.AccountID,
EA.ItemID,
EA.AccountType,
EA.AccountName,
EA.DisplayName,
EA.PrimaryEmailAddress,
EA.SubscriberNumber,
EA.UserPrincipalName,
(CASE WHEN LU.AccountID IS NULL THEN ''false'' ELSE ''true'' END) as IsLyncUser
FROM ExchangeAccounts AS EA
LEFT JOIN LyncUsers AS LU
ON LU.AccountID = EA.AccountID
WHERE ' + @condition
print @sql
exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes bit',
@ItemID, @IncludeMailboxes
RETURN
GO
-- RDS GPO
IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE name = 'RDSServerSettings')
CREATE TABLE [dbo].[RDSServerSettings](
[RdsServerId] [int] NOT NULL,
[SettingsName] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
[PropertyName] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
[PropertyValue] [ntext] COLLATE Latin1_General_CI_AS NULL,
[ApplyUsers] [BIT] NOT NULL,
[ApplyAdministrators] [BIT] NOT NULL
CONSTRAINT [PK_RDSServerSettings] PRIMARY KEY CLUSTERED
(
[RdsServerId] ASC,
[SettingsName] ASC,
[PropertyName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServerSettings')
DROP PROCEDURE GetRDSServerSettings
GO
CREATE PROCEDURE GetRDSServerSettings
(
@ServerId int,
@SettingsName nvarchar(50)
)
AS
SELECT RDSServerId, PropertyName, PropertyValue, ApplyUsers, ApplyAdministrators
FROM RDSServerSettings
WHERE RDSServerId = @ServerId AND SettingsName = @SettingsName
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteRDSServerSettings')
DROP PROCEDURE DeleteRDSServerSettings
GO
CREATE PROCEDURE DeleteRDSServerSettings
(
@ServerId int
)
AS
DELETE FROM RDSServerSettings WHERE RDSServerId = @ServerId
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServerSettings')
DROP PROCEDURE UpdateRDSServerSettings
GO
CREATE PROCEDURE UpdateRDSServerSettings
(
@ServerId int,
@SettingsName nvarchar(50),
@Xml ntext
)
AS
BEGIN TRAN
DECLARE @idoc int
EXEC sp_xml_preparedocument @idoc OUTPUT, @xml
DELETE FROM RDSServerSettings
WHERE RDSServerId = @ServerId AND SettingsName = @SettingsName
INSERT INTO RDSServerSettings
(
RDSServerId,
SettingsName,
ApplyUsers,
ApplyAdministrators,
PropertyName,
PropertyValue
)
SELECT
@ServerId,
@SettingsName,
ApplyUsers,
ApplyAdministrators,
PropertyName,
PropertyValue
FROM OPENXML(@idoc, '/properties/property',1) WITH
(
PropertyName nvarchar(50) '@name',
PropertyValue ntext '@value',
ApplyUsers BIT '@applyUsers',
ApplyAdministrators BIT '@applyAdministrators'
) as PV
exec sp_xml_removedocument @idoc
COMMIT TRAN
RETURN
GO
IF EXISTS (SELECT * FROM ResourceGroups WHERE GroupName = 'SharePoint')
BEGIN
DECLARE @group_id INT
SELECT @group_id = GroupId FROM ResourceGroups WHERE GroupName = 'SharePoint'
DELETE FROM Providers WHERE GroupID = @group_id
DELETE FROM Quotas WHERE GroupID = @group_id
DELETE FROM VirtualGroups WHERE GroupID = @group_id
DELETE FROM ServiceItemTypes WHERE GroupID = @group_id
DELETE FROM ResourceGroups WHERE GroupID = @group_id
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[ServiceItemTypes] WHERE DisplayName = 'SharePointFoundationSiteCollection')
BEGIN
DECLARE @group_id AS INT
DECLARE @item_type_id INT
SELECT TOP 1 @item_type_id = ItemTypeId + 1 FROM [dbo].[ServiceItemTypes] ORDER BY ItemTypeId DESC
UPDATE [dbo].[ServiceItemTypes] SET DisplayName = 'SharePointFoundationSiteCollection' WHERE DisplayName = 'SharePointSiteCollection'
SELECT @group_id = GroupId FROM [dbo].[ResourceGroups] WHERE GroupName = 'Sharepoint Server'
INSERT INTO [dbo].[ServiceItemTypes] (ItemTypeId, GroupId, DisplayName, TypeName, TypeOrder, CalculateDiskSpace, CalculateBandwidth, Suspendable, Disposable, Searchable, Importable, Backupable)
(SELECT TOP 1 @item_type_id, @group_id, 'SharePointSiteCollection', TypeName, 100, CalculateDiskSpace, CalculateBandwidth, Suspendable, Disposable, Searchable, Importable, Backupable FROM [dbo].[ServiceItemTypes] WHERE DisplayName = 'SharePointFoundationSiteCollection')
END
GO

View file

@ -48,7 +48,7 @@ namespace WebsitePanel.EnterpriseServer
public const string SharepointServer = "Sharepoint Server"; public const string SharepointServer = "Sharepoint Server";
public const string Exchange = "Exchange"; public const string Exchange = "Exchange";
public const string HostedOrganizations = "Hosted Organizations"; public const string HostedOrganizations = "Hosted Organizations";
public const string HostedCRM = "Hosted CRM"; public const string HostedCRM = "Hosted CRM"; // CRM 4/2011
public const string HostedCRM2013 = "Hosted CRM2013"; // CRM 2013/2015 public const string HostedCRM2013 = "Hosted CRM2013"; // CRM 2013/2015
public const string VPS = "VPS"; public const string VPS = "VPS";
public const string BlackBerry = "BlackBerry"; public const string BlackBerry = "BlackBerry";

View file

@ -64,6 +64,7 @@ namespace WebsitePanel.EnterpriseServer
public const string DEFAULT_MAILBOXPLANS = "DefaultMailboxPlans"; public const string DEFAULT_MAILBOXPLANS = "DefaultMailboxPlans";
public const string DEFAULT_LYNCUSERPLANS = "DefaultLyncUserPlans"; public const string DEFAULT_LYNCUSERPLANS = "DefaultLyncUserPlans";
public const string RDS_SETUP_LETTER = "RDSSetupLetter"; public const string RDS_SETUP_LETTER = "RDSSetupLetter";
public const string RDS_POLICY = "RdsPolicy";
public int UserId; public int UserId;
public string SettingsName; public string SettingsName;

View file

@ -242,7 +242,9 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<Folder Include="RDS\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -47,6 +47,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted; private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted;
private System.Threading.SendOrPostCallback GetUserRootFoldersOperationCompleted;
private System.Threading.SendOrPostCallback GetEnterpriseFolderOperationCompleted; private System.Threading.SendOrPostCallback GetEnterpriseFolderOperationCompleted;
private System.Threading.SendOrPostCallback CreateEnterpriseFolderOperationCompleted; private System.Threading.SendOrPostCallback CreateEnterpriseFolderOperationCompleted;
@ -128,6 +130,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event GetEnterpriseFoldersCompletedEventHandler GetEnterpriseFoldersCompleted; public event GetEnterpriseFoldersCompletedEventHandler GetEnterpriseFoldersCompleted;
/// <remarks/>
public event GetUserRootFoldersCompletedEventHandler GetUserRootFoldersCompleted;
/// <remarks/> /// <remarks/>
public event GetEnterpriseFolderCompletedEventHandler GetEnterpriseFolderCompleted; public event GetEnterpriseFolderCompletedEventHandler GetEnterpriseFolderCompleted;
@ -456,6 +461,56 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUserRootFolders", 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 SystemFile[] GetUserRootFolders(int itemId, int accountId, string userName, string displayName) {
object[] results = this.Invoke("GetUserRootFolders", new object[] {
itemId,
accountId,
userName,
displayName});
return ((SystemFile[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetUserRootFolders(int itemId, int accountId, string userName, string displayName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetUserRootFolders", new object[] {
itemId,
accountId,
userName,
displayName}, callback, asyncState);
}
/// <remarks/>
public SystemFile[] EndGetUserRootFolders(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((SystemFile[])(results[0]));
}
/// <remarks/>
public void GetUserRootFoldersAsync(int itemId, int accountId, string userName, string displayName) {
this.GetUserRootFoldersAsync(itemId, accountId, userName, displayName, null);
}
/// <remarks/>
public void GetUserRootFoldersAsync(int itemId, int accountId, string userName, string displayName, object userState) {
if ((this.GetUserRootFoldersOperationCompleted == null)) {
this.GetUserRootFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserRootFoldersOperationCompleted);
}
this.InvokeAsync("GetUserRootFolders", new object[] {
itemId,
accountId,
userName,
displayName}, this.GetUserRootFoldersOperationCompleted, userState);
}
private void OnGetUserRootFoldersOperationCompleted(object arg) {
if ((this.GetUserRootFoldersCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetUserRootFoldersCompleted(this, new GetUserRootFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolder", 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 SystemFile GetEnterpriseFolder(int itemId, string folderName) { public SystemFile GetEnterpriseFolder(int itemId, string folderName) {
@ -1933,6 +1988,32 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetUserRootFoldersCompletedEventHandler(object sender, GetUserRootFoldersCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetUserRootFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetUserRootFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public SystemFile[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((SystemFile[])(this.results[0]));
}
}
}
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e); public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e);

View file

@ -1,35 +1,7 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.1433 // Runtime Version:2.0.50727.7905
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -37,22 +9,21 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// //
// This source code was auto-generated by wsdl, Version=2.0.50727.42. // This source code was auto-generated by wsdl, Version=2.0.50727.3038.
// //
using WebsitePanel.Providers;
using WebsitePanel.Providers.SharePoint;
namespace WebsitePanel.EnterpriseServer { namespace WebsitePanel.EnterpriseServer {
using System.Diagnostics; using System.Xml.Serialization;
using System.Web.Services; using System.Web.Services;
using System.ComponentModel; using System.ComponentModel;
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using System; using System;
using System.Xml.Serialization; using System.Diagnostics;
using WebsitePanel.Providers.SharePoint;
using WebsitePanel.Providers;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="esHostedSharePointServersSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] [System.Web.Services.WebServiceBindingAttribute(Name="esHostedSharePointServersSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")]
@ -91,7 +62,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public esHostedSharePointServers() { public esHostedSharePointServers() {
this.Url = "http://localhost/WebsitePanelEnterpriseServer/esHostedSharePointServers.asmx"; this.Url = "http://localhost:9002/esHostedSharePointServers.asmx";
} }
/// <remarks/> /// <remarks/>
@ -141,7 +112,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", 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 SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) {
object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] { object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] {
packageId, packageId,
organizationId, organizationId,
@ -149,12 +120,13 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows}); maximumRows,
groupName});
return ((SharePointSiteCollectionListPaged)(results[0])); return ((SharePointSiteCollectionListPaged)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollectionsPaged", new object[] { return this.BeginInvoke("GetSiteCollectionsPaged", new object[] {
packageId, packageId,
organizationId, organizationId,
@ -162,7 +134,8 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows}, callback, asyncState); maximumRows,
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -172,12 +145,12 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) {
this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, object userState) {
if ((this.GetSiteCollectionsPagedOperationCompleted == null)) { if ((this.GetSiteCollectionsPagedOperationCompleted == null)) {
this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted); this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted);
} }
@ -188,7 +161,8 @@ namespace WebsitePanel.EnterpriseServer {
filterValue, filterValue,
sortColumn, sortColumn,
startRow, startRow,
maximumRows}, this.GetSiteCollectionsPagedOperationCompleted, userState); maximumRows,
groupName}, this.GetSiteCollectionsPagedOperationCompleted, userState);
} }
private void OnGetSiteCollectionsPagedOperationCompleted(object arg) { private void OnGetSiteCollectionsPagedOperationCompleted(object arg) {
@ -241,18 +215,20 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", 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 SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive) { public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive, string groupName) {
object[] results = this.Invoke("GetSiteCollections", new object[] { object[] results = this.Invoke("GetSiteCollections", new object[] {
packageId, packageId,
recursive}); recursive,
groupName});
return ((SharePointSiteCollection[])(results[0])); return ((SharePointSiteCollection[])(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollections", new object[] { return this.BeginInvoke("GetSiteCollections", new object[] {
packageId, packageId,
recursive}, callback, asyncState); recursive,
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -262,18 +238,19 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive) { public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName) {
this.GetSiteCollectionsAsync(packageId, recursive, null); this.GetSiteCollectionsAsync(packageId, recursive, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive, object userState) { public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName, object userState) {
if ((this.GetSiteCollectionsOperationCompleted == null)) { if ((this.GetSiteCollectionsOperationCompleted == null)) {
this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted); this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted);
} }
this.InvokeAsync("GetSiteCollections", new object[] { this.InvokeAsync("GetSiteCollections", new object[] {
packageId, packageId,
recursive}, this.GetSiteCollectionsOperationCompleted, userState); recursive,
groupName}, this.GetSiteCollectionsOperationCompleted, userState);
} }
private void OnGetSiteCollectionsOperationCompleted(object arg) { private void OnGetSiteCollectionsOperationCompleted(object arg) {
@ -420,16 +397,18 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddSiteCollection(SharePointSiteCollection item) { public int AddSiteCollection(SharePointSiteCollection item, string groupName) {
object[] results = this.Invoke("AddSiteCollection", new object[] { object[] results = this.Invoke("AddSiteCollection", new object[] {
item}); item,
groupName});
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, System.AsyncCallback callback, object asyncState) { public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddSiteCollection", new object[] { return this.BeginInvoke("AddSiteCollection", new object[] {
item}, callback, asyncState); item,
groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -439,17 +418,18 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item) { public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName) {
this.AddSiteCollectionAsync(item, null); this.AddSiteCollectionAsync(item, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item, object userState) { public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName, object userState) {
if ((this.AddSiteCollectionOperationCompleted == null)) { if ((this.AddSiteCollectionOperationCompleted == null)) {
this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted); this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted);
} }
this.InvokeAsync("AddSiteCollection", new object[] { this.InvokeAsync("AddSiteCollection", new object[] {
item}, this.AddSiteCollectionOperationCompleted, userState); item,
groupName}, this.AddSiteCollectionOperationCompleted, userState);
} }
private void OnAddSiteCollectionOperationCompleted(object arg) { private void OnAddSiteCollectionOperationCompleted(object arg) {
@ -839,16 +819,12 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSiteCollectionsPagedCompletedEventHandler(object sender, GetSiteCollectionsPagedCompletedEventArgs e); public delegate void GetSiteCollectionsPagedCompletedEventHandler(object sender, GetSiteCollectionsPagedCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSiteCollectionsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetSiteCollectionsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -870,11 +846,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSupportedLanguagesCompletedEventHandler(object sender, GetSupportedLanguagesCompletedEventArgs e); public delegate void GetSupportedLanguagesCompletedEventHandler(object sender, GetSupportedLanguagesCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -896,11 +872,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSiteCollectionsCompletedEventHandler(object sender, GetSiteCollectionsCompletedEventArgs e); public delegate void GetSiteCollectionsCompletedEventHandler(object sender, GetSiteCollectionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -922,11 +898,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetStorageSettingsCompletedEventHandler(object sender, SetStorageSettingsCompletedEventArgs e); public delegate void SetStorageSettingsCompletedEventHandler(object sender, SetStorageSettingsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetStorageSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class SetStorageSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -948,11 +924,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSiteCollectionCompletedEventHandler(object sender, GetSiteCollectionCompletedEventArgs e); public delegate void GetSiteCollectionCompletedEventHandler(object sender, GetSiteCollectionCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -974,11 +950,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSiteCollectionByDomainCompletedEventHandler(object sender, GetSiteCollectionByDomainCompletedEventArgs e); public delegate void GetSiteCollectionByDomainCompletedEventHandler(object sender, GetSiteCollectionByDomainCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSiteCollectionByDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetSiteCollectionByDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1000,11 +976,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddSiteCollectionCompletedEventHandler(object sender, AddSiteCollectionCompletedEventArgs e); public delegate void AddSiteCollectionCompletedEventHandler(object sender, AddSiteCollectionCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class AddSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1026,11 +1002,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSiteCollectionCompletedEventHandler(object sender, DeleteSiteCollectionCompletedEventArgs e); public delegate void DeleteSiteCollectionCompletedEventHandler(object sender, DeleteSiteCollectionCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class DeleteSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1052,11 +1028,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSiteCollectionsCompletedEventHandler(object sender, DeleteSiteCollectionsCompletedEventArgs e); public delegate void DeleteSiteCollectionsCompletedEventHandler(object sender, DeleteSiteCollectionsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class DeleteSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1078,11 +1054,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void BackupSiteCollectionCompletedEventHandler(object sender, BackupSiteCollectionCompletedEventArgs e); public delegate void BackupSiteCollectionCompletedEventHandler(object sender, BackupSiteCollectionCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1104,11 +1080,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void RestoreSiteCollectionCompletedEventHandler(object sender, RestoreSiteCollectionCompletedEventArgs e); public delegate void RestoreSiteCollectionCompletedEventHandler(object sender, RestoreSiteCollectionCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RestoreSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class RestoreSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1130,11 +1106,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetBackupBinaryChunkCompletedEventHandler(object sender, GetBackupBinaryChunkCompletedEventArgs e); public delegate void GetBackupBinaryChunkCompletedEventHandler(object sender, GetBackupBinaryChunkCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class GetBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1156,11 +1132,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AppendBackupBinaryChunkCompletedEventHandler(object sender, AppendBackupBinaryChunkCompletedEventArgs e); public delegate void AppendBackupBinaryChunkCompletedEventHandler(object sender, AppendBackupBinaryChunkCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AppendBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class AppendBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1182,11 +1158,11 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CalculateSharePointSitesDiskSpaceCompletedEventHandler(object sender, CalculateSharePointSitesDiskSpaceCompletedEventArgs e); public delegate void CalculateSharePointSitesDiskSpaceCompletedEventHandler(object sender, CalculateSharePointSitesDiskSpaceCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CalculateSharePointSitesDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { public partial class CalculateSharePointSitesDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -1216,6 +1192,6 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateQuotaCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void UpdateQuotaCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
} }

View file

@ -18,9 +18,10 @@ namespace WebsitePanel.EnterpriseServer {
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.RemoteDesktopServices;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer.Base.RDS;
/// <remarks/> /// <remarks/>
@ -132,6 +133,10 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback SendRdsSetupLetterOperationCompleted; private System.Threading.SendOrPostCallback SendRdsSetupLetterOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsServerSettingsOperationCompleted;
private System.Threading.SendOrPostCallback UpdateRdsServerSettingsOperationCompleted;
/// <remarks/> /// <remarks/>
public esRemoteDesktopServices() { public esRemoteDesktopServices() {
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
@ -290,6 +295,12 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event SendRdsSetupLetterCompletedEventHandler SendRdsSetupLetterCompleted; public event SendRdsSetupLetterCompletedEventHandler SendRdsSetupLetterCompleted;
/// <remarks/>
public event GetRdsServerSettingsCompletedEventHandler GetRdsServerSettingsCompleted;
/// <remarks/>
public event UpdateRdsServerSettingsCompletedEventHandler UpdateRdsServerSettingsCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", 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 RdsCollection GetRdsCollection(int collectionId) { public RdsCollection GetRdsCollection(int collectionId) {
@ -2569,6 +2580,97 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerSettings", 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 RdsServerSettings GetRdsServerSettings(int serverId, string settingsName) {
object[] results = this.Invoke("GetRdsServerSettings", new object[] {
serverId,
settingsName});
return ((RdsServerSettings)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsServerSettings(int serverId, string settingsName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsServerSettings", new object[] {
serverId,
settingsName}, callback, asyncState);
}
/// <remarks/>
public RdsServerSettings EndGetRdsServerSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsServerSettings)(results[0]));
}
/// <remarks/>
public void GetRdsServerSettingsAsync(int serverId, string settingsName) {
this.GetRdsServerSettingsAsync(serverId, settingsName, null);
}
/// <remarks/>
public void GetRdsServerSettingsAsync(int serverId, string settingsName, object userState) {
if ((this.GetRdsServerSettingsOperationCompleted == null)) {
this.GetRdsServerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerSettingsOperationCompleted);
}
this.InvokeAsync("GetRdsServerSettings", new object[] {
serverId,
settingsName}, this.GetRdsServerSettingsOperationCompleted, userState);
}
private void OnGetRdsServerSettingsOperationCompleted(object arg) {
if ((this.GetRdsServerSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsServerSettingsCompleted(this, new GetRdsServerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateRdsServerSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings) {
object[] results = this.Invoke("UpdateRdsServerSettings", new object[] {
serverId,
settingsName,
settings});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginUpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UpdateRdsServerSettings", new object[] {
serverId,
settingsName,
settings}, callback, asyncState);
}
/// <remarks/>
public int EndUpdateRdsServerSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void UpdateRdsServerSettingsAsync(int serverId, string settingsName, RdsServerSettings settings) {
this.UpdateRdsServerSettingsAsync(serverId, settingsName, settings, null);
}
/// <remarks/>
public void UpdateRdsServerSettingsAsync(int serverId, string settingsName, RdsServerSettings settings, object userState) {
if ((this.UpdateRdsServerSettingsOperationCompleted == null)) {
this.UpdateRdsServerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateRdsServerSettingsOperationCompleted);
}
this.InvokeAsync("UpdateRdsServerSettings", new object[] {
serverId,
settingsName,
settings}, this.UpdateRdsServerSettingsOperationCompleted, userState);
}
private void OnUpdateRdsServerSettingsOperationCompleted(object arg) {
if ((this.UpdateRdsServerSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateRdsServerSettingsCompleted(this, new UpdateRdsServerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -3900,4 +4002,56 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsServerSettingsCompletedEventHandler(object sender, GetRdsServerSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsServerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsServerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsServerSettings Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsServerSettings)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateRdsServerSettingsCompletedEventHandler(object sender, UpdateRdsServerSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdateRdsServerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal UpdateRdsServerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
} }

View file

@ -29,7 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074 // Runtime Version:2.0.50727.5466
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -40,7 +40,6 @@
// This source code was auto-generated by wsdl, Version=2.0.50727.42. // This source code was auto-generated by wsdl, Version=2.0.50727.42.
// //
namespace WebsitePanel.EnterpriseServer { namespace WebsitePanel.EnterpriseServer {
using System.Xml.Serialization; using System.Xml.Serialization;
using System.Web.Services; using System.Web.Services;
using System.ComponentModel; using System.ComponentModel;
@ -50,7 +49,7 @@ namespace WebsitePanel.EnterpriseServer {
using WebsitePanel.Providers; using WebsitePanel.Providers;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.Virtualization; using WebsitePanel.Providers.Virtualization;
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
@ -171,9 +170,11 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback SendVirtualMachineSummaryLetterOperationCompleted; private System.Threading.SendOrPostCallback SendVirtualMachineSummaryLetterOperationCompleted;
/// <remarks/> /// <remarks/>
public esVirtualizationServer() { public esVirtualizationServer()
{
this.Url = "http://127.0.0.1:9002/esVirtualizationServer.asmx"; this.Url = "http://127.0.0.1:9002/esVirtualizationServer.asmx";
} }
/// <remarks/> /// <remarks/>
public event GetVirtualMachinesCompletedEventHandler GetVirtualMachinesCompleted; public event GetVirtualMachinesCompletedEventHandler GetVirtualMachinesCompleted;
@ -339,7 +340,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event SendVirtualMachineSummaryLetterCompletedEventHandler SendVirtualMachineSummaryLetterCompleted; public event SendVirtualMachineSummaryLetterCompletedEventHandler SendVirtualMachineSummaryLetterCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualMachines", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualMachines", 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 VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) { public VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) {
@ -949,8 +950,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOperatingSystemTemplatesByServi" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOperatingSystemTemplatesByService" +
"ceId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "Id", 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 LibraryItem[] GetOperatingSystemTemplatesByServiceId(int serviceId) { public LibraryItem[] GetOperatingSystemTemplatesByServiceId(int serviceId) {
object[] results = this.Invoke("GetOperatingSystemTemplatesByServiceId", new object[] { object[] results = this.Invoke("GetOperatingSystemTemplatesByServiceId", new object[] {
serviceId}); serviceId});
@ -1133,6 +1134,7 @@ namespace WebsitePanel.EnterpriseServer {
string osTemplateFile, string osTemplateFile,
string password, string password,
string summaryLetterEmail, string summaryLetterEmail,
int generation,
int cpuCores, int cpuCores,
int ramMB, int ramMB,
int hddGB, int hddGB,
@ -1159,6 +1161,7 @@ namespace WebsitePanel.EnterpriseServer {
osTemplateFile, osTemplateFile,
password, password,
summaryLetterEmail, summaryLetterEmail,
generation,
cpuCores, cpuCores,
ramMB, ramMB,
hddGB, hddGB,
@ -1189,6 +1192,7 @@ namespace WebsitePanel.EnterpriseServer {
string osTemplateFile, string osTemplateFile,
string password, string password,
string summaryLetterEmail, string summaryLetterEmail,
int generation,
int cpuCores, int cpuCores,
int ramMB, int ramMB,
int hddGB, int hddGB,
@ -1217,6 +1221,7 @@ namespace WebsitePanel.EnterpriseServer {
osTemplateFile, osTemplateFile,
password, password,
summaryLetterEmail, summaryLetterEmail,
generation,
cpuCores, cpuCores,
ramMB, ramMB,
hddGB, hddGB,
@ -1252,6 +1257,7 @@ namespace WebsitePanel.EnterpriseServer {
string osTemplateFile, string osTemplateFile,
string password, string password,
string summaryLetterEmail, string summaryLetterEmail,
int generation,
int cpuCores, int cpuCores,
int ramMB, int ramMB,
int hddGB, int hddGB,
@ -1272,7 +1278,7 @@ namespace WebsitePanel.EnterpriseServer {
int privateAddressesNumber, int privateAddressesNumber,
bool randomPrivateAddresses, bool randomPrivateAddresses,
string[] privateAddresses) { string[] privateAddresses) {
this.CreateVirtualMachineAsync(packageId, hostname, osTemplateFile, password, summaryLetterEmail, cpuCores, ramMB, hddGB, snapshots, dvdInstalled, bootFromCD, numLock, startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed, externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses, privateNetworkEnabled, privateAddressesNumber, randomPrivateAddresses, privateAddresses, null); this.CreateVirtualMachineAsync(packageId, hostname, osTemplateFile, password, summaryLetterEmail, generation, cpuCores, ramMB, hddGB, snapshots, dvdInstalled, bootFromCD, numLock, startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed, externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses, privateNetworkEnabled, privateAddressesNumber, randomPrivateAddresses, privateAddresses, null);
} }
/// <remarks/> /// <remarks/>
@ -1282,6 +1288,7 @@ namespace WebsitePanel.EnterpriseServer {
string osTemplateFile, string osTemplateFile,
string password, string password,
string summaryLetterEmail, string summaryLetterEmail,
int generation,
int cpuCores, int cpuCores,
int ramMB, int ramMB,
int hddGB, int hddGB,
@ -1312,6 +1319,7 @@ namespace WebsitePanel.EnterpriseServer {
osTemplateFile, osTemplateFile,
password, password,
summaryLetterEmail, summaryLetterEmail,
generation,
cpuCores, cpuCores,
ramMB, ramMB,
hddGB, hddGB,
@ -2462,8 +2470,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualMachineExternalIPAddress" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualMachineExternalIPAddresses" +
"es", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "", 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 ResultObject AddVirtualMachineExternalIPAddresses(int itemId, bool selectRandom, int addressesNumber, int[] addressId) { public ResultObject AddVirtualMachineExternalIPAddresses(int itemId, bool selectRandom, int addressesNumber, int[] addressId) {
object[] results = this.Invoke("AddVirtualMachineExternalIPAddresses", new object[] { object[] results = this.Invoke("AddVirtualMachineExternalIPAddresses", new object[] {
itemId, itemId,
@ -2513,8 +2521,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVirtualMachinePrimaryExternalIP" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVirtualMachinePrimaryExternalIPAd" +
"Address", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "dress", 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 ResultObject SetVirtualMachinePrimaryExternalIPAddress(int itemId, int addressId) { public ResultObject SetVirtualMachinePrimaryExternalIPAddress(int itemId, int addressId) {
object[] results = this.Invoke("SetVirtualMachinePrimaryExternalIPAddress", new object[] { object[] results = this.Invoke("SetVirtualMachinePrimaryExternalIPAddress", new object[] {
itemId, itemId,
@ -2558,8 +2566,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualMachineExternalIPAddr" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualMachineExternalIPAddres" +
"esses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "ses", 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 ResultObject DeleteVirtualMachineExternalIPAddresses(int itemId, int[] addressId) { public ResultObject DeleteVirtualMachineExternalIPAddresses(int itemId, int[] addressId) {
object[] results = this.Invoke("DeleteVirtualMachineExternalIPAddresses", new object[] { object[] results = this.Invoke("DeleteVirtualMachineExternalIPAddresses", new object[] {
itemId, itemId,
@ -2644,8 +2652,7 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualMachinePrivateIPAddresse" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualMachinePrivateIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
"s", 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 ResultObject AddVirtualMachinePrivateIPAddresses(int itemId, bool selectRandom, int addressesNumber, string[] addresses) { public ResultObject AddVirtualMachinePrivateIPAddresses(int itemId, bool selectRandom, int addressesNumber, string[] addresses) {
object[] results = this.Invoke("AddVirtualMachinePrivateIPAddresses", new object[] { object[] results = this.Invoke("AddVirtualMachinePrivateIPAddresses", new object[] {
itemId, itemId,
@ -2695,8 +2702,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVirtualMachinePrimaryPrivateIPA" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVirtualMachinePrimaryPrivateIPAdd" +
"ddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "ress", 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 ResultObject SetVirtualMachinePrimaryPrivateIPAddress(int itemId, int addressId) { public ResultObject SetVirtualMachinePrimaryPrivateIPAddress(int itemId, int addressId) {
object[] results = this.Invoke("SetVirtualMachinePrimaryPrivateIPAddress", new object[] { object[] results = this.Invoke("SetVirtualMachinePrimaryPrivateIPAddress", new object[] {
itemId, itemId,
@ -2740,8 +2747,8 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualMachinePrivateIPAddre" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualMachinePrivateIPAddress" +
"sses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] "es", 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 ResultObject DeleteVirtualMachinePrivateIPAddresses(int itemId, int[] addressId) { public ResultObject DeleteVirtualMachinePrivateIPAddresses(int itemId, int[] addressId) {
object[] results = this.Invoke("DeleteVirtualMachinePrivateIPAddresses", new object[] { object[] results = this.Invoke("DeleteVirtualMachinePrivateIPAddresses", new object[] {
itemId, itemId,
@ -2826,8 +2833,7 @@ namespace WebsitePanel.EnterpriseServer {
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateVirtualMachineUserPermission" + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateVirtualMachineUserPermissions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
"s", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int UpdateVirtualMachineUserPermissions(int itemId, VirtualMachinePermission[] permissions) { public int UpdateVirtualMachineUserPermissions(int itemId, VirtualMachinePermission[] permissions) {
object[] results = this.Invoke("UpdateVirtualMachineUserPermissions", new object[] { object[] results = this.Invoke("UpdateVirtualMachineUserPermissions", new object[] {
itemId, itemId,
@ -3112,36 +3118,8 @@ namespace WebsitePanel.EnterpriseServer {
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
} }
} }
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetVirtualMachinesCompletedEventHandler(object sender, GetVirtualMachinesCompletedEventArgs e); public delegate void GetVirtualMachinesCompletedEventHandler(object sender, GetVirtualMachinesCompletedEventArgs e);
@ -4602,5 +4580,4 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
} }
} }

View file

@ -4676,6 +4676,23 @@ namespace WebsitePanel.EnterpriseServer
#region RDS #region RDS
public static IDataReader GetRdsServerSettings(int serverId, string settingsName)
{
return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetRDSServerSettings",
new SqlParameter("@ServerId", serverId),
new SqlParameter("@SettingsName", settingsName));
}
public static void UpdateRdsServerSettings(int serverId, string settingsName, string xml)
{
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "UpdateRDSServerSettings",
new SqlParameter("@ServerId", serverId),
new SqlParameter("@SettingsName", settingsName),
new SqlParameter("@Xml", xml));
}
public static int AddRdsCertificate(int serviceId, string content, byte[] hash, string fileName, DateTime? validFrom, DateTime? expiryDate) public static int AddRdsCertificate(int serviceId, string content, byte[] hash, string fileName, DateTime? validFrom, DateTime? expiryDate)
{ {
SqlParameter rdsCertificateId = new SqlParameter("@RDSCertificateID", SqlDbType.Int); SqlParameter rdsCertificateId = new SqlParameter("@RDSCertificateID", SqlDbType.Int);
@ -4922,6 +4939,16 @@ namespace WebsitePanel.EnterpriseServer
); );
} }
public static void DeleteRDSServerSettings(int serverId)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"DeleteRDSServerSettings",
new SqlParameter("@ServerId", serverId)
);
}
public static void DeleteRDSCollection(int id) public static void DeleteRDSCollection(int id)
{ {
SqlHelper.ExecuteNonQuery( SqlHelper.ExecuteNonQuery(

View file

@ -76,6 +76,11 @@ namespace WebsitePanel.EnterpriseServer
return GetFoldersInternal(itemId); return GetFoldersInternal(itemId);
} }
public static SystemFile[] GetUserRootFolders(int itemId, int accountId, string userName, string displayName)
{
return GetUserRootFoldersInternal(itemId, accountId, userName, displayName);
}
public static SystemFile GetFolder(int itemId, string folderName) public static SystemFile GetFolder(int itemId, string folderName)
{ {
return GetFolderInternal(itemId, folderName); return GetFolderInternal(itemId, folderName);
@ -554,6 +559,57 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
protected static SystemFile[] GetUserRootFoldersInternal(int itemId, int accountId, string userName, string displayName)
{
try
{
var rootFolders = new List<SystemFile>();
// load organization
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
return new SystemFile[0];
}
int serviceId = GetEnterpriseStorageServiceID(org.PackageId);
if (serviceId == 0)
{
return new SystemFile[0];
}
EnterpriseStorage es = GetEnterpriseStorage(serviceId);
var webDavSettings = ObjectUtils.CreateListFromDataReader<WebDavSetting>(
DataProvider.GetEnterpriseFolders(itemId)).ToArray();
var userGroups = OrganizationController.GetSecurityGroupsByMember(itemId, accountId);
foreach (var folder in es.GetFolders(org.OrganizationId, webDavSettings))
{
var permissions = ConvertToESPermission(itemId,folder.Rules);
foreach (var permission in permissions)
{
if ((!permission.IsGroup
&& (permission.DisplayName == userName || permission.DisplayName == displayName))
|| (permission.IsGroup && userGroups.Any(x => x.DisplayName == permission.DisplayName)))
{
rootFolders.Add(folder);
break;
}
}
}
return rootFolders.ToArray();
}
catch (Exception ex)
{
throw ex;
}
}
protected static SystemFile GetFolderInternal(int itemId, string folderName) protected static SystemFile GetFolderInternal(int itemId, string folderName)
{ {
try try

View file

@ -45,6 +45,7 @@ using WebsitePanel.Providers.RemoteDesktopServices;
using WebsitePanel.Providers.Web; using WebsitePanel.Providers.Web;
using System.Net.Mail; using System.Net.Mail;
using System.Collections; using System.Collections;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -320,6 +321,82 @@ namespace WebsitePanel.EnterpriseServer
return SendRdsSetupLetterInternal(itemId, accountId, to, cc); return SendRdsSetupLetterInternal(itemId, accountId, to, cc);
} }
public static RdsServerSettings GetRdsServerSettings(int serverId, string settingsName)
{
return GetRdsServerSettingsInternal(serverId, settingsName);
}
public static int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings)
{
return UpdateRdsServerSettingsInternal(serverId, settingsName, settings);
}
private static RdsServerSettings GetRdsServerSettingsInternal(int serverId, string settingsName)
{
IDataReader reader = DataProvider.GetRdsServerSettings(serverId, settingsName);
var settings = new RdsServerSettings();
settings.ServerId = serverId;
settings.SettingsName = settingsName;
while (reader.Read())
{
settings.Settings.Add(new RdsServerSetting
{
PropertyName = (string)reader["PropertyName"],
PropertyValue = (string)reader["PropertyValue"],
ApplyAdministrators = Convert.ToBoolean(reader["ApplyAdministrators"]),
ApplyUsers = Convert.ToBoolean(reader["ApplyUsers"])
});
}
reader.Close();
return settings;
}
private static int UpdateRdsServerSettingsInternal(int serverId, string settingsName, RdsServerSettings settings)
{
TaskManager.StartTask("REMOTE_DESKTOP_SERVICES", "UPDATE_SETTINGS");
try
{
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(serverId));
var rds = GetRemoteDesktopServices(GetRdsServiceId(collection.ItemId));
rds.ApplyGPO(collection.Name, settings);
XmlDocument doc = new XmlDocument();
XmlElement nodeProps = doc.CreateElement("properties");
if (settings != null)
{
foreach (var setting in settings.Settings)
{
XmlElement nodeProp = doc.CreateElement("property");
nodeProp.SetAttribute("name", setting.PropertyName);
nodeProp.SetAttribute("value", setting.PropertyValue);
nodeProp.SetAttribute("applyUsers", setting.ApplyUsers ? "1" : "0");
nodeProp.SetAttribute("applyAdministrators", setting.ApplyAdministrators ? "1" : "0");
nodeProps.AppendChild(nodeProp);
}
}
string xml = nodeProps.OuterXml;
DataProvider.UpdateRdsServerSettings(serverId, settingsName, xml);
return 0;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
private static string GetRdsSetupLetterInternal(int itemId, int? accountId) private static string GetRdsSetupLetterInternal(int itemId, int? accountId)
{ {
Organization org = OrganizationController.GetOrganization(itemId); Organization org = OrganizationController.GetOrganization(itemId);
@ -670,7 +747,8 @@ namespace WebsitePanel.EnterpriseServer
AuthenticateUsingNLA = true AuthenticateUsingNLA = true
}; };
rds.CreateCollection(org.OrganizationId, collection); rds.CreateCollection(org.OrganizationId, collection);
rds.ApplyGPO(collection.Name, GetDefaultGpoSettings());
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName); collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName);
collection.Settings.RdsCollectionId = collection.Id; collection.Settings.RdsCollectionId = collection.Id;
@ -843,6 +921,7 @@ namespace WebsitePanel.EnterpriseServer
var servers = ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToArray(); var servers = ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToArray();
rds.RemoveCollection(org.OrganizationId, collection.Name, servers); rds.RemoveCollection(org.OrganizationId, collection.Name, servers);
DataProvider.DeleteRDSServerSettings(collection.Id);
DataProvider.DeleteRDSCollection(collection.Id); DataProvider.DeleteRDSCollection(collection.Id);
} }
catch (Exception ex) catch (Exception ex)
@ -1279,7 +1358,7 @@ namespace WebsitePanel.EnterpriseServer
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
RdsServer rdsServer = GetRdsServer(serverId); RdsServer rdsServer = GetRdsServer(serverId);
rds.MoveRdsServerToTenantOU(rdsServer.FqdName, org.OrganizationId); rds.MoveRdsServerToTenantOU(rdsServer.FqdName, org.OrganizationId);
DataProvider.AddRDSServerToOrganization(itemId, serverId); DataProvider.AddRDSServerToOrganization(itemId, serverId);
} }
@ -1949,5 +2028,77 @@ namespace WebsitePanel.EnterpriseServer
return PackageController.EvaluateTemplate(template, items); return PackageController.EvaluateTemplate(template, items);
} }
private static RdsServerSettings GetDefaultGpoSettings()
{
var defaultSettings = UserController.GetUserSettings(SecurityContext.User.UserId, UserSettings.RDS_POLICY);
var settings = new RdsServerSettings();
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.LOCK_SCREEN_TIMEOUT,
PropertyValue = defaultSettings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE],
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_RUN_COMMAND,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_POWERSHELL_COMMAND,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.HIDE_C_DRIVE,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.HIDE_C_DRIVE_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_SHUTDOWN_RESTART,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.DISABLE_TASK_MANAGER,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.CHANGE_DESKTOP_DISABLED,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.SCREEN_SAVER_DISABLED,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS])
});
return settings;
}
} }
} }

View file

@ -58,18 +58,18 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
/// <param name="startRow">Row index to start from.</param> /// <param name="startRow">Row index to start from.</param>
/// <param name="maximumRows">Maximum number of rows to retrieve.</param> /// <param name="maximumRows">Maximum number of rows to retrieve.</param>
/// <returns>Site collections that match.</returns> /// <returns>Site collections that match.</returns>
public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName = null)
{ {
if (IsDemoMode) if (IsDemoMode)
{ {
SharePointSiteCollectionListPaged demoResult = new SharePointSiteCollectionListPaged(); SharePointSiteCollectionListPaged demoResult = new SharePointSiteCollectionListPaged();
demoResult.SiteCollections = GetSiteCollections(1, false); demoResult.SiteCollections = GetSiteCollections(1, false, null);
demoResult.TotalRowCount = demoResult.SiteCollections.Count; demoResult.TotalRowCount = demoResult.SiteCollections.Count;
return demoResult; return demoResult;
} }
SharePointSiteCollectionListPaged paged = new SharePointSiteCollectionListPaged(); SharePointSiteCollectionListPaged paged = new SharePointSiteCollectionListPaged();
DataSet result = PackageController.GetRawPackageItemsPaged(packageId, typeof(SharePointSiteCollection), DataSet result = PackageController.GetRawPackageItemsPaged(packageId, groupName, typeof(SharePointSiteCollection),
true, filterColumn, filterValue, sortColumn, startRow, Int32.MaxValue); true, filterColumn, filterValue, sortColumn, startRow, Int32.MaxValue);
List<SharePointSiteCollection> items = PackageController.CreateServiceItemsList(result, 1).ConvertAll<SharePointSiteCollection>(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); List<SharePointSiteCollection> items = PackageController.CreateServiceItemsList(result, 1).ConvertAll<SharePointSiteCollection>(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; });
@ -149,8 +149,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
/// </summary> /// </summary>
/// <param name="packageId">Package that owns site collections.</param> /// <param name="packageId">Package that owns site collections.</param>
/// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param> /// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>List of found site collections.</returns> /// <returns>List of found site collections.</returns>
public static List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive) public static List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive, string groupName)
{ {
if (IsDemoMode) if (IsDemoMode)
{ {
@ -183,7 +184,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
} }
List<ServiceProviderItem> items = PackageController.GetPackageItemsByType(packageId, typeof(SharePointSiteCollection), recursive); List<ServiceProviderItem> items = PackageController.GetPackageItemsByType(packageId, groupName, typeof(SharePointSiteCollection), recursive);
return items.ConvertAll<SharePointSiteCollection>(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); return items.ConvertAll<SharePointSiteCollection>(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; });
} }
@ -196,7 +197,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
{ {
if (IsDemoMode) if (IsDemoMode)
{ {
return GetSiteCollections(1, false)[itemId - 1]; return GetSiteCollections(1, false, null)[itemId - 1];
} }
SharePointSiteCollection item = PackageController.GetPackageItem(itemId) as SharePointSiteCollection; SharePointSiteCollection item = PackageController.GetPackageItem(itemId) as SharePointSiteCollection;
@ -207,8 +208,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
/// Adds SharePoint site collection. /// Adds SharePoint site collection.
/// </summary> /// </summary>
/// <param name="item">Site collection description.</param> /// <param name="item">Site collection description.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Created site collection id within metabase.</returns> /// <returns>Created site collection id within metabase.</returns>
public static int AddSiteCollection(SharePointSiteCollection item) public static int AddSiteCollection(SharePointSiteCollection item, string groupName)
{ {
// Check account. // Check account.
@ -236,7 +238,8 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
} }
// Check if stats resource is available // Check if stats resource is available
int serviceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.SharepointFoundationServer); int serviceId = PackageController.GetPackageServiceId(item.PackageId, groupName);
if (serviceId == 0) if (serviceId == 0)
{ {
return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE; return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE;
@ -271,9 +274,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
int counter = 0; int counter = 0;
item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot);
siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot); siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot);
while (DataProvider.CheckServiceItemExists(serviceId, item.Name, "WebsitePanel.Providers.SharePoint.SharePointSiteCollection, WebsitePanel.Providers.Base")) while (CheckServiceItemExists(item.Name, item.PackageId))
{ {
counter++; counter++;
item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot);
@ -303,7 +306,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
// Check package item with given name already exists. // Check package item with given name already exists.
if (PackageController.GetPackageItemByName(item.PackageId, item.Name, typeof(SharePointSiteCollection)) != null) if (PackageController.GetPackageItemByName(item.PackageId, groupName, item.Name, typeof(SharePointSiteCollection)) != null)
{ {
return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS; return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS;
} }
@ -1012,5 +1015,17 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
return (SecurityContext.CheckAccount(DemandAccount.NotDemo) < 0); return (SecurityContext.CheckAccount(DemandAccount.NotDemo) < 0);
} }
} }
private static bool CheckServiceItemExists(string name, int packageId)
{
bool exists = PackageController.GetPackageItemByName(packageId, ResourceGroups.SharepointFoundationServer, name, typeof(SharePointSiteCollection)) != null;
if (!exists)
{
exists = PackageController.GetPackageItemByName(packageId, ResourceGroups.SharepointServer, name, typeof(SharePointSiteCollection)) != null;
}
return exists;
}
} }
} }

View file

@ -40,6 +40,8 @@ using System.Text;
using System.Collections; using System.Collections;
using System.Net.Mail; using System.Net.Mail;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Net;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -252,6 +254,8 @@ namespace WebsitePanel.EnterpriseServer
return res; return res;
} }
int generation = 1;
// CPU cores // CPU cores
int cpuCores = cntx.Quotas[Quotas.VPS_CPU_NUMBER].QuotaAllocatedValue; int cpuCores = cntx.Quotas[Quotas.VPS_CPU_NUMBER].QuotaAllocatedValue;
if (cpuCores == -1) // unlimited is not possible if (cpuCores == -1) // unlimited is not possible
@ -305,7 +309,7 @@ namespace WebsitePanel.EnterpriseServer
// create server and return result // create server and return result
return CreateVirtualMachine(packageId, hostname, osTemplate, password, summaryLetterEmail, return CreateVirtualMachine(packageId, hostname, osTemplate, password, summaryLetterEmail,
cpuCores, ramMB, hddGB, snapshots, generation, cpuCores, ramMB, hddGB, snapshots,
dvdInstalled, bootFromCD, numLock, dvdInstalled, bootFromCD, numLock,
startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed, startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed,
externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses, externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses,
@ -314,7 +318,7 @@ namespace WebsitePanel.EnterpriseServer
public static IntResult CreateVirtualMachine(int packageId, public static IntResult CreateVirtualMachine(int packageId,
string hostname, string osTemplateFile, string password, string summaryLetterEmail, string hostname, string osTemplateFile, string password, string summaryLetterEmail,
int cpuCores, int ramMB, int hddGB, int snapshots, int generation, int cpuCores, int ramMB, int hddGB, int snapshots,
bool dvdInstalled, bool bootFromCD, bool numLock, bool dvdInstalled, bool bootFromCD, bool numLock,
bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed, bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed,
bool externalNetworkEnabled, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses, bool externalNetworkEnabled, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses,
@ -454,6 +458,7 @@ namespace WebsitePanel.EnterpriseServer
vm.CurrentTaskId = Guid.NewGuid().ToString("N"); // generate creation task id vm.CurrentTaskId = Guid.NewGuid().ToString("N"); // generate creation task id
vm.ProvisioningStatus = VirtualMachineProvisioningStatus.InProgress; vm.ProvisioningStatus = VirtualMachineProvisioningStatus.InProgress;
vm.Generation = generation;
vm.CpuCores = cpuCores; vm.CpuCores = cpuCores;
vm.RamSize = ramMB; vm.RamSize = ramMB;
vm.HddSize = hddGB; vm.HddSize = hddGB;
@ -516,8 +521,9 @@ namespace WebsitePanel.EnterpriseServer
} }
vm.RootFolderPath = EvaluateItemVariables(rootFolderPattern, vm); vm.RootFolderPath = EvaluateItemVariables(rootFolderPattern, vm);
vm.OperatingSystemTemplatePath = Path.Combine(templatesPath, osTemplateFile + ".vhd"); var correctVhdPath = GetCorrectTemplateFilePath(templatesPath, osTemplateFile);
vm.VirtualHardDrivePath = Path.Combine(vm.RootFolderPath, hostname + ".vhd"); vm.OperatingSystemTemplatePath = correctVhdPath;
vm.VirtualHardDrivePath = Path.Combine(vm.RootFolderPath, hostname + Path.GetExtension(correctVhdPath));
// save meta-item // save meta-item
try try
@ -577,6 +583,14 @@ namespace WebsitePanel.EnterpriseServer
return res; return res;
} }
private static string GetCorrectTemplateFilePath(string templatesPath, string osTemplateFile)
{
if (osTemplateFile.Trim().EndsWith(".vhdx"))
return Path.Combine(templatesPath, osTemplateFile);
return Path.Combine(templatesPath, osTemplateFile + ".vhd");
}
internal static void CreateVirtualMachineInternal(string taskId, VirtualMachine vm, LibraryItem osTemplate, internal static void CreateVirtualMachineInternal(string taskId, VirtualMachine vm, LibraryItem osTemplate,
int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses,
int privateAddressesNumber, bool randomPrivateAddresses, string[] privateAddresses, int privateAddressesNumber, bool randomPrivateAddresses, string[] privateAddresses,
@ -1195,7 +1209,8 @@ namespace WebsitePanel.EnterpriseServer
// set OS template // set OS template
string templatesPath = settings["OsTemplatesPath"]; string templatesPath = settings["OsTemplatesPath"];
item.OperatingSystemTemplatePath = Path.Combine(templatesPath, osTemplateFile + ".vhd"); var correctVhdPath = GetCorrectTemplateFilePath(templatesPath, osTemplateFile);
item.OperatingSystemTemplatePath = correctVhdPath;
try try
{ {
LibraryItem[] osTemplates = GetOperatingSystemTemplatesByServiceId(serviceId); LibraryItem[] osTemplates = GetOperatingSystemTemplatesByServiceId(serviceId);

View file

@ -92,6 +92,12 @@ namespace WebsitePanel.EnterpriseServer
return EnterpriseStorageController.GetFolders(itemId); return EnterpriseStorageController.GetFolders(itemId);
} }
[WebMethod]
public SystemFile[] GetUserRootFolders(int itemId, int accountId, string userName, string displayName)
{
return EnterpriseStorageController.GetUserRootFolders(itemId, accountId, userName, displayName);
}
[WebMethod] [WebMethod]
public SystemFile GetEnterpriseFolder(int itemId, string folderName) public SystemFile GetEnterpriseFolder(int itemId, string folderName)
{ {

View file

@ -55,13 +55,14 @@ namespace WebsitePanel.EnterpriseServer
/// <param name="sortColumn">Sort column name.</param> /// <param name="sortColumn">Sort column name.</param>
/// <param name="startRow">Row index to start from.</param> /// <param name="startRow">Row index to start from.</param>
/// <param name="maximumRows">Maximum number of rows to retrieve.</param> /// <param name="maximumRows">Maximum number of rows to retrieve.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Site collections in raw format.</returns> /// <returns>Site collections in raw format.</returns>
[WebMethod] [WebMethod]
public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName)
{ {
return HostedSharePointServerController.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, return HostedSharePointServerController.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue,
sortColumn, startRow, maximumRows); sortColumn, startRow, maximumRows, groupName);
} }
/// <summary> /// <summary>
@ -71,7 +72,7 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
public int[] GetSupportedLanguages(int packageId) public int[] GetSupportedLanguages(int packageId)
{ {
return HostedSharePointServerController.GetSupportedLanguages(packageId); return HostedSharePointServerController.GetSupportedLanguages(packageId);
} }
/// <summary> /// <summary>
@ -79,11 +80,12 @@ namespace WebsitePanel.EnterpriseServer
/// </summary> /// </summary>
/// <param name="packageId">Package that owns site collections.</param> /// <param name="packageId">Package that owns site collections.</param>
/// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param> /// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>List of found site collections.</returns> /// <returns>List of found site collections.</returns>
[WebMethod] [WebMethod]
public List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive) public List<SharePointSiteCollection> GetSiteCollections(int packageId, bool recursive, string groupName)
{ {
return HostedSharePointServerController.GetSiteCollections(packageId, recursive); return HostedSharePointServerController.GetSiteCollections(packageId, recursive, groupName);
} }
[WebMethod] [WebMethod]
@ -114,7 +116,7 @@ namespace WebsitePanel.EnterpriseServer
public SharePointSiteCollection GetSiteCollectionByDomain(int organizationId, string domain) public SharePointSiteCollection GetSiteCollectionByDomain(int organizationId, string domain)
{ {
DomainInfo domainInfo = ServerController.GetDomain(domain); DomainInfo domainInfo = ServerController.GetDomain(domain);
SharePointSiteCollectionListPaged existentSiteCollections = this.GetSiteCollectionsPaged(domainInfo.PackageId, organizationId, "ItemName", String.Format("%{0}", domain), String.Empty, 0, Int32.MaxValue); SharePointSiteCollectionListPaged existentSiteCollections = this.GetSiteCollectionsPaged(domainInfo.PackageId, organizationId, "ItemName", String.Format("%{0}", domain), String.Empty, 0, Int32.MaxValue, null);
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{ {
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name); Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
@ -131,11 +133,12 @@ namespace WebsitePanel.EnterpriseServer
/// Adds SharePoint site collection. /// Adds SharePoint site collection.
/// </summary> /// </summary>
/// <param name="item">Site collection description.</param> /// <param name="item">Site collection description.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Created site collection id within metabase.</returns> /// <returns>Created site collection id within metabase.</returns>
[WebMethod] [WebMethod]
public int AddSiteCollection(SharePointSiteCollection item) public int AddSiteCollection(SharePointSiteCollection item, string groupName)
{ {
return HostedSharePointServerController.AddSiteCollection(item); return HostedSharePointServerController.AddSiteCollection(item, groupName);
} }
/// <summary> /// <summary>

View file

@ -39,6 +39,7 @@ using Microsoft.Web.Services3;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.RemoteDesktopServices;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -367,5 +368,17 @@ namespace WebsitePanel.EnterpriseServer
{ {
return RemoteDesktopServicesController.SendRdsSetupLetter(itemId, accountId, to, cc); return RemoteDesktopServicesController.SendRdsSetupLetter(itemId, accountId, to, cc);
} }
[WebMethod]
public RdsServerSettings GetRdsServerSettings(int serverId, string settingsName)
{
return RemoteDesktopServicesController.GetRdsServerSettings(serverId, settingsName);
}
[WebMethod]
public int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings)
{
return RemoteDesktopServicesController.UpdateRdsServerSettings(serverId, settingsName, settings);
}
} }
} }

View file

@ -37,7 +37,10 @@ using System.ComponentModel;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
using Microsoft.Web.Services3; using Microsoft.Web.Services3;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Virtualization; using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
@ -183,14 +186,14 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
public IntResult CreateVirtualMachine(int packageId, public IntResult CreateVirtualMachine(int packageId,
string hostname, string osTemplateFile, string password, string summaryLetterEmail, string hostname, string osTemplateFile, string password, string summaryLetterEmail,
int cpuCores, int ramMB, int hddGB, int snapshots, bool dvdInstalled, bool bootFromCD, bool numLock, int generation, int cpuCores, int ramMB, int hddGB, int snapshots, bool dvdInstalled, bool bootFromCD, bool numLock,
bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed, bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed,
bool externalNetworkEnabled, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses, bool externalNetworkEnabled, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses,
bool privateNetworkEnabled, int privateAddressesNumber, bool randomPrivateAddresses, string[] privateAddresses) bool privateNetworkEnabled, int privateAddressesNumber, bool randomPrivateAddresses, string[] privateAddresses)
{ {
return VirtualizationServerController.CreateVirtualMachine(packageId, return VirtualizationServerController.CreateVirtualMachine(packageId,
hostname, osTemplateFile, password, summaryLetterEmail, hostname, osTemplateFile, password, summaryLetterEmail,
cpuCores, ramMB, hddGB, snapshots, dvdInstalled, bootFromCD, numLock, generation, cpuCores, ramMB, hddGB, snapshots, dvdInstalled, bootFromCD, numLock,
startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed, startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed,
externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses, externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses,
privateNetworkEnabled, privateAddressesNumber, randomPrivateAddresses, privateAddresses); privateNetworkEnabled, privateAddressesNumber, randomPrivateAddresses, privateAddresses);

View file

@ -31,6 +31,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using WebsitePanel.EnterpriseServer.Base.RDS;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.RemoteDesktopServices namespace WebsitePanel.Providers.RemoteDesktopServices
@ -80,5 +81,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
void RemoveRdsServerFromTenantOU(string hostName, string organizationId); void RemoveRdsServerFromTenantOU(string hostName, string organizationId);
void InstallCertificate(byte[] certificate, string password, List<string> hostNames); void InstallCertificate(byte[] certificate, string password, List<string> hostNames);
void MoveSessionHostToRdsOU(string hostName); void MoveSessionHostToRdsOU(string hostName);
void ApplyGPO(string collectionName, RdsServerSettings serverSettings);
} }
} }

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.EnterpriseServer.Base.RDS
{
public class RdsServerSetting
{
public string PropertyName { get; set; }
public string PropertyValue { get; set; }
public bool ApplyUsers { get; set; }
public bool ApplyAdministrators { get; set; }
}
}

View file

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
namespace WebsitePanel.EnterpriseServer.Base.RDS
{
public class RdsServerSettings
{
private List<RdsServerSetting> settings = null;
public const string LOCK_SCREEN_TIMEOUT = "LockScreenTimeout";
public const string REMOVE_RUN_COMMAND = "RemoveRunCommand";
public const string REMOVE_POWERSHELL_COMMAND = "RemovePowershellCommand";
public const string HIDE_C_DRIVE = "HideCDrive";
public const string REMOVE_SHUTDOWN_RESTART = "RemoveShutdownRestart";
public const string DISABLE_TASK_MANAGER = "DisableTaskManager";
public const string CHANGE_DESKTOP_DISABLED = "ChangingDesktopDisabled";
public const string SCREEN_SAVER_DISABLED = "ScreenSaverDisabled";
public const string DRIVE_SPACE_THRESHOLD = "DriveSpaceThreshold";
public const string LOCK_SCREEN_TIMEOUT_VALUE = "LockScreenTimeoutValue";
public const string LOCK_SCREEN_TIMEOUT_ADMINISTRATORS = "LockScreenTimeoutAdministrators";
public const string LOCK_SCREEN_TIMEOUT_USERS = "LockScreenTimeoutUsers";
public const string REMOVE_RUN_COMMAND_ADMINISTRATORS = "RemoveRunCommandAdministrators";
public const string REMOVE_RUN_COMMAND_USERS = "RemoveRunCommandUsers";
public const string REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS = "RemovePowershellCommandAdministrators";
public const string REMOVE_POWERSHELL_COMMAND_USERS = "RemovePowershellCommandUsers";
public const string HIDE_C_DRIVE_ADMINISTRATORS = "HideCDriveAdministrators";
public const string HIDE_C_DRIVE_USERS = "HideCDriveUsers";
public const string REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS = "RemoveShutdownRestartAdministrators";
public const string REMOVE_SHUTDOWN_RESTART_USERS = "RemoveShutdownRestartUsers";
public const string DISABLE_TASK_MANAGER_ADMINISTRATORS = "DisableTaskManagerAdministrators";
public const string DISABLE_TASK_MANAGER_USERS = "DisableTaskManagerUsers";
public const string CHANGE_DESKTOP_DISABLED_ADMINISTRATORS = "ChangingDesktopDisabledAdministrators";
public const string CHANGE_DESKTOP_DISABLED_USERS = "ChangingDesktopDisabledUsers";
public const string SCREEN_SAVER_DISABLED_ADMINISTRATORS = "ScreenSaverDisabledAdministrators";
public const string SCREEN_SAVER_DISABLED_USERS = "ScreenSaverDisabledUsers";
public const string DRIVE_SPACE_THRESHOLD_VALUE = "DriveSpaceThresholdValue";
public string SettingsName { get; set; }
public int ServerId { get; set; }
public List<RdsServerSetting> Settings
{
get
{
if (settings == null)
{
settings = new List<RdsServerSetting>();
}
return settings;
}
set
{
settings = value;
}
}
}
}

View file

@ -35,9 +35,9 @@ namespace WebsitePanel.Providers.Virtualization
public class MemoryInfo public class MemoryInfo
{ {
public bool DynamicMemoryEnabled { get; set; } public bool DynamicMemoryEnabled { get; set; }
public Int64 Startup { get; set; } public int Startup { get; set; }
public Int64 Minimum { get; set; } public int Minimum { get; set; }
public Int64 Maximum { get; set; } public int Maximum { get; set; }
public int Buffer { get; set; } public int Buffer { get; set; }
public int Priority { get; set; } public int Priority { get; set; }
} }

View file

@ -34,6 +34,7 @@ namespace WebsitePanel.Providers.Virtualization
{ {
public class MountedDiskInfo public class MountedDiskInfo
{ {
public int DiskNumber { get; set; }
public string DiskAddress { get; set; } public string DiskAddress { get; set; }
public string[] DiskVolumes { get; set; } public string[] DiskVolumes { get; set; }
} }

View file

@ -69,8 +69,8 @@ namespace WebsitePanel.Providers.Virtualization
public int CpuUsage { get; set; } public int CpuUsage { get; set; }
[Persistent] [Persistent]
public long RamSize { get; set; } public int RamSize { get; set; }
public long RamUsage { get; set; } public int RamUsage { get; set; }
[Persistent] [Persistent]
public int HddSize { get; set; } public int HddSize { get; set; }
public LogicalDisk[] HddLogicalDisks { get; set; } public LogicalDisk[] HddLogicalDisks { get; set; }

View file

@ -138,6 +138,8 @@
<Compile Include="RemoteDesktopServices\RdsServer.cs" /> <Compile Include="RemoteDesktopServices\RdsServer.cs" />
<Compile Include="RemoteDesktopServices\RdsServerDriveInfo.cs" /> <Compile Include="RemoteDesktopServices\RdsServerDriveInfo.cs" />
<Compile Include="RemoteDesktopServices\RdsServerInfo.cs" /> <Compile Include="RemoteDesktopServices\RdsServerInfo.cs" />
<Compile Include="RemoteDesktopServices\RdsServerSetting.cs" />
<Compile Include="RemoteDesktopServices\RdsServerSettings.cs" />
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" /> <Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
<Compile Include="RemoteDesktopServices\RdsUserSession.cs" /> <Compile Include="RemoteDesktopServices\RdsUserSession.cs" />
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" /> <Compile Include="RemoteDesktopServices\RemoteApplication.cs" />

View file

@ -34,7 +34,6 @@ using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Microsoft.Win32; using Microsoft.Win32;
using WebsitePanel.Providers.Utils;
using WebsitePanel.Server.Utils; using WebsitePanel.Server.Utils;
namespace WebsitePanel.Providers.Mail namespace WebsitePanel.Providers.Mail
@ -183,7 +182,9 @@ namespace WebsitePanel.Providers.Mail
{ {
if (!apiObject.Save()) if (!apiObject.Save())
{ {
throw new Exception("Cannot save Api Object: " + GetErrorMessage(apiObject.LastErr)); var ex = new Exception("Cannot save Api Object: " + GetErrorMessage(apiObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
} }
@ -298,7 +299,7 @@ namespace WebsitePanel.Providers.Mail
var obj = GetAccountObject(); var obj = GetAccountObject();
if (!obj.Open(accountName)) if (!obj.Open(accountName))
{ {
throw new Exception("Cannot open account " + accountName + ": " + GetErrorMessage(obj.LastErr)); Log.WriteWarning(string.Format("Cannot open account {0}: {1}", accountName, GetErrorMessage(obj.LastErr)));
} }
return obj; return obj;
@ -308,7 +309,9 @@ namespace WebsitePanel.Providers.Mail
{ {
if (!domain.Save()) if (!domain.Save())
{ {
throw new ArgumentException("Could not save domain:" + GetErrorMessage(domain.LastErr)); var ex = new Exception("Could not save domain:" + GetErrorMessage(domain.LastErr));
Log.WriteError(ex);
throw ex;
} }
} }
@ -316,11 +319,12 @@ namespace WebsitePanel.Providers.Mail
{ {
if (!account.Save()) if (!account.Save())
{ {
throw new ArgumentException("Could not save " + accountTypeName + ":" + GetErrorMessage(account.LastErr)); var ex = new Exception(string.Format("Could not save {0}: {1}", accountTypeName, GetErrorMessage(account.LastErr)));
Log.WriteError(ex);
throw ex;
} }
} }
protected string GetEmailUser(string email) protected string GetEmailUser(string email)
{ {
if (string.IsNullOrWhiteSpace(email)) if (string.IsNullOrWhiteSpace(email))
@ -544,7 +548,7 @@ namespace WebsitePanel.Providers.Mail
var ms = new MemoryStream(statsBuffer); var ms = new MemoryStream(statsBuffer);
var reader = new StreamReader(ms); var reader = new StreamReader(ms);
while (reader.Peek() != -1) while (reader.Peek() > -1)
{ {
var line = reader.ReadLine(); var line = reader.ReadLine();
var fields = line.Split(','); var fields = line.Split(',');
@ -665,14 +669,18 @@ namespace WebsitePanel.Providers.Mail
{ {
if (string.IsNullOrWhiteSpace(domain.Name)) if (string.IsNullOrWhiteSpace(domain.Name))
{ {
throw new ArgumentNullException("domain.Name"); var ex = new Exception("Cannot create domain with empty domain name", new ArgumentNullException("domain.Name"));
Log.WriteError(ex);
throw ex;
} }
var domainObject = GetDomainObject(); var domainObject = GetDomainObject();
if (!domainObject.New(domain.Name)) if (!domainObject.New(domain.Name))
{ {
throw new ApplicationException("Failed to create domain: " + GetErrorMessage(domainObject.LastErr)); var ex = new Exception("Failed to create domain: " + GetErrorMessage(domainObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
SaveDomain(domainObject); SaveDomain(domainObject);
@ -713,17 +721,22 @@ namespace WebsitePanel.Providers.Mail
public void DeleteDomain(string domainName) public void DeleteDomain(string domainName)
{ {
if (!DomainExists(domainName))
{
return;
}
var domainObject = GetDomainObject(domainName); var domainObject = GetDomainObject(domainName);
if (domainObject.Delete()) if (!domainObject.Delete())
{ {
throw new Exception("Could not delete domain"); Log.WriteError("Could not delete domain" + GetErrorMessage(domainObject.LastErr), null);
} }
} }
#endregion #endregion
#region Domain alieses #region Domain aliases
public bool DomainAliasExists(string domainName, string aliasName) public bool DomainAliasExists(string domainName, string aliasName)
{ {
@ -904,7 +917,9 @@ namespace WebsitePanel.Providers.Mail
var emailParts = new MailAddress(mailbox.Name); var emailParts = new MailAddress(mailbox.Name);
if (!accountObject.CanCreateMailbox(emailParts.User, emailParts.User, mailbox.Password, emailParts.Host)) if (!accountObject.CanCreateMailbox(emailParts.User, emailParts.User, mailbox.Password, emailParts.Host))
{ {
throw new Exception("Cannot create account: " + GetErrorMessage(accountObject.LastErr)); var ex = new Exception("Cannot create account because of password policy in IceWarp server, invalid username, alias or domain. Check if the password policy is different in IceWarp and WSP. Also perhaps your IceWarp diallows username in password?");
Log.WriteError(ex);
throw ex;
} }
if (accountObject.New(mailbox.Name)) if (accountObject.New(mailbox.Name))
@ -989,10 +1004,15 @@ namespace WebsitePanel.Providers.Mail
public void DeleteAccount(string mailboxName) public void DeleteAccount(string mailboxName)
{ {
if (!AccountExists(mailboxName))
{
return;
}
var accountObject = GetAccountObject(mailboxName); var accountObject = GetAccountObject(mailboxName);
if (!accountObject.Delete()) if (!accountObject.Delete())
{ {
throw new Exception("Cannot delete account: " + GetErrorMessage(accountObject.LastErr)); Log.WriteError("Cannot delete account: " + GetErrorMessage(accountObject.LastErr), null);
} }
} }
@ -1069,7 +1089,7 @@ namespace WebsitePanel.Providers.Mail
else else
{ {
var accountOject = GetAccountObject(mailAlias.ForwardTo); var accountOject = GetAccountObject(mailAlias.ForwardTo);
var aliases = GetAliasListFromAccountObject(accountOject).ToList(); var aliases = ((IEnumerable<string>) GetAliasListFromAccountObject(accountOject)).ToList();
aliases.Add(GetEmailUser(mailAlias.Name)); aliases.Add(GetEmailUser(mailAlias.Name));
accountOject.SetProperty("U_EmailAlias", string.Join(";", aliases)); accountOject.SetProperty("U_EmailAlias", string.Join(";", aliases));
@ -1171,7 +1191,7 @@ namespace WebsitePanel.Providers.Mail
} }
else else
{ {
throw new ApplicationException("Failed to create group: " + GetErrorMessage(accountObject.LastErr)); Log.WriteError("Failed to create group: " + GetErrorMessage(accountObject.LastErr), null);
} }
UpdateGroup(group); UpdateGroup(group);
@ -1190,10 +1210,15 @@ namespace WebsitePanel.Providers.Mail
public void DeleteGroup(string groupName) public void DeleteGroup(string groupName)
{ {
if (!GroupExists(groupName))
{
return;
}
var accountObject = GetAccountObject(groupName); var accountObject = GetAccountObject(groupName);
if (!accountObject.Delete()) if (!accountObject.Delete())
{ {
throw new Exception("Cannot delete group: " + GetErrorMessage(accountObject.LastErr)); Log.WriteError("Cannot delete group: " + GetErrorMessage(accountObject.LastErr), null);
} }
} }
@ -1351,14 +1376,18 @@ namespace WebsitePanel.Providers.Mail
{ {
if (string.IsNullOrWhiteSpace(maillist.Name)) if (string.IsNullOrWhiteSpace(maillist.Name))
{ {
throw new ArgumentNullException("maillist.Name"); var ex = new ArgumentNullException("maillist.Name", "Cannot create list with empty name");
Log.WriteError(ex);
throw ex;
} }
var accountObject = GetAccountObject(); var accountObject = GetAccountObject();
if (!accountObject.New(maillist.Name)) if (!accountObject.New(maillist.Name))
{ {
throw new ApplicationException("Failed to create mailing list: " + GetErrorMessage(accountObject.LastErr)); var ex = new Exception("Failed to create mailing list: " + GetErrorMessage(accountObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
accountObject.SetProperty("U_Type", IceWarpAccountType.MailingList); accountObject.SetProperty("U_Type", IceWarpAccountType.MailingList);
@ -1401,7 +1430,9 @@ namespace WebsitePanel.Providers.Mail
// Create list server account // Create list server account
if (!listServerAccountObject.New("srv" + mailingListName)) if (!listServerAccountObject.New("srv" + mailingListName))
{ {
throw new Exception("Cannot create listserver account to associate with mailing list." + GetErrorMessage(listServerAccountObject.LastErr)); var ex = new Exception("Cannot create listserver account to associate with mailing list." + GetErrorMessage(listServerAccountObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
listServerAccountObject.SetProperty("U_Type", IceWarpAccountType.ListServer); listServerAccountObject.SetProperty("U_Type", IceWarpAccountType.ListServer);
@ -1529,6 +1560,11 @@ namespace WebsitePanel.Providers.Mail
public void DeleteList(string maillistName) public void DeleteList(string maillistName)
{ {
if (!ListExists(maillistName))
{
return;
}
var accountObject = GetAccountObject(maillistName); var accountObject = GetAccountObject(maillistName);
var listServerAccountObject = FindMatchingListServerAccount(maillistName, false); var listServerAccountObject = FindMatchingListServerAccount(maillistName, false);
@ -1546,7 +1582,9 @@ namespace WebsitePanel.Providers.Mail
{ {
if (!listServerAccountObject.Delete()) if (!listServerAccountObject.Delete())
{ {
throw new Exception("Deleted mail list, but list server account remains: " + GetErrorMessage(listServerAccountObject.LastErr)); var ex = new Exception("Deleted mail list, but list server account remains: " + GetErrorMessage(listServerAccountObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
} }
else else
@ -1554,13 +1592,15 @@ namespace WebsitePanel.Providers.Mail
listServerAccountObject.SetProperty("L_ListFile_Contents", string.Join("\n", lists.Remove(maillistName))); listServerAccountObject.SetProperty("L_ListFile_Contents", string.Join("\n", lists.Remove(maillistName)));
if (!listServerAccountObject.Save()) if (!listServerAccountObject.Save())
{ {
throw new Exception("Deleted mail list, but associated list server account could not be updated: " + GetErrorMessage(listServerAccountObject.LastErr)); var ex = new Exception("Deleted mail list, but associated list server account could not be updated: " + GetErrorMessage(listServerAccountObject.LastErr));
Log.WriteError(ex);
throw ex;
} }
} }
} }
else else
{ {
throw new Exception("Cannot delete mail list: " + GetErrorMessage(accountObject.LastErr)); Log.WriteError("Cannot delete mail list: " + GetErrorMessage(accountObject.LastErr), null);
} }
} }

View file

@ -50,6 +50,8 @@ using System.Collections.ObjectModel;
using System.DirectoryServices; using System.DirectoryServices;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Collections; using System.Collections;
using System.Xml;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.Providers.RemoteDesktopServices namespace WebsitePanel.Providers.RemoteDesktopServices
@ -79,6 +81,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
private const string LocalAdministratorsGroupName = "Administrators"; private const string LocalAdministratorsGroupName = "Administrators";
private const string RDSHelpDeskRdRapPolicyName = "RDS-HelpDesk-RDRAP"; private const string RDSHelpDeskRdRapPolicyName = "RDS-HelpDesk-RDRAP";
private const string RDSHelpDeskRdCapPolicyName = "RDS-HelpDesk-RDCAP"; private const string RDSHelpDeskRdCapPolicyName = "RDS-HelpDesk-RDCAP";
private const string ScreenSaverGpoKey = @"HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop";
private const string ScreenSaverValueName = "ScreenSaveActive";
private const string ScreenSaverTimeoutGpoKey = @"HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop";
private const string ScreenSaverTimeoutValueName = "ScreenSaveTimeout";
private const string RemoveRestartGpoKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
private const string RemoveRestartGpoValueName = "NoClose";
private const string RemoveRunGpoKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
private const string RemoveRunGpoValueName = "NoRun";
private const string DisableTaskManagerGpoKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System";
private const string DisableTaskManagerGpoValueName = "DisableTaskMgr";
private const string HideCDriveGpoKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
private const string HideCDriveGpoValueName = "NoDrives";
#endregion #endregion
@ -349,11 +363,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
//add session servers to group //add session servers to group
foreach (var rdsServer in collection.Servers) foreach (var rdsServer in collection.Servers)
{ {
MoveRdsServerToTenantOU(rdsServer.Name, organizationId); MoveSessionHostToCollectionOU(rdsServer.Name, collection.Name, organizationId);
AddAdGroupToLocalAdmins(runSpace, rdsServer.FqdName, helpDeskGroupSamAccountName); AddAdGroupToLocalAdmins(runSpace, rdsServer.FqdName, helpDeskGroupSamAccountName);
AddAdGroupToLocalAdmins(runSpace, rdsServer.FqdName, localAdminsGroupSamAccountName); AddAdGroupToLocalAdmins(runSpace, rdsServer.FqdName, localAdminsGroupSamAccountName);
AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer); AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer);
} }
CreatePolicy(runSpace, organizationId, string.Format("{0}-administrators", collection.Name), new DirectoryEntry(GetGroupPath(organizationId, collection.Name, GetLocalAdminsGroupName(collection.Name))), collection.Name);
CreatePolicy(runSpace, organizationId, string.Format("{0}-users", collection.Name), new DirectoryEntry(GetUsersGroupPath(organizationId, collection.Name)), collection.Name);
} }
finally finally
{ {
@ -361,7 +378,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
} }
return result; return result;
} }
public void EditRdsCollectionSettings(RdsCollection collection) public void EditRdsCollectionSettings(RdsCollection collection)
{ {
@ -497,6 +514,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
DeleteGpo(runSpace, string.Format("{0}-administrators", collectionName));
DeleteGpo(runSpace, string.Format("{0}-users", collectionName));
var capPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdCap); var capPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdCap);
var rapPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdRap); var rapPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdRap);
@ -519,11 +538,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
{ {
RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace); RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace);
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server); RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
MoveRdsServerToTenantOU(server.Name, organizationId);
} }
ActiveDirectoryUtils.DeleteADObject(GetComputerGroupPath(organizationId, collectionName)); ActiveDirectoryUtils.DeleteADObject(GetComputerGroupPath(organizationId, collectionName));
ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName)); ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName));
ActiveDirectoryUtils.DeleteADObject(GetGroupPath(organizationId, collectionName, GetLocalAdminsGroupName(collectionName))); ActiveDirectoryUtils.DeleteADObject(GetGroupPath(organizationId, collectionName, GetLocalAdminsGroupName(collectionName)));
ActiveDirectoryUtils.DeleteADObject(GetCollectionOUPath(organizationId, string.Format("{0}-OU", collectionName)));
} }
catch (Exception e) catch (Exception e)
{ {
@ -624,6 +645,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace); RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace);
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server); RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
MoveRdsServerToTenantOU(server.Name, organizationId);
} }
finally finally
{ {
@ -1092,6 +1114,186 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#endregion #endregion
#region GPO
public void ApplyGPO(string collectionName, RdsServerSettings serverSettings)
{
string administratorsGpo = string.Format("{0}-administrators", collectionName);
string usersGpo = string.Format("{0}-users", collectionName);
Runspace runspace = null;
try
{
runspace = OpenRunspace();
RemoveRegistryValue(runspace, ScreenSaverGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, ScreenSaverGpoKey, usersGpo);
RemoveRegistryValue(runspace, RemoveRestartGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, RemoveRestartGpoKey, usersGpo);
RemoveRegistryValue(runspace, DisableTaskManagerGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, DisableTaskManagerGpoKey, usersGpo);
var setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.SCREEN_SAVER_DISABLED));
SetRegistryValue(setting, runspace, ScreenSaverGpoKey, administratorsGpo, usersGpo, ScreenSaverValueName, "0", "string");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_SHUTDOWN_RESTART));
SetRegistryValue(setting, runspace, RemoveRestartGpoKey, administratorsGpo, usersGpo, RemoveRestartGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_RUN_COMMAND));
SetRegistryValue(setting, runspace, RemoveRunGpoKey, administratorsGpo, usersGpo, RemoveRunGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.DISABLE_TASK_MANAGER));
SetRegistryValue(setting, runspace, DisableTaskManagerGpoKey, administratorsGpo, usersGpo, DisableTaskManagerGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.HIDE_C_DRIVE));
SetRegistryValue(setting, runspace, HideCDriveGpoKey, administratorsGpo, usersGpo, HideCDriveGpoValueName, "4", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.LOCK_SCREEN_TIMEOUT));
double result;
if (!string.IsNullOrEmpty(setting.PropertyValue) && double.TryParse(setting.PropertyValue, out result))
{
SetRegistryValue(setting, runspace, ScreenSaverTimeoutGpoKey, administratorsGpo, usersGpo, ScreenSaverTimeoutValueName, setting.PropertyValue, "string");
}
}
finally
{
CloseRunspace(runspace);
}
}
private void RemoveRegistryValue(Runspace runspace, string key, string gpoName)
{
Command cmd = new Command("Remove-GPRegistryValue");
cmd.Parameters.Add("Name", gpoName);
cmd.Parameters.Add("Key", string.Format("\"{0}\"", key));
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private void SetRegistryValue(RdsServerSetting setting, Runspace runspace, string key, string administratorsGpo, string usersGpo, string valueName, string value, string type)
{
if (setting.ApplyAdministrators)
{
SetRegistryValue(runspace, key, administratorsGpo, value, valueName, type);
}
if (setting.ApplyUsers)
{
SetRegistryValue(runspace, key, usersGpo, value, valueName, type);
}
}
private void SetRegistryValue(Runspace runspace, string key, string gpoName, string value, string valueName, string type)
{
Command cmd = new Command("Set-GPRegistryValue");
cmd.Parameters.Add("Name", gpoName);
cmd.Parameters.Add("Key", string.Format("\"{0}\"", key));
cmd.Parameters.Add("Value", value);
cmd.Parameters.Add("ValueName", valueName);
cmd.Parameters.Add("Type", type);
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private string CreatePolicy(Runspace runspace, string organizationId, string gpoName, DirectoryEntry entry, string collectionName)
{
string gpoId = GetPolicyId(runspace, gpoName);
if (string.IsNullOrEmpty(gpoId))
{
gpoId = CreateAndLinkPolicy(runspace, gpoName, organizationId, collectionName);
SetPolicyPermissions(runspace, gpoName, entry);
}
return gpoId;
}
private void DeleteGpo(Runspace runspace, string gpoName)
{
Command cmd = new Command("Remove-GPO");
cmd.Parameters.Add("Name", gpoName);
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private void SetPolicyPermissions(Runspace runspace, string gpoName, DirectoryEntry entry)
{
var scripts = new List<string>
{
string.Format("Set-GPPermissions -Name {0} -Replace -PermissionLevel None -TargetName 'Authenticated Users' -TargetType group", gpoName),
string.Format("Set-GPPermissions -Name {0} -PermissionLevel gpoapply -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(entry, "sAMAccountName").ToString()))
};
object[] errors = null;
ExecuteRemoteShellCommand(runspace, PrimaryDomainController, scripts, out errors);
}
private string CreateAndLinkPolicy(Runspace runspace, string gpoName, string organizationId, string collectionName)
{
string gpoId = null;
try
{
var entry = new DirectoryEntry(GetCollectionOUPath(organizationId, string.Format("{0}-OU", collectionName)));
var distinguishedName = string.Format("\"{0}\"", ActiveDirectoryUtils.GetADObjectProperty(entry, "DistinguishedName"));
Command cmd = new Command("New-GPO");
cmd.Parameters.Add("Name", gpoName);
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
if (result != null && result.Count > 0)
{
PSObject gpo = result[0];
gpoId = ((Guid)GetPSObjectProperty(gpo, "Id")).ToString("B");
}
cmd = new Command("New-GPLink");
cmd.Parameters.Add("Name", gpoName);
cmd.Parameters.Add("Target", distinguishedName);
ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
catch (Exception)
{
gpoId = null;
throw;
}
return gpoId;
}
private string GetPolicyId(Runspace runspace, string gpoName)
{
string gpoId = null;
try
{
Command cmd = new Command("Get-GPO");
cmd.Parameters.Add("Name", gpoName);
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
if (result != null && result.Count > 0)
{
PSObject gpo = result[0];
gpoId = ((Guid)GetPSObjectProperty(gpo, "Id")).ToString("B");
}
}
catch (Exception)
{
gpoId = null;
throw;
}
return gpoId;
}
#endregion
#region RDS Help Desk #region RDS Help Desk
private string GetHelpDeskGroupPath(string groupName) private string GetHelpDeskGroupPath(string groupName)
@ -1463,6 +1665,34 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
} }
} }
public void MoveSessionHostToCollectionOU(string hostName, string collectionName, string organizationId)
{
if (!string.IsNullOrEmpty(ComputersRootOU))
{
CheckOrCreateComputersRoot(GetComputersRootPath());
}
var computerObject = GetComputerObject(hostName);
string collectionOUName = string.Format("{0}-OU", collectionName);
string collectionOUPath = GetCollectionOUPath(organizationId, collectionOUName);
if (!ActiveDirectoryUtils.AdObjectExists(collectionOUPath))
{
ActiveDirectoryUtils.CreateOrganizationalUnit(collectionOUName, GetOrganizationPath(organizationId));
}
if (computerObject != null)
{
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(computerObject, "sAMAccountName");
if (!ActiveDirectoryUtils.IsComputerInGroup(samName, collectionOUName))
{
DirectoryEntry group = new DirectoryEntry(collectionOUPath);
computerObject.MoveTo(group);
}
}
}
public void MoveRdsServerToTenantOU(string hostName, string organizationId) public void MoveRdsServerToTenantOU(string hostName, string organizationId)
{ {
var tenantComputerGroupPath = GetTenantComputerGroupPath(organizationId); var tenantComputerGroupPath = GetTenantComputerGroupPath(organizationId);
@ -1767,6 +1997,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return sb.ToString(); return sb.ToString();
} }
private string GetCollectionOUPath(string organizationId, string collectionName)
{
StringBuilder sb = new StringBuilder();
AppendProtocol(sb);
AppendDomainController(sb);
AppendOUPath(sb, collectionName);
AppendOUPath(sb, organizationId);
AppendOUPath(sb, RootOU);
AppendDomainPath(sb, RootDomain);
return sb.ToString();
}
private string GetUserPath(string organizationId, string loginName) private string GetUserPath(string organizationId, string loginName)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();

View file

@ -8,7 +8,20 @@ namespace WebsitePanel.Providers.Virtualization
{ {
public static class Constants public static class Constants
{ {
public const string CONFIG_USE_DISKPART_TO_CLEAR_READONLY_FLAG = "WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag";
public const string WMI_VIRTUALIZATION_NAMESPACE = @"root\virtualization\v2";
public const string WMI_CIMV2_NAMESPACE = @"root\cimv2";
public const string LIBRARY_INDEX_FILE_NAME = "index.xml";
public const string EXTERNAL_NETWORK_ADAPTER_NAME = "External Network Adapter";
public const string PRIVATE_NETWORK_ADAPTER_NAME = "Private Network Adapter";
public const string MANAGEMENT_NETWORK_ADAPTER_NAME = "Management Network Adapter";
public const Int64 Size1G = 0x40000000; public const Int64 Size1G = 0x40000000;
public const Int64 Size1M = 0x100000; public const Int64 Size1M = 0x100000;
public const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary";
public const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary";
} }
} }

View file

@ -0,0 +1,73 @@
using System;
using System.Text.RegularExpressions;
namespace WebsitePanel.Providers.Virtualization.Extensions
{
public static class StringExtensions
{
public static string[] ParseExact(
this string data,
string format)
{
return ParseExact(data, format, false);
}
public static string[] ParseExact(
this string data,
string format,
bool ignoreCase)
{
string[] values;
if (TryParseExact(data, format, out values, ignoreCase))
return values;
else
throw new ArgumentException("Format not compatible with value.");
}
public static bool TryExtract(
this string data,
string format,
out string[] values)
{
return TryParseExact(data, format, out values, false);
}
public static bool TryParseExact(
this string data,
string format,
out string[] values,
bool ignoreCase)
{
int tokenCount = 0;
format = Regex.Escape(format).Replace("\\{", "{");
for (tokenCount = 0; ; tokenCount++)
{
string token = string.Format("{{{0}}}", tokenCount);
if (!format.Contains(token)) break;
format = format.Replace(token,
string.Format("(?'group{0}'.*)", tokenCount));
}
RegexOptions options =
ignoreCase ? RegexOptions.IgnoreCase : RegexOptions.None;
Match match = new Regex(format, options).Match(data);
if (tokenCount != (match.Groups.Count - 1))
{
values = new string[] { };
return false;
}
else
{
values = new string[tokenCount];
for (int index = 0; index < tokenCount; index++)
values[index] =
match.Groups[string.Format("group{0}", index)].Value;
return true;
}
}
}
}

View file

@ -23,7 +23,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", name); cmd.Parameters.Add("VMName", name);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
info.NumLockEnabled = true; info.NumLockEnabled = true;
@ -56,7 +56,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", name); cmd.Parameters.Add("VMName", name);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
info.NumLockEnabled = Convert.ToBoolean(result[0].GetProperty("NumLockEnabled")); info.NumLockEnabled = Convert.ToBoolean(result[0].GetProperty("NumLockEnabled"));
@ -89,7 +89,7 @@ namespace WebsitePanel.Providers.Virtualization
else else
cmd.Parameters.Add("FirstBootDevice", HardDriveHelper.GetPS(powerShell, vm.Name).FirstOrDefault()); cmd.Parameters.Add("FirstBootDevice", HardDriveHelper.GetPS(powerShell, vm.Name).FirstOrDefault());
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
// for others win and linux // for others win and linux
else else
@ -102,7 +102,7 @@ namespace WebsitePanel.Providers.Virtualization
: new[] { "IDE", "CD", "LegacyNetworkAdapter", "Floppy" }; : new[] { "IDE", "CD", "LegacyNetworkAdapter", "Floppy" };
cmd.Parameters.Add("StartupOrder", bootOrder); cmd.Parameters.Add("StartupOrder", bootOrder);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
} }
} }

View file

@ -36,7 +36,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", vmName); cmd.Parameters.Add("VMName", vmName);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
@ -57,7 +57,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber);
cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
public static void Update(PowerShellManager powerShell, VirtualMachine vm, bool dvdDriveShouldBeInstalled) public static void Update(PowerShellManager powerShell, VirtualMachine vm, bool dvdDriveShouldBeInstalled)
@ -74,7 +74,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", vmName); cmd.Parameters.Add("VMName", vmName);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
public static void Remove(PowerShellManager powerShell, string vmName) public static void Remove(PowerShellManager powerShell, string vmName)
@ -87,7 +87,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber);
cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
} }
} }

View file

@ -47,7 +47,7 @@ namespace WebsitePanel.Providers.Virtualization
// Command cmd = new Command("Get-VM"); // Command cmd = new Command("Get-VM");
// Collection<PSObject> result = powerShell.Execute(cmd, false); // Collection<PSObject> result = powerShell.Execute(cmd, true);
// if (result == null || result.Count == 0) // if (result == null || result.Count == 0)
// return null; // return null;
@ -63,7 +63,7 @@ namespace WebsitePanel.Providers.Virtualization
Command cmd = new Command("Get-VMHardDiskDrive"); Command cmd = new Command("Get-VMHardDiskDrive");
cmd.Parameters.Add("VMName", vmname); cmd.Parameters.Add("VMName", vmname);
return powerShell.Execute(cmd, false); return powerShell.Execute(cmd, true);
} }
public static void GetVirtualHardDiskDetail(PowerShellManager powerShell, string path, ref VirtualHardDiskInfo disk) public static void GetVirtualHardDiskDetail(PowerShellManager powerShell, string path, ref VirtualHardDiskInfo disk)
@ -72,7 +72,7 @@ namespace WebsitePanel.Providers.Virtualization
{ {
Command cmd = new Command("Get-VHD"); Command cmd = new Command("Get-VHD");
cmd.Parameters.Add("Path", path); cmd.Parameters.Add("Path", path);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
disk.DiskFormat = result[0].GetEnum<VirtualHardDiskFormat>("VhdFormat"); disk.DiskFormat = result[0].GetEnum<VirtualHardDiskFormat>("VhdFormat");

View file

@ -10,15 +10,7 @@ using System.Threading.Tasks;
namespace WebsitePanel.Providers.Virtualization namespace WebsitePanel.Providers.Virtualization
{ {
public static class NetworkAdapterHelper public static class NetworkAdapterHelper
{ {
#region Constants
private const string EXTERNAL_NETWORK_ADAPTER_NAME = "External Network Adapter";
private const string PRIVATE_NETWORK_ADAPTER_NAME = "Private Network Adapter";
private const string MANAGEMENT_NETWORK_ADAPTER_NAME = "Management Network Adapter";
#endregion
public static VirtualMachineNetworkAdapter[] Get(PowerShellManager powerShell, string vmName) public static VirtualMachineNetworkAdapter[] Get(PowerShellManager powerShell, string vmName)
{ {
List<VirtualMachineNetworkAdapter> adapters = new List<VirtualMachineNetworkAdapter>(); List<VirtualMachineNetworkAdapter> adapters = new List<VirtualMachineNetworkAdapter>();
@ -26,7 +18,7 @@ namespace WebsitePanel.Providers.Virtualization
Command cmd = new Command("Get-VMNetworkAdapter"); Command cmd = new Command("Get-VMNetworkAdapter");
if (!string.IsNullOrEmpty(vmName)) cmd.Parameters.Add("VMName", vmName); if (!string.IsNullOrEmpty(vmName)) cmd.Parameters.Add("VMName", vmName);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
foreach (PSObject psAdapter in result) foreach (PSObject psAdapter in result)
@ -60,7 +52,7 @@ namespace WebsitePanel.Providers.Virtualization
else if (vm.ExternalNetworkEnabled && !String.IsNullOrEmpty(vm.ExternalNicMacAddress) else if (vm.ExternalNetworkEnabled && !String.IsNullOrEmpty(vm.ExternalNicMacAddress)
&& Get(powerShell,vm.Name,vm.ExternalNicMacAddress) == null) && Get(powerShell,vm.Name,vm.ExternalNicMacAddress) == null)
{ {
Add(powerShell, vm.Name, vm.ExternalSwitchId, vm.ExternalNicMacAddress, EXTERNAL_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); Add(powerShell, vm.Name, vm.ExternalSwitchId, vm.ExternalNicMacAddress, Constants.EXTERNAL_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter);
} }
// Private NIC // Private NIC
@ -72,7 +64,7 @@ namespace WebsitePanel.Providers.Virtualization
else if (vm.PrivateNetworkEnabled && !String.IsNullOrEmpty(vm.PrivateNicMacAddress) else if (vm.PrivateNetworkEnabled && !String.IsNullOrEmpty(vm.PrivateNicMacAddress)
&& Get(powerShell, vm.Name, vm.PrivateNicMacAddress) == null) && Get(powerShell, vm.Name, vm.PrivateNicMacAddress) == null)
{ {
Add(powerShell, vm.Name, vm.PrivateSwitchId, vm.PrivateNicMacAddress, PRIVATE_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); Add(powerShell, vm.Name, vm.PrivateSwitchId, vm.PrivateNicMacAddress, Constants.PRIVATE_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter);
} }
} }
@ -89,8 +81,9 @@ namespace WebsitePanel.Providers.Virtualization
else else
cmd.Parameters.Add("StaticMacAddress", macAddress); cmd.Parameters.Add("StaticMacAddress", macAddress);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
public static void Delete(PowerShellManager powerShell, string vmName, string macAddress) public static void Delete(PowerShellManager powerShell, string vmName, string macAddress)
{ {
var networkAdapter = Get(powerShell, vmName, macAddress); var networkAdapter = Get(powerShell, vmName, macAddress);
@ -98,12 +91,17 @@ namespace WebsitePanel.Providers.Virtualization
if (networkAdapter == null) if (networkAdapter == null)
return; return;
Delete(powerShell, vmName, networkAdapter);
}
public static void Delete(PowerShellManager powerShell, string vmName, VirtualMachineNetworkAdapter networkAdapter)
{
Command cmd = new Command("Remove-VMNetworkAdapter"); Command cmd = new Command("Remove-VMNetworkAdapter");
cmd.Parameters.Add("VMName", vmName); cmd.Parameters.Add("VMName", vmName);
cmd.Parameters.Add("Name", networkAdapter.Name); cmd.Parameters.Add("Name", networkAdapter.Name);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
} }
} }

View file

@ -66,7 +66,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("Name", snapshot.Name); cmd.Parameters.Add("Name", snapshot.Name);
if (includeChilds) cmd.Parameters.Add("IncludeAllChildSnapshots", true); if (includeChilds) cmd.Parameters.Add("IncludeAllChildSnapshots", true);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
} }
} }

View file

@ -0,0 +1,294 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Management;
using System.Threading;
using Microsoft.Storage.Vds;
using Microsoft.Storage.Vds.Advanced;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.Virtualization.Extensions;
using Path = System.IO.Path;
namespace WebsitePanel.Providers.Virtualization
{
public static class VdsHelper
{
public static MountedDiskInfo GetMountedDiskInfo(string serverName, int driveNumber)
{
MountedDiskInfo diskInfo = new MountedDiskInfo { DiskNumber = driveNumber };
// find mounted disk using VDS
AdvancedDisk advancedDisk = null;
Pack diskPack = null;
// first attempt
Thread.Sleep(3000);
HostedSolutionLog.LogInfo("Trying to find mounted disk - first attempt");
FindVdsDisk(serverName, diskInfo.DiskNumber, out advancedDisk, out diskPack);
// second attempt
if (advancedDisk == null)
{
Thread.Sleep(20000);
HostedSolutionLog.LogInfo("Trying to find mounted disk - second attempt");
FindVdsDisk(serverName, diskInfo.DiskNumber, out advancedDisk, out diskPack);
}
if (advancedDisk == null)
throw new Exception("Could not find mounted disk");
// Set disk address
diskInfo.DiskAddress = advancedDisk.DiskAddress;
var addressParts = diskInfo.DiskAddress.ParseExact("Port{0}Path{1}Target{2}Lun{3}");
var portNumber = addressParts[0];
var targetId = addressParts[2];
var lun = addressParts[3];
// check if DiskPart must be used to bring disk online and clear read-only flag
bool useDiskPartToClearReadOnly = false;
if (ConfigurationManager.AppSettings[Constants.CONFIG_USE_DISKPART_TO_CLEAR_READONLY_FLAG] != null)
useDiskPartToClearReadOnly = Boolean.Parse(ConfigurationManager.AppSettings[Constants.CONFIG_USE_DISKPART_TO_CLEAR_READONLY_FLAG]);
// determine disk index for DiskPart
Wmi cimv2 = new Wmi(serverName, Constants.WMI_CIMV2_NAMESPACE);
ManagementObject objDisk = cimv2.GetWmiObject("win32_diskdrive",
"Model='Msft Virtual Disk SCSI Disk Device' and ScsiTargetID={0} and ScsiLogicalUnit={1} and scsiPort={2}",
targetId, lun, portNumber);
if (useDiskPartToClearReadOnly)
{
// *** Clear Read-Only and bring disk online with DiskPart ***
HostedSolutionLog.LogInfo("Clearing disk Read-only flag and bringing disk online");
if (objDisk != null)
{
// disk found
// run DiskPart
string diskPartResult = RunDiskPart(serverName, String.Format(@"select disk {0}
attributes disk clear readonly
online disk
exit", Convert.ToInt32(objDisk["Index"])));
HostedSolutionLog.LogInfo("DiskPart Result: " + diskPartResult);
}
}
else
{
// *** Clear Read-Only and bring disk online with VDS ***
// clear Read-Only
if ((advancedDisk.Flags & DiskFlags.ReadOnly) == DiskFlags.ReadOnly)
{
HostedSolutionLog.LogInfo("Clearing disk Read-only flag");
advancedDisk.ClearFlags(DiskFlags.ReadOnly);
while ((advancedDisk.Flags & DiskFlags.ReadOnly) == DiskFlags.ReadOnly)
{
Thread.Sleep(100);
advancedDisk.Refresh();
}
}
// bring disk ONLINE
if (advancedDisk.Status == DiskStatus.Offline)
{
HostedSolutionLog.LogInfo("Bringing disk online");
advancedDisk.Online();
while (advancedDisk.Status == DiskStatus.Offline)
{
Thread.Sleep(100);
advancedDisk.Refresh();
}
}
}
// small pause after getting disk online
Thread.Sleep(3000);
// get disk again
FindVdsDisk(serverName, diskInfo.DiskNumber, out advancedDisk, out diskPack);
// find volumes using VDS
List<string> volumes = new List<string>();
HostedSolutionLog.LogInfo("Querying disk volumes with VDS");
foreach (Volume volume in diskPack.Volumes)
{
string letter = volume.DriveLetter.ToString();
if (letter != "")
volumes.Add(letter);
}
// find volumes using WMI
if (volumes.Count == 0 && objDisk != null)
{
HostedSolutionLog.LogInfo("Querying disk volumes with WMI");
foreach (ManagementObject objPartition in objDisk.GetRelated("Win32_DiskPartition"))
{
foreach (ManagementObject objVolume in objPartition.GetRelated("Win32_LogicalDisk"))
{
volumes.Add(objVolume["Name"].ToString().TrimEnd(':'));
}
}
}
HostedSolutionLog.LogInfo("Volumes found: " + volumes.Count);
// Set volumes
diskInfo.DiskVolumes = volumes.ToArray();
return diskInfo;
}
public static void FindVdsDisk(string serverName, int driveNumber, out AdvancedDisk advancedDisk, out Pack diskPack)
{
Func<Disk, bool> compareFunc = disk => disk.Name.EndsWith("PhysicalDrive" + driveNumber);
FindVdsDisk(serverName, compareFunc, out advancedDisk, out diskPack);
}
public static void FindVdsDisk(string serverName, string diskAddress, out AdvancedDisk advancedDisk, out Pack diskPack)
{
Func<Disk, bool> compareFunc = disk => disk.DiskAddress == diskAddress;
FindVdsDisk(serverName, compareFunc, out advancedDisk, out diskPack);
}
private static void FindVdsDisk(string serverName, Func<Disk, bool> compareFunc, out AdvancedDisk advancedDisk, out Pack diskPack)
{
advancedDisk = null;
diskPack = null;
ServiceLoader serviceLoader = new ServiceLoader();
Service vds = serviceLoader.LoadService(serverName);
vds.WaitForServiceReady();
foreach (Disk disk in vds.UnallocatedDisks)
{
if (compareFunc(disk))
{
advancedDisk = (AdvancedDisk) disk;
break;
}
}
if (advancedDisk == null)
{
vds.HardwareProvider = false;
vds.SoftwareProvider = true;
foreach (SoftwareProvider provider in vds.Providers)
foreach (Pack pack in provider.Packs)
foreach (Disk disk in pack.Disks)
if (compareFunc(disk))
{
diskPack = pack;
advancedDisk = (AdvancedDisk) disk;
break;
}
}
}
// obsolete and currently is not used
private static string RunDiskPart(string serverName, string script)
{
// create temp script file name
string localPath = Path.Combine(GetTempRemoteFolder(serverName), Guid.NewGuid().ToString("N"));
// save script to remote temp file
string remotePath = ConvertToUNC(serverName, localPath);
File.AppendAllText(remotePath, script);
// run diskpart
ExecuteRemoteProcess(serverName, "DiskPart /s " + localPath);
// delete temp script
try
{
File.Delete(remotePath);
}
catch
{
// TODO
}
return "";
}
public static string ConvertToUNC(string serverName, string path)
{
if (String.IsNullOrEmpty(serverName)
|| path.StartsWith(@"\\"))
return path;
return String.Format(@"\\{0}\{1}", serverName, path.Replace(":", "$"));
}
public static string GetTempRemoteFolder(string serverName)
{
Wmi cimv2 = new Wmi(serverName, "root\\cimv2");
ManagementObject objOS = cimv2.GetWmiObject("win32_OperatingSystem");
string sysPath = (string)objOS["SystemDirectory"];
// remove trailing slash
if (sysPath.EndsWith("\\"))
sysPath = sysPath.Substring(0, sysPath.Length - 1);
sysPath = sysPath.Substring(0, sysPath.LastIndexOf("\\") + 1) + "Temp";
return sysPath;
}
public static void ExecuteRemoteProcess(string serverName, string command)
{
Wmi cimv2 = new Wmi(serverName, "root\\cimv2");
ManagementClass objProcess = cimv2.GetWmiClass("Win32_Process");
// run process
object[] methodArgs = { command, null, null, 0 };
objProcess.InvokeMethod("Create", methodArgs);
// process ID
int processId = Convert.ToInt32(methodArgs[3]);
// wait until finished
// Create event query to be notified within 1 second of
// a change in a service
WqlEventQuery query =
new WqlEventQuery("__InstanceDeletionEvent",
new TimeSpan(0, 0, 1),
"TargetInstance isa \"Win32_Process\"");
// Initialize an event watcher and subscribe to events
// that match this query
ManagementEventWatcher watcher = new ManagementEventWatcher(cimv2.GetScope(), query);
// times out watcher.WaitForNextEvent in 20 seconds
watcher.Options.Timeout = new TimeSpan(0, 0, 20);
// Block until the next event occurs
// Note: this can be done in a loop if waiting for
// more than one occurrence
while (true)
{
ManagementBaseObject e = null;
try
{
// wait untill next process finish
e = watcher.WaitForNextEvent();
}
catch
{
// nothing has been finished in timeout period
return; // exit
}
// check process id
int pid = Convert.ToInt32(((ManagementBaseObject)e["TargetInstance"])["ProcessID"]);
if (pid == processId)
{
//Cancel the subscription
watcher.Stop();
// exit
return;
}
}
}
}
}

View file

@ -21,7 +21,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", name); cmd.Parameters.Add("VMName", name);
cmd.Parameters.Add("Name", "HeartBeat"); cmd.Parameters.Add("Name", "HeartBeat");
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
var statusString = result[0].GetProperty("PrimaryOperationalStatus"); var statusString = result[0].GetProperty("PrimaryOperationalStatus");
@ -41,7 +41,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", name); cmd.Parameters.Add("VMName", name);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
procs = Convert.ToInt32(result[0].GetProperty("Count")); procs = Convert.ToInt32(result[0].GetProperty("Count"));
@ -58,13 +58,13 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", name); cmd.Parameters.Add("VMName", name);
Collection<PSObject> result = powerShell.Execute(cmd, false); Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0) if (result != null && result.Count > 0)
{ {
info.DynamicMemoryEnabled = Convert.ToBoolean(result[0].GetProperty("DynamicMemoryEnabled")); info.DynamicMemoryEnabled = Convert.ToBoolean(result[0].GetProperty("DynamicMemoryEnabled"));
info.Startup = Convert.ToInt64(result[0].GetProperty("Startup")) / Constants.Size1M; info.Startup = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Startup")) / Constants.Size1M);
info.Minimum = Convert.ToInt64(result[0].GetProperty("Minimum")) / Constants.Size1M; info.Minimum = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Minimum")) / Constants.Size1M);
info.Maximum = Convert.ToInt64(result[0].GetProperty("Maximum")) / Constants.Size1M; info.Maximum = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Maximum")) / Constants.Size1M);
info.Buffer = Convert.ToInt32(result[0].GetProperty("Buffer")); info.Buffer = Convert.ToInt32(result[0].GetProperty("Buffer"));
info.Priority = Convert.ToInt32(result[0].GetProperty("Priority")); info.Priority = Convert.ToInt32(result[0].GetProperty("Priority"));
} }
@ -77,11 +77,11 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", vm.Name); cmd.Parameters.Add("VMName", vm.Name);
cmd.Parameters.Add("Count", cpuCores); cmd.Parameters.Add("Count", cpuCores);
cmd.Parameters.Add("Maximum", Convert.ToInt64(cpuLimitSettings * 1000)); cmd.Parameters.Add("Maximum", cpuLimitSettings);
cmd.Parameters.Add("Reserve", Convert.ToInt64(cpuReserveSettings * 1000)); cmd.Parameters.Add("Reserve", cpuReserveSettings);
cmd.Parameters.Add("RelativeWeight", cpuWeightSettings); cmd.Parameters.Add("RelativeWeight", cpuWeightSettings);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
public static void UpdateMemory(PowerShellManager powerShell, VirtualMachine vm, long ramMB) public static void UpdateMemory(PowerShellManager powerShell, VirtualMachine vm, long ramMB)
@ -91,7 +91,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("VMName", vm.Name); cmd.Parameters.Add("VMName", vm.Name);
cmd.Parameters.Add("StartupBytes", ramMB * Constants.Size1M); cmd.Parameters.Add("StartupBytes", ramMB * Constants.Size1M);
powerShell.Execute(cmd, false); powerShell.Execute(cmd, true);
} }
} }
} }

View file

@ -12,12 +12,14 @@ namespace WebsitePanel.Providers.Virtualization
{ {
public class PowerShellManager : IDisposable public class PowerShellManager : IDisposable
{ {
private readonly string _remoteComputerName;
protected static InitialSessionState session = null; protected static InitialSessionState session = null;
protected Runspace RunSpace { get; set; } protected Runspace RunSpace { get; set; }
public PowerShellManager() public PowerShellManager(string remoteComputerName)
{ {
_remoteComputerName = remoteComputerName;
OpenRunspace(); OpenRunspace();
} }
@ -61,24 +63,28 @@ namespace WebsitePanel.Providers.Virtualization
return Execute(cmd, true); return Execute(cmd, true);
} }
public Collection<PSObject> Execute(Command cmd, bool useDomainController) public Collection<PSObject> Execute(Command cmd, bool addComputerNameParameter)
{ {
object[] errors; object[] errors;
return Execute(cmd, useDomainController, out errors); return Execute(cmd, addComputerNameParameter, false);
} }
public Collection<PSObject> Execute(Command cmd, out object[] errors) public Collection<PSObject> Execute(Command cmd, bool addComputerNameParameter, bool withExceptions)
{
return Execute(cmd, true, out errors);
}
public Collection<PSObject> Execute(Command cmd, bool useDomainController, out object[] errors)
{ {
HostedSolutionLog.LogStart("Execute"); HostedSolutionLog.LogStart("Execute");
List<object> errorList = new List<object>(); List<object> errorList = new List<object>();
HostedSolutionLog.DebugCommand(cmd); HostedSolutionLog.DebugCommand(cmd);
Collection<PSObject> results = null; Collection<PSObject> results = null;
// Add computerName parameter to command if it is remote server
if (addComputerNameParameter)
{
if (!string.IsNullOrEmpty(_remoteComputerName))
cmd.Parameters.Add("ComputerName", _remoteComputerName);
}
// Create a pipeline // Create a pipeline
Pipeline pipeLine = RunSpace.CreatePipeline(); Pipeline pipeLine = RunSpace.CreatePipeline();
using (pipeLine) using (pipeLine)
@ -88,6 +94,8 @@ namespace WebsitePanel.Providers.Virtualization
// Execute the pipeline and save the objects returned. // Execute the pipeline and save the objects returned.
results = pipeLine.Invoke(); results = pipeLine.Invoke();
// Only non-terminating errors are delivered here.
// Terminating errors raise exceptions instead.
// Log out any errors in the pipeline execution // Log out any errors in the pipeline execution
// NOTE: These errors are NOT thrown as exceptions! // NOTE: These errors are NOT thrown as exceptions!
// Be sure to check this to ensure that no errors // Be sure to check this to ensure that no errors
@ -103,57 +111,18 @@ namespace WebsitePanel.Providers.Virtualization
} }
} }
pipeLine = null; pipeLine = null;
errors = errorList.ToArray();
if (withExceptions)
ExceptionIfErrors(errorList);
HostedSolutionLog.LogEnd("Execute"); HostedSolutionLog.LogEnd("Execute");
return results; return results;
} }
private static void ExceptionIfErrors(List<object> errors)
/// <summary>
/// Returns the identity of the object from the shell execution result
/// </summary>
/// <param name="result"></param>
/// <returns></returns>
public static string GetResultObjectIdentity(Collection<PSObject> result)
{ {
HostedSolutionLog.LogStart("GetResultObjectIdentity"); if (errors != null && errors.Count > 0)
if (result == null) throw new Exception("Invoke error: " + string.Join("; ", errors.Select(e => e.ToString())));
throw new ArgumentNullException("result", "Execution result is not specified");
if (result.Count < 1)
throw new ArgumentException("Execution result is empty", "result");
if (result.Count > 1)
throw new ArgumentException("Execution result contains more than one object", "result");
PSMemberInfo info = result[0].Members["Identity"];
if (info == null)
throw new ArgumentException("Execution result does not contain Identity property", "result");
string ret = info.Value.ToString();
HostedSolutionLog.LogEnd("GetResultObjectIdentity");
return ret;
}
public static string GetResultObjectDN(Collection<PSObject> result)
{
HostedSolutionLog.LogStart("GetResultObjectDN");
if (result == null)
throw new ArgumentNullException("result", "Execution result is not specified");
if (result.Count < 1)
throw new ArgumentException("Execution result does not contain any object");
if (result.Count > 1)
throw new ArgumentException("Execution result contains more than one object");
PSMemberInfo info = result[0].Members["DistinguishedName"];
if (info == null)
throw new ArgumentException("Execution result does not contain DistinguishedName property", "result");
string ret = info.Value.ToString();
HostedSolutionLog.LogEnd("GetResultObjectDN");
return ret;
} }
} }
} }

View file

@ -26,7 +26,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>..\WebsitePanel.Server\bin\HyperV2012R2\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -55,7 +55,9 @@
</Compile> </Compile>
<Compile Include="Constants.cs" /> <Compile Include="Constants.cs" />
<Compile Include="Extensions\PSObjectExtension.cs" /> <Compile Include="Extensions\PSObjectExtension.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
<Compile Include="Helpers\BiosHelper.cs" /> <Compile Include="Helpers\BiosHelper.cs" />
<Compile Include="Helpers\VdsHelper.cs" />
<Compile Include="Helpers\HardDriveHelper.cs" /> <Compile Include="Helpers\HardDriveHelper.cs" />
<Compile Include="Helpers\NetworkAdapterHelper.cs" /> <Compile Include="Helpers\NetworkAdapterHelper.cs" />
<Compile Include="Helpers\DvdDriveHelper.cs" /> <Compile Include="Helpers\DvdDriveHelper.cs" />

View file

@ -18,6 +18,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using WebsitePanel.EnterpriseServer.Base.RDS;
/// <remarks/> /// <remarks/>
@ -101,6 +102,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback MoveSessionHostToRdsOUOperationCompleted; private System.Threading.SendOrPostCallback MoveSessionHostToRdsOUOperationCompleted;
private System.Threading.SendOrPostCallback ApplyGPOOperationCompleted;
/// <remarks/> /// <remarks/>
public RemoteDesktopServices() { public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx"; this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -214,6 +217,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
public event MoveSessionHostToRdsOUCompletedEventHandler MoveSessionHostToRdsOUCompleted; public event MoveSessionHostToRdsOUCompletedEventHandler MoveSessionHostToRdsOUCompleted;
/// <remarks/>
public event ApplyGPOCompletedEventHandler ApplyGPOCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1782,6 +1788,49 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ApplyGPO", 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 ApplyGPO(string collectionName, RdsServerSettings serverSettings) {
this.Invoke("ApplyGPO", new object[] {
collectionName,
serverSettings});
}
/// <remarks/>
public System.IAsyncResult BeginApplyGPO(string collectionName, RdsServerSettings serverSettings, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ApplyGPO", new object[] {
collectionName,
serverSettings}, callback, asyncState);
}
/// <remarks/>
public void EndApplyGPO(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void ApplyGPOAsync(string collectionName, RdsServerSettings serverSettings) {
this.ApplyGPOAsync(collectionName, serverSettings, null);
}
/// <remarks/>
public void ApplyGPOAsync(string collectionName, RdsServerSettings serverSettings, object userState) {
if ((this.ApplyGPOOperationCompleted == null)) {
this.ApplyGPOOperationCompleted = new System.Threading.SendOrPostCallback(this.OnApplyGPOOperationCompleted);
}
this.InvokeAsync("ApplyGPO", new object[] {
collectionName,
serverSettings}, this.ApplyGPOOperationCompleted, userState);
}
private void OnApplyGPOOperationCompleted(object arg) {
if ((this.ApplyGPOCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ApplyGPOCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -2415,4 +2464,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void MoveSessionHostToRdsOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void MoveSessionHostToRdsOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ApplyGPOCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
} }

View file

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013 # Visual Studio 2013
VisualStudioVersion = 12.0.21005.1 VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
@ -51,8 +51,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.Merak", "WebsitePanel.Providers.Mail.Merak\WebsitePanel.Providers.Mail.Merak.vbproj", "{2FA82B71-B32A-47DE-A17B-40DE08D0256D}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.Merak", "WebsitePanel.Providers.Mail.Merak\WebsitePanel.Providers.Mail.Merak.vbproj", "{2FA82B71-B32A-47DE-A17B-40DE08D0256D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.SharePoint.Sps20", "WebsitePanel.Providers.SharePoint.Sps20\WebsitePanel.Providers.SharePoint.Sps20.csproj", "{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.AbilityMailServer", "WebsitePanel.Providers.Mail.AbilityMailServer\WebsitePanel.Providers.Mail.AbilityMailServer.csproj", "{54EE4293-6CCB-4859-8B76-90205F7B35A1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.AbilityMailServer", "WebsitePanel.Providers.Mail.AbilityMailServer\WebsitePanel.Providers.Mail.AbilityMailServer.csproj", "{54EE4293-6CCB-4859-8B76-90205F7B35A1}"
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.ArgoMail", "WebsitePanel.Providers.Mail.ArgoMail\WebsitePanel.Providers.Mail.ArgoMail.vbproj", "{FCD88E94-349D-4BB2-A726-6E47A4F01DC2}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.ArgoMail", "WebsitePanel.Providers.Mail.ArgoMail\WebsitePanel.Providers.Mail.ArgoMail.vbproj", "{FCD88E94-349D-4BB2-A726-6E47A4F01DC2}"
@ -63,8 +61,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail
EndProject EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.hMailServer43", "WebsitePanel.Providers.Mail.hMailServer43\WebsitePanel.Providers.Mail.hMailServer43.vbproj", "{622E452B-E1EF-4252-8039-A28C2EA25DC1}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.hMailServer43", "WebsitePanel.Providers.Mail.hMailServer43\WebsitePanel.Providers.Mail.hMailServer43.vbproj", "{622E452B-E1EF-4252-8039-A28C2EA25DC1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.SharePoint.Sps30", "WebsitePanel.Providers.SharePoint.Sps30\WebsitePanel.Providers.SharePoint.Sps30.csproj", "{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.DNS.Bind", "WebsitePanel.Providers.DNS.Bind\WebsitePanel.Providers.DNS.Bind.csproj", "{3ACCBEAE-5E1E-43E5-971C-223539832DD8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.DNS.Bind", "WebsitePanel.Providers.DNS.Bind\WebsitePanel.Providers.DNS.Bind.csproj", "{3ACCBEAE-5E1E-43E5-971C-223539832DD8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.FTP.ServU", "WebsitePanel.Providers.FTP.ServU\WebsitePanel.Providers.FTP.ServU.csproj", "{41FEC24A-67A2-4BF4-8889-1D5CD0A2B43D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.FTP.ServU", "WebsitePanel.Providers.FTP.ServU\WebsitePanel.Providers.FTP.ServU.csproj", "{41FEC24A-67A2-4BF4-8889-1D5CD0A2B43D}"
@ -346,16 +342,6 @@ Global
{2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|x86.ActiveCfg = Release|Any CPU {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|x86.ActiveCfg = Release|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|x86.ActiveCfg = Debug|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Any CPU.Build.0 = Release|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|x86.ActiveCfg = Release|Any CPU
{54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.Build.0 = Debug|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -406,16 +392,6 @@ Global
{622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.Build.0 = Release|Any CPU {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|x86.ActiveCfg = Release|Any CPU {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|x86.ActiveCfg = Release|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|x86.ActiveCfg = Debug|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Any CPU.Build.0 = Release|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|x86.ActiveCfg = Release|Any CPU
{3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

View file

@ -43,6 +43,7 @@ using WebsitePanel.Providers.OS;
using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.RemoteDesktopServices;
using WebsitePanel.Server.Utils; using WebsitePanel.Server.Utils;
using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.Server namespace WebsitePanel.Server
{ {
@ -662,5 +663,21 @@ namespace WebsitePanel.Server
throw; throw;
} }
} }
[WebMethod, SoapHeader("settings")]
public void ApplyGPO(string collectionName, RdsServerSettings serverSettings)
{
try
{
Log.WriteStart("'{0}' ApplyGPO", ProviderSettings.ProviderName);
RDSProvider.ApplyGPO(collectionName, serverSettings);
Log.WriteEnd("'{0}' ApplyGPO", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' ApplyGPO", ProviderSettings.ProviderName), ex);
throw;
}
}
} }
} }

View file

@ -162,7 +162,7 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2" /> <probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2;bin/Crm2015" />
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View file

@ -47,7 +47,7 @@ namespace WebsitePanel.WebDav.Core.Managers
if (string.IsNullOrWhiteSpace(pathPart)) if (string.IsNullOrWhiteSpace(pathPart))
{ {
children = ConnectToWebDavServer().Select(x => new WebDavResource children = GetWebDavRootItems().Select(x => new WebDavResource
{ {
Href = new Uri(x.Url), Href = new Uri(x.Url),
ItemType = ItemType.Folder, ItemType = ItemType.Folder,
@ -82,10 +82,9 @@ namespace WebsitePanel.WebDav.Core.Managers
SystemFile[] items; SystemFile[] items;
if (string.IsNullOrWhiteSpace(pathPart)) if (string.IsNullOrWhiteSpace(pathPart))
{ {
var rootItems = ConnectToWebDavServer().Select(x => x.Name).ToList(); var rootItems = GetWebDavRootItems().Select(x => x.Name).ToList();
rootItems.Insert(0, string.Empty); rootItems.Insert(0, string.Empty);
items = WspContext.Services.EnterpriseStorage.SearchFiles(itemId, rootItems.ToArray(), searchValue, uesrPrincipalName, recursive); items = WspContext.Services.EnterpriseStorage.SearchFiles(itemId, rootItems.ToArray(), searchValue, uesrPrincipalName, recursive);
@ -285,28 +284,11 @@ namespace WebsitePanel.WebDav.Core.Managers
} }
} }
private IList<SystemFile> ConnectToWebDavServer() private IList<SystemFile> GetWebDavRootItems()
{ {
var rootFolders = new List<SystemFile>();
var user = WspContext.User; var user = WspContext.User;
var userGroups = WSP.Services.Organizations.GetSecurityGroupsByMember(user.ItemId, user.AccountId); var rootFolders = WspContext.Services.EnterpriseStorage.GetUserRootFolders(user.ItemId, user.AccountId,user.UserName, user.DisplayName);
foreach (var folder in WSP.Services.EnterpriseStorage.GetEnterpriseFolders(WspContext.User.ItemId))
{
var permissions = WSP.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(WspContext.User.ItemId, folder.Name);
foreach (var permission in permissions)
{
if ((!permission.IsGroup
&& (permission.DisplayName == user.UserName || permission.DisplayName == user.DisplayName))
|| (permission.IsGroup && userGroups.Any(x => x.DisplayName == permission.DisplayName)))
{
rootFolders.Add(folder);
break;
}
}
}
return rootFolders; return rootFolders;
} }

View file

@ -153,5 +153,6 @@
<Control key="rds_edit_collection_settings" general_key="rds_collections" /> <Control key="rds_edit_collection_settings" general_key="rds_collections" />
<Control key="rds_collection_user_sessions" general_key="rds_collections" /> <Control key="rds_collection_user_sessions" general_key="rds_collections" />
<Control key="rds_collection_local_admins" general_key="rds_collections" /> <Control key="rds_collection_local_admins" general_key="rds_collections" />
<Control key="rds_collection_user_experience" general_key="rds_collections" />
<Control key="rds_setup_letter" general_key="rds_collections" /> <Control key="rds_setup_letter" general_key="rds_collections" />
</Controls> </Controls>

View file

@ -584,6 +584,7 @@
<Control key="deleted_user_memberof" src="WebsitePanel/ExchangeServer/OrganizationDeletedUserMemberOf.ascx" title="DeletedUserMemberOf" type="View" /> <Control key="deleted_user_memberof" src="WebsitePanel/ExchangeServer/OrganizationDeletedUserMemberOf.ascx" title="DeletedUserMemberOf" type="View" />
<Control key="rds_application_edit_users" src="WebsitePanel/RDS/RDSEditApplicationUsers.ascx" title="RDSEditApplicationUsers" type="View" /> <Control key="rds_application_edit_users" src="WebsitePanel/RDS/RDSEditApplicationUsers.ascx" title="RDSEditApplicationUsers" type="View" />
<Control key="rds_collection_local_admins" src="WebsitePanel/RDS/RDSLocalAdmins.ascx" title="RDSLocalAdmins" type="View" /> <Control key="rds_collection_local_admins" src="WebsitePanel/RDS/RDSLocalAdmins.ascx" title="RDSLocalAdmins" type="View" />
<Control key="rds_collection_user_experience" src="WebsitePanel/RDS/RDSEditUserExperience.ascx" title="RDSEditUserExperience" type="View" />
<Control key="rds_setup_letter" src="WebsitePanel/RDS/RDSSetupLetter.ascx" title="RDSSetupLetter" type="View" /> <Control key="rds_setup_letter" src="WebsitePanel/RDS/RDSSetupLetter.ascx" title="RDSSetupLetter" type="View" />
<Control key="rds_edit_collection" src="WebsitePanel/RDS/RDSEditCollection.ascx" title="RDSEditCollection" type="View" /> <Control key="rds_edit_collection" src="WebsitePanel/RDS/RDSEditCollection.ascx" title="RDSEditCollection" type="View" />
<Control key="rds_edit_collection_settings" src="WebsitePanel/RDS/RDSEditCollectionSettings.ascx" title="RDSEditCollectionSettings" type="View" /> <Control key="rds_edit_collection_settings" src="WebsitePanel/RDS/RDSEditCollectionSettings.ascx" title="RDSEditCollectionSettings" type="View" />

View file

@ -3344,7 +3344,8 @@
<value>Hosted Organizations</value> <value>Hosted Organizations</value>
</data> </data>
<data name="ResourceGroup.Hosted CRM" xml:space="preserve"> <data name="ResourceGroup.Hosted CRM" xml:space="preserve">
<value>Hosted CRM</value> <value>CRM 4/2011</value>
<comment> </comment>
</data> </data>
<data name="ResourceGroup.BlackBerry" xml:space="preserve"> <data name="ResourceGroup.BlackBerry" xml:space="preserve">
<value>BlackBerry</value> <value>BlackBerry</value>
@ -5465,7 +5466,7 @@
<value>ESS licenses per organization</value> <value>ESS licenses per organization</value>
</data> </data>
<data name="ResourceGroup.Hosted CRM2013" xml:space="preserve"> <data name="ResourceGroup.Hosted CRM2013" xml:space="preserve">
<value>Hosted CRM 2013/2015</value> <value>CRM 2013/2015</value>
</data> </data>
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_0" xml:space="preserve"> <data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2013_0" xml:space="preserve">
<value>CRM users quota (Professional license) has been reached.</value> <value>CRM users quota (Professional license) has been reached.</value>
@ -5702,6 +5703,12 @@
<value>RDS User logging off error</value> <value>RDS User logging off error</value>
</data> </data>
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve"> <data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve">
<value>GEtting RDS User sessions error</value> <value>Getting RDS User sessions error</value>
</data>
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_EXPERIENCE" xml:space="preserve">
<value>Updating RDS User experience error</value>
</data>
<data name="Success.REMOTE_DESKTOP_SERVICES_USER_EXPERIENCE" xml:space="preserve">
<value>RDS User experience has been updated</value>
</data> </data>
</root> </root>

View file

@ -26,7 +26,7 @@
.TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover a, .TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover span {} .TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover a, .TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover span {}
.TopMenu ul.AspNet-Menu li ul li {margin: 0px; width: 100%;} .TopMenu ul.AspNet-Menu li ul li {margin: 0px; width: 100%;}
/*.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul:before {width:0; height:0; position:absolute; content:" "; top:-8px; left:50%; margin-left:-8px; border-style:solid; border-width:0 8px 8px 8px; border-color:transparent transparent #fff transparent;}*/ /*.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul:before {width:0; height:0; position:absolute; content:" "; top:-8px; left:50%; margin-left:-8px; border-style:solid; border-width:0 8px 8px 8px; border-color:transparent transparent #fff transparent;}*/
.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul {position: absolute; top: 100%; left: 0; z-index: 1000; float: left; min-width: 160px; padding: 5px 10px 5px 0; margin: -10px 0 0 0; list-style: none; font-size: 14px; background-color: #FFF; border: 1px solid #CCC; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 0; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box;} .TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul {position: absolute; top: 100%; left: 0; z-index: 1000; float: left; min-width: 180px; padding: 5px 10px 5px 0; margin: -10px 0 0 0; list-style: none; font-size: 14px; background-color: #FFF; border: 1px solid #CCC; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 0; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box;}
.LeftMenu {font-size: 8pt;} .LeftMenu {font-size: 8pt;}
.LeftMenu ul {background-color: #D1E9FF;} .LeftMenu ul {background-color: #D1E9FF;}
.LeftMenu ul.AspNet-Menu {width: 190px;} .LeftMenu ul.AspNet-Menu {width: 190px;}

View file

@ -133,7 +133,7 @@
<value>Contacts</value> <value>Contacts</value>
</data> </data>
<data name="Text.CRMGroup" xml:space="preserve"> <data name="Text.CRMGroup" xml:space="preserve">
<value>CRM</value> <value>CRM 4/2011</value>
</data> </data>
<data name="Text.CRMOrganization" xml:space="preserve"> <data name="Text.CRMOrganization" xml:space="preserve">
<value>CRM Organization</value> <value>CRM Organization</value>
@ -202,7 +202,7 @@
<value>Setup</value> <value>Setup</value>
</data> </data>
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve"> <data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>SharePoint Foundation Server</value> <value>SharePoint Foundation</value>
</data> </data>
<data name="Text.SharePointServerGroup" xml:space="preserve"> <data name="Text.SharePointServerGroup" xml:space="preserve">
<value>SharePoint Server</value> <value>SharePoint Server</value>

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="cbAdministrators.Text" xml:space="preserve">
<value>Administrators</value>
</data>
<data name="cbUsers.Text" xml:space="preserve">
<value>Users</value>
</data>
<data name="secDriveSpace.Text" xml:space="preserve">
<value>Drive Space Threshold</value>
</data>
<data name="secHideCDrive.Text" xml:space="preserve">
<value>Hide C: Drive</value>
</data>
<data name="secPowershellCommand.Text" xml:space="preserve">
<value>Remove "Powershell" Command</value>
</data>
<data name="secRunCommand.Text" xml:space="preserve">
<value>Remove "Run" Command</value>
</data>
<data name="secScreenSaver.Text" xml:space="preserve">
<value>Disable Screen Saver</value>
</data>
<data name="secShutdown.Text" xml:space="preserve">
<value>Remove Shutdown and Restart</value>
</data>
<data name="secTaskManager.Text" xml:space="preserve">
<value>Disable Task Manager</value>
</data>
<data name="secTimeout.Text" xml:space="preserve">
<value>Lock Screen Timeout</value>
</data>
<data name="sekChangeDesktop.Text" xml:space="preserve">
<value>Changing Desktop Disabled</value>
</data>
</root>

View file

@ -147,6 +147,9 @@
<data name="lnkVpsPolicy.Text" xml:space="preserve"> <data name="lnkVpsPolicy.Text" xml:space="preserve">
<value>Virtual Private Servers Policy</value> <value>Virtual Private Servers Policy</value>
</data> </data>
<data name="lnkRdsPolicy.Text" xml:space="preserve">
<value>Remote Desktop Servers Policy</value>
</data>
<data name="lnkWebPolicy.Text" xml:space="preserve"> <data name="lnkWebPolicy.Text" xml:space="preserve">
<value>WEB Policy</value> <value>WEB Policy</value>
</data> </data>

View file

@ -151,10 +151,10 @@
<value>Contacts</value> <value>Contacts</value>
</data> </data>
<data name="Text.CRM2013Group" xml:space="preserve"> <data name="Text.CRM2013Group" xml:space="preserve">
<value>Hosted Organization - CRM 2013/2015</value> <value>CRM 2013/2015</value>
</data> </data>
<data name="Text.CRMGroup" xml:space="preserve"> <data name="Text.CRMGroup" xml:space="preserve">
<value>Hosted Organization - CRM</value> <value>CRM 4/2011</value>
</data> </data>
<data name="Text.CRMOrganization" xml:space="preserve"> <data name="Text.CRMOrganization" xml:space="preserve">
<value>CRM Organization</value> <value>CRM Organization</value>

View file

@ -37,6 +37,7 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls; using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.SharePoint; using WebsitePanel.Providers.SharePoint;
using System.Collections.Generic; using System.Collections.Generic;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal namespace WebsitePanel.Portal
{ {
@ -44,19 +45,28 @@ namespace WebsitePanel.Portal
{ {
SharePointSiteCollectionListPaged result; SharePointSiteCollectionListPaged result;
public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string filterColumn, string filterValue) public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string groupName, string filterColumn, string filterValue)
{ {
return result.TotalRowCount; return result.TotalRowCount;
} }
public List<SharePointSiteCollection> GetSharePointSiteCollectionPaged(int packageId, int organizationId, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn) public List<SharePointSiteCollection> GetSharePointSiteCollectionPaged(int packageId, int organizationId, string groupName, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn)
{ {
if (!String.IsNullOrEmpty(filterValue)) if (!String.IsNullOrEmpty(filterValue))
{ {
filterValue = filterValue + "%"; filterValue = filterValue + "%";
} }
result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows); if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointFoundationServer;
}
else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointServer;
}
result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, groupName);
return result.SiteCollections; return result.SiteCollections;
} }

View file

@ -0,0 +1,52 @@
// Copyright (c) 2015, 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.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.Mail;
using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.Portal
{
/// <summary>
/// Summary description for IVirtualMachineCreateControl
/// </summary>
public interface IVirtualMachineCreateControl
{
void BindItem(VirtualMachine item);
void SaveItem(VirtualMachine item);
}
}

View file

@ -181,7 +181,7 @@
<value>BlackBerry</value> <value>BlackBerry</value>
</data> </data>
<data name="locCRM.Text" xml:space="preserve"> <data name="locCRM.Text" xml:space="preserve">
<value>CRM</value> <value>CRM 4/2011</value>
</data> </data>
<data name="locExchangeStatistics.Text" xml:space="preserve"> <data name="locExchangeStatistics.Text" xml:space="preserve">
<value>Exchange</value> <value>Exchange</value>
@ -227,7 +227,7 @@
</data> </data>
<data name="locRemoteDesktop.Text" xml:space="preserve"> <data name="locRemoteDesktop.Text" xml:space="preserve">
<value>Remote Desktop</value> <value>Remote Desktop</value>
</data> </data>
<data name="lnkRdsServers.Text" xml:space="preserve"> <data name="lnkRdsServers.Text" xml:space="preserve">
<value>RDS Servers</value> <value>RDS Servers</value>
</data> </data>

View file

@ -166,7 +166,7 @@
<value>Setup</value> <value>Setup</value>
</data> </data>
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve"> <data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>SharePoint Foundation Server</value> <value>SharePoint Foundation</value>
</data> </data>
<data name="Text.SharePointServerGroup" xml:space="preserve"> <data name="Text.SharePointServerGroup" xml:space="preserve">
<value>SharePoint Server</value> <value>SharePoint Server</value>

View file

@ -61,6 +61,10 @@ namespace WebsitePanel.Portal
} }
} }
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@ -163,7 +167,7 @@ namespace WebsitePanel.Portal
private void RedirectBack() private void RedirectBack()
{ {
HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
} }
protected void chkZipBackup_CheckedChanged(object sender, EventArgs e) protected void chkZipBackup_CheckedChanged(object sender, EventArgs e)

View file

@ -30,6 +30,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Web;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.DNS; using WebsitePanel.Providers.DNS;
@ -43,6 +44,11 @@ namespace WebsitePanel.Portal
{ {
SharePointSiteCollection item = null; SharePointSiteCollection item = null;
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
private int OrganizationId private int OrganizationId
{ {
get get
@ -224,7 +230,7 @@ namespace WebsitePanel.Portal
/// <returns> Reserved disk space vallue.</returns> /// <returns> Reserved disk space vallue.</returns>
private int GetReservedDiskStorageSpace() private int GetReservedDiskStorageSpace()
{ {
var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false); var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false, GroupName);
return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage); return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
} }
@ -251,9 +257,20 @@ namespace WebsitePanel.Portal
{ {
item = new SharePointSiteCollection(); item = new SharePointSiteCollection();
if (!UseSharedSLL(PanelSecurity.PackageId)) string groupName = GroupName;
if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName))
{ {
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue); groupName = ResourceGroups.SharepointFoundationServer;
}
else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointServer;
}
if (!UseSharedSLL(PanelSecurity.PackageId))
{
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue, groupName);
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{ {
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name); Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
@ -284,9 +301,9 @@ namespace WebsitePanel.Portal
item.MaxSiteStorage = maxStorage.QuotaValue; item.MaxSiteStorage = maxStorage.QuotaValue;
item.WarningStorage = warningStorage.QuotaValue; item.WarningStorage = warningStorage.QuotaValue;
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item); int result = ES.Services.HostedSharePointServers.AddSiteCollection(item, groupName);
if (result < 0) if (result < 0)
{ {
localMessageBox.ShowResultMessage(result); localMessageBox.ShowResultMessage(result);
@ -373,19 +390,19 @@ namespace WebsitePanel.Portal
protected void btnBackup_Click(object sender, EventArgs e) protected void btnBackup_Click(object sender, EventArgs e)
{ {
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
} }
protected void btnRestore_Click(object sender, EventArgs e) protected void btnRestore_Click(object sender, EventArgs e)
{ {
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
} }
private void RedirectToSiteCollectionsList() private void RedirectToSiteCollectionsList()
{ {
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString())); Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
} }
private bool UseSharedSLL(int packageID) private bool UseSharedSLL(int packageID)

View file

@ -59,6 +59,11 @@ namespace WebsitePanel.Portal
} }
} }
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
@ -166,7 +171,7 @@ namespace WebsitePanel.Portal
private void RedirectBack() private void RedirectBack()
{ {
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
} }
protected void radioUpload_CheckedChanged(object sender, EventArgs e) protected void radioUpload_CheckedChanged(object sender, EventArgs e)
{ {

View file

@ -76,6 +76,7 @@ function confirmation()
<SelectParameters> <SelectParameters>
<asp:QueryStringParameter Name="packageId" QueryStringField="SpaceID" DefaultValue="-1" /> <asp:QueryStringParameter Name="packageId" QueryStringField="SpaceID" DefaultValue="-1" />
<asp:QueryStringParameter Name="organizationId" QueryStringField="ItemID" DefaultValue="0" /> <asp:QueryStringParameter Name="organizationId" QueryStringField="ItemID" DefaultValue="0" />
<asp:QueryStringParameter Name="groupName" QueryStringField="GroupName" DefaultValue="" />
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" /> <asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" /> <asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
</SelectParameters> </SelectParameters>

View file

@ -44,6 +44,11 @@ namespace WebsitePanel.Portal
{ {
public partial class HostedSharePointSiteCollections : WebsitePanelModuleBase public partial class HostedSharePointSiteCollections : WebsitePanelModuleBase
{ {
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
this.BindStats(); this.BindStats();
@ -62,14 +67,14 @@ namespace WebsitePanel.Portal
protected void btnCreateSiteCollection_Click(object sender, EventArgs e) protected void btnCreateSiteCollection_Click(object sender, EventArgs e)
{ {
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString())); Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString(), "GroupName=" + GroupName));
} }
public string GetSiteCollectionEditUrl(string siteCollectionId) public string GetSiteCollectionEditUrl(string siteCollectionId)
{ {
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection",
"SiteCollectionID=" + siteCollectionId, "SiteCollectionID=" + siteCollectionId,
"ItemID=" + PanelRequest.ItemID.ToString()); "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName);
} }
protected void odsSharePointSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) protected void odsSharePointSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View file

@ -67,7 +67,7 @@
</asp:hyperlink> </asp:hyperlink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="gvUsersEmail" meta:resourcekey="gvUsersEmail" DataField="SipAddress" SortExpression="PrimaryUri" ItemStyle-Width="25%" /> <asp:BoundField HeaderText="gvUsersEmail" meta:resourcekey="gvUsersEmail" DataField="SipAddress" SortExpression="SipAddress" ItemStyle-Width="25%" />
<asp:BoundField HeaderText="gvLyncUserPlan" meta:resourcekey="gvLyncUserPlan" DataField="LyncUserPlanName" SortExpression="LyncUserPlanName" ItemStyle-Width="25%" /> <asp:BoundField HeaderText="gvLyncUserPlan" meta:resourcekey="gvLyncUserPlan" DataField="LyncUserPlanName" SortExpression="LyncUserPlanName" ItemStyle-Width="25%" />
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>

View file

@ -0,0 +1,404 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="chkVpsFolderIncludesUsername.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="ComparePasswordsValidator.ErrorMessage" xml:space="preserve">
<value>Both reseller account passwords should match</value>
</data>
<data name="DefaultGatewayValidator.ErrorMessage" xml:space="preserve">
<value>Enter default gateway IP</value>
</data>
<data name="DvdLibraryPathValidator.ErrorMessage" xml:space="preserve">
<value>Enter DVD library folder</value>
</data>
<data name="ExportedVpsPathValidator.ErrorMessage" xml:space="preserve">
<value>Enter path for storing exported VPS</value>
</data>
<data name="HostnamePatternValidator.ErrorMessage" xml:space="preserve">
<value>Enter host name pattern</value>
</data>
<data name="locAlternateNameServer.Text" xml:space="preserve">
<value>Alternate Name Server:</value>
</data>
<data name="locDefaultGateway.Text" xml:space="preserve">
<value>Default Gateway:</value>
</data>
<data name="locDiskType.Text" xml:space="preserve">
<value>Disk Type:</value>
</data>
<data name="locWspResellerAccount.Text" xml:space="preserve">
<value>WebsitePanel Reseller Account</value>
</data>
<data name="locDvdIsoPath.Text" xml:space="preserve">
<value>DVD Library path:</value>
</data>
<data name="locExistingPassword.Text" xml:space="preserve">
<value>Existing password:</value>
</data>
<data name="locExportedVpsPath.Text" xml:space="preserve">
<value>Exported VPS path:</value>
</data>
<data name="locExternalNetwork.Text" xml:space="preserve">
<value>External Network</value>
</data>
<data name="locExternalNetworkName.Text" xml:space="preserve">
<value>Connect to Network:</value>
</data>
<data name="locGeneralSettings.Text" xml:space="preserve">
<value>General Settings</value>
</data>
<data name="locHostname.Text" xml:space="preserve">
<value>VPS Host name</value>
</data>
<data name="locHostnamePattern.Text" xml:space="preserve">
<value>Host name pattern:</value>
</data>
<data name="locIPFormat.Text" xml:space="preserve">
<value>IP Addresses Format:</value>
</data>
<data name="locMediaLibrary.Text" xml:space="preserve">
<value>DVD Media Library</value>
</data>
<data name="locNetworkAdapter.Text" xml:space="preserve">
<value>Network Adapter</value>
</data>
<data name="locOSTemplatesPath.Text" xml:space="preserve">
<value>OS Templates path:</value>
</data>
<data name="locPatternText.Text" xml:space="preserve">
<value>When user is not allowed to specify their custom host name the system will generate the host name for new VPS based on this pattern.&lt;br/&gt;&lt;br/&gt;
The following substitution variables can be used in the pattern:&lt;br/&gt;
[USERNAME], [USER_ID], [SPACE_ID]</value>
</data>
<data name="locPreferredNameServer.Text" xml:space="preserve">
<value>Preferred Name Server:</value>
</data>
<data name="locPrivateNetwork.Text" xml:space="preserve">
<value>Private Network</value>
</data>
<data name="locResellerAccountText.Text" xml:space="preserve">
<value>For automatic provisioning of WebsitePanel control panel inside VPS please enter WebsitePanel reseller account details below:</value>
</data>
<data name="locResellerConfirmPassword.Text" xml:space="preserve">
<value>Confirm password:</value>
</data>
<data name="locResellerPassword.Text" xml:space="preserve">
<value>Password:</value>
</data>
<data name="locResellerUsername.Text" xml:space="preserve">
<value>Username:</value>
</data>
<data name="locSeconds.Text" xml:space="preserve">
<value>seconds</value>
</data>
<data name="locStartAction.Text" xml:space="preserve">
<value>Automatic Start Action</value>
</data>
<data name="locStartOptionsText.Text" xml:space="preserve">
<value>What do you want VPS to do when the physical computer starts?</value>
</data>
<data name="locStartupDelay.Text" xml:space="preserve">
<value>Startup delay:</value>
</data>
<data name="locStartupDelayText.Text" xml:space="preserve">
<value>Specify a startup delay to reduce resource contention between virtual machines.</value>
</data>
<data name="locStopAction.Text" xml:space="preserve">
<value>Automatic Stop Action</value>
</data>
<data name="locStopActionText.Text" xml:space="preserve">
<value>What do you want VPS to do when the physical shuts down?</value>
</data>
<data name="locSubnetMask.Text" xml:space="preserve">
<value>Subnet Mask:</value>
</data>
<data name="locVhd.Text" xml:space="preserve">
<value>Virtual Hard Drive</value>
</data>
<data name="locVpsFolderIncludes.Text" xml:space="preserve">
<value>VPS folder includes:</value>
</data>
<data name="locVpsRootFolder.Text" xml:space="preserve">
<value>VPS root folder:</value>
</data>
<data name="ddlPrivateNetworkFormat10.Text" xml:space="preserve">
<value>10.0.0.1/8</value>
</data>
<data name="ddlPrivateNetworkFormat172.Text" xml:space="preserve">
<value>172.16.0.1/12</value>
</data>
<data name="ddlPrivateNetworkFormat192.Text" xml:space="preserve">
<value>192.168.0.1/16</value>
</data>
<data name="radioStartActionAlwaysStart.Text" xml:space="preserve">
<value>Always start VPS automatically</value>
</data>
<data name="radioStartActionNothing.Text" xml:space="preserve">
<value>Nothing</value>
</data>
<data name="radioStartActionStart.Text" xml:space="preserve">
<value>Automatically start if it was running when the service stopped</value>
</data>
<data name="radioStopActionSave.Text" xml:space="preserve">
<value>Save VPS state</value>
</data>
<data name="radioStopActionShutDown.Text" xml:space="preserve">
<value>Shut down VPS operating system</value>
</data>
<data name="radioStopActionTurnOff.Text" xml:space="preserve">
<value>Turn off VPS</value>
</data>
<data name="radioVirtualDiskTypeDynamic.Text" xml:space="preserve">
<value>Dynamically expanding</value>
</data>
<data name="radioVirtualDiskTypeFixed.Text" xml:space="preserve">
<value>Fixed size</value>
</data>
<data name="radioVpsFolderIncludesID.Text" xml:space="preserve">
<value>VPS identifier, for example "843FA-A0B2-34404"</value>
</data>
<data name="radioVpsFolderIncludesName.Text" xml:space="preserve">
<value>VPS host name, for example "vps1.domain.com"</value>
</data>
<data name="RootFolderValidator.ErrorMessage" xml:space="preserve">
<value>Enter VPS root folder</value>
</data>
<data name="StartupDelayValidator.ErrorMessage" xml:space="preserve">
<value>Startup delay could not be blank</value>
</data>
<data name="SubnetMaskValidator.ErrorMessage" xml:space="preserve">
<value>Enter subnet mask</value>
</data>
<data name="TemplatesPathValidator.ErrorMessage" xml:space="preserve">
<value>Enter OS templates folder</value>
</data>
<data name="CpuLimitValidator.ErrorMessage" xml:space="preserve">
<value>Enter processor limit per VPS</value>
</data>
<data name="CpuReserveValidator.ErrorMessage" xml:space="preserve">
<value>Enter processor reserve per VPS</value>
</data>
<data name="CpuWeightValidator.ErrorMessage" xml:space="preserve">
<value>Enter relative processor weight per VPS</value>
</data>
<data name="locCpuLimit.Text" xml:space="preserve">
<value>Virtual machine limit:</value>
</data>
<data name="locCpuReserve.Text" xml:space="preserve">
<value>Virtual machine reserve:</value>
</data>
<data name="locCpuWeight.Text" xml:space="preserve">
<value>Relative weight:</value>
</data>
<data name="locFolderVariables.Text" xml:space="preserve">
<value>The following variables are supported: [VPS_HOSTNAME], [USERNAME], [USER_ID], [SPACE_ID]</value>
</data>
<data name="locProcessorSettings.Text" xml:space="preserve">
<value>Processor Resource Settings</value>
</data>
<data name="btnConnect.Text" xml:space="preserve">
<value>Connect</value>
</data>
<data name="ErrorReadingNetworksList.Text" xml:space="preserve">
<value>&lt;Cannot read networks list&gt;</value>
</data>
<data name="locErrorReadingNetworksList.Text" xml:space="preserve">
<value>&lt;br/&gt;&lt;b&gt;Unable to connect to Hyper-V server&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Possible reasons:&lt;ol&gt;&lt;li&gt;You are going to manage remote Hyper-V server (either Server Core or Hyper-V Server 2008 machine) where WebsitePanel Server is not installed. Type the correct server name at the top of this form and then click "Connect" button.&lt;/li&gt;&lt;li&gt;WebsitePanel Server has insufficient permissions to connect remote Hyper-V server. Please refer administrator guide for client and server setup instructions.&lt;/li&gt;&lt;li&gt;Lost connectivity with WebsitePanel Server installed on Hyper-V virtualization server. Check connectivity and open service properties page once again.&lt;/li&gt;&lt;/ol&gt;</value>
</data>
<data name="locHyperVServer.Text" xml:space="preserve">
<value>Hyper-V Server</value>
</data>
<data name="locServerName.Text" xml:space="preserve">
<value>Server name:</value>
</data>
<data name="radioServerLocal.Text" xml:space="preserve">
<value>&lt;b&gt;Local&lt;/b&gt; - Hyper-V role is installed on this server</value>
</data>
<data name="radioServerRemote.Text" xml:space="preserve">
<value>&lt;b&gt;Remote&lt;/b&gt; - Remote Windows 2008 Server Core or Hyper-V Server 2008</value>
</data>
<data name="ServerNameValidator.ErrorMessage" xml:space="preserve">
<value>Enter server name</value>
</data>
<data name="ddlManagementNetworks.Text" xml:space="preserve">
<value>&lt;Do not connect VPS to Management Network&gt;</value>
</data>
<data name="locManagementNetwork.Text" xml:space="preserve">
<value>Management Network</value>
</data>
<data name="locManagementNetworkName.Text" xml:space="preserve">
<value>Connect to Network:</value>
</data>
<data name="ddlManageNicConfigDhcp.Text" xml:space="preserve">
<value>DHCP</value>
</data>
<data name="ddlManageNicConfigPool.Text" xml:space="preserve">
<value>IP Addresses Pool</value>
</data>
<data name="ddlPrivateNetworkFormatCustom.Text" xml:space="preserve">
<value>Custom</value>
</data>
<data name="locManageNicConfig.Text" xml:space="preserve">
<value>Network Card Configuration:</value>
</data>
<data name="locPrivCustomFormat.Text" xml:space="preserve">
<value>IP Address / CIDR:</value>
</data>
<data name="privateSubnetMaskValidator.ErrorMessage" xml:space="preserve">
<value>Enter subnet mask in CIDR format</value>
</data>
<data name="chkAssignIPAutomatically.Text" xml:space="preserve">
<value>Automatically assign IP addresses to the space on creation</value>
</data>
<data name="lblCoreSvcEndpoint.Text" xml:space="preserve">
<value>Core Svc Endpoint</value>
</data>
<data name="lblSCCMEndPoint.Text" xml:space="preserve">
<value>SCCM Endpoint</value>
</data>
<data name="lblSCCMServer.Text" xml:space="preserve">
<value>SCCM Server</value>
</data>
<data name="lblSCDPMEndPoint.Text" xml:space="preserve">
<value>SCDPM Endpoint</value>
</data>
<data name="lblSCDPMServer.Text" xml:space="preserve">
<value>SCDPM Server</value>
</data>
<data name="lblSCOMEndPoint.Text" xml:space="preserve">
<value>SCOM Endpoint</value>
</data>
<data name="lblSCOMServer.Text" xml:space="preserve">
<value>SCOM Server</value>
</data>
<data name="lblSCVMMEndPoint.Text" xml:space="preserve">
<value>SCVMM Endpoint</value>
</data>
<data name="lblSCVMMServer.Text" xml:space="preserve">
<value>SCVMM Server</value>
</data>
<data name="lblStorageEndPoint.Text" xml:space="preserve">
<value>Storage Endpoint</value>
</data>
<data name="locHyperVCloud.Text" xml:space="preserve">
<value>Hyper-V Cloud</value>
</data>
</root>

View file

@ -0,0 +1,408 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HyperV2012R2_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.HyperV2012R2_Settings" %>
<%@ Register Src="../UserControls/EditIPAddressControl.ascx" TagName="EditIPAddressControl" TagPrefix="wsp" %>
<asp:ValidationSummary ID="ValidationSummary" runat="server" ShowMessageBox="true" ShowSummary="false" />
<fieldset>
<legend>
<asp:Localize ID="locHyperVServer" runat="server" meta:resourcekey="locHyperVServer" Text="Hyper-V Server"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" style="margin: 10px;">
<tr>
<td colspan="2">
<asp:RadioButtonList ID="radioServer" runat="server" AutoPostBack="true"
onselectedindexchanged="radioServer_SelectedIndexChanged">
<asp:ListItem Value="local" meta:resourcekey="radioServerLocal" Selected="True">Local</asp:ListItem>
<asp:ListItem Value="remote" meta:resourcekey="radioServerRemote">Remote</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr id="ServerNameRow" runat="server">
<td class="SubHead" style="padding-left:30px;" colspan="2">
<asp:Localize ID="locServerName" runat="server" meta:resourcekey="locServerName" Text="Server name:"></asp:Localize>
<asp:TextBox Width="200px" CssClass="NormalTextBox" Runat="server" ID="txtServerName"></asp:TextBox>
<asp:Button ID="btnConnect" runat="server" meta:resourcekey="btnConnect"
CssClass="Button1" Text="Connect" CausesValidation="false"
onclick="btnConnect_Click" />
<asp:RequiredFieldValidator ID="ServerNameValidator" runat="server" ControlToValidate="txtServerName"
Text="*" meta:resourcekey="ServerNameValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr id="ServerErrorRow" runat="server">
<td colspan="2">
<asp:Label ID="locErrorReadingNetworksList" runat="server"
meta:resourcekey="locErrorReadingNetworksList" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locGeneralSettings" runat="server" meta:resourcekey="locGeneralSettings" Text="General Settings"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locVpsRootFolder" runat="server" meta:resourcekey="locVpsRootFolder" Text="VPS root folder:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="400px" CssClass="NormalTextBox" Runat="server" ID="txtVpsRootFolder"></asp:TextBox>
<asp:RequiredFieldValidator ID="RootFolderValidator" runat="server" ControlToValidate="txtVpsRootFolder"
Text="*" meta:resourcekey="RootFolderValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Localize ID="locFolderVariables" runat="server" meta:resourcekey="locFolderVariables" Text="The following variables..."></asp:Localize>
<br />
<br />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locOSTemplatesPath" runat="server" meta:resourcekey="locOSTemplatesPath" Text="OS Templates path:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="300px" CssClass="NormalTextBox" Runat="server" ID="txtOSTemplatesPath"></asp:TextBox>
<asp:RequiredFieldValidator ID="TemplatesPathValidator" runat="server" ControlToValidate="txtOSTemplatesPath"
Text="*" meta:resourcekey="TemplatesPathValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locExportedVpsPath" runat="server" meta:resourcekey="locExportedVpsPath" Text="Exported VPS path:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="300px" CssClass="NormalTextBox" Runat="server" ID="txtExportedVpsPath"></asp:TextBox>
<asp:RequiredFieldValidator ID="ExportedVpsPathValidator" runat="server" ControlToValidate="txtExportedVpsPath"
Text="*" meta:resourcekey="ExportedVpsPathValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locProcessorSettings" runat="server" meta:resourcekey="locProcessorSettings" Text="Processor Resource Settings"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locCpuReserve" runat="server" meta:resourcekey="locCpuReserve" Text="Virtual machine reserve:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="50px" CssClass="NormalTextBox" Runat="server" ID="txtCpuReserve"></asp:TextBox>
%
<asp:RequiredFieldValidator ID="CpuReserveValidator" runat="server" ControlToValidate="txtCpuReserve"
Text="*" meta:resourcekey="CpuReserveValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locCpuLimit" runat="server" meta:resourcekey="locCpuLimit" Text="Virtual machine limit:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="50px" CssClass="NormalTextBox" Runat="server" ID="txtCpuLimit"></asp:TextBox>
%
<asp:RequiredFieldValidator ID="CpuLimitValidator" runat="server" ControlToValidate="txtCpuLimit"
Text="*" meta:resourcekey="CpuLimitValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locCpuWeight" runat="server" meta:resourcekey="locCpuWeight" Text="Relative weight:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="50px" CssClass="NormalTextBox" Runat="server" ID="txtCpuWeight"></asp:TextBox>
<asp:RequiredFieldValidator ID="CpuWeightValidator" runat="server" ControlToValidate="txtCpuWeight"
Text="*" meta:resourcekey="CpuWeightValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locMediaLibrary" runat="server" meta:resourcekey="locMediaLibrary" Text="DVD Media Library"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locDvdIsoPath" runat="server" meta:resourcekey="locDvdIsoPath" Text="Path to DVD ISO files:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="300px" CssClass="NormalTextBox" Runat="server" ID="txtDvdLibraryPath"></asp:TextBox>
<asp:RequiredFieldValidator ID="DvdLibraryPathValidator" runat="server" ControlToValidate="txtDvdLibraryPath"
Text="*" meta:resourcekey="DvdLibraryPathValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locVhd" runat="server" meta:resourcekey="locVhd" Text="Virtual Hard Drive"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;" valign="top">
<asp:Localize ID="locDiskType" runat="server" meta:resourcekey="locDiskType" Text="Disk Type:"></asp:Localize>
</td>
<td>
<asp:RadioButtonList ID="radioVirtualDiskType" runat="server">
<asp:ListItem Value="dynamic" meta:resourcekey="radioVirtualDiskTypeDynamic" Selected="True">Dynamic</asp:ListItem>
<asp:ListItem Value="fixed" meta:resourcekey="radioVirtualDiskTypeFixed">Fixed</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locExternalNetwork" runat="server" meta:resourcekey="locExternalNetwork" Text="External Network"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locExternalNetworkName" runat="server" meta:resourcekey="locExternalNetworkName" Text="Connect to Network:"></asp:Localize>
</td>
<td>
<asp:DropDownList ID="ddlExternalNetworks" runat="server" CssClass="NormalTextBox" Width="450"
DataValueField="SwitchId" DataTextField="Name"></asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locPreferredNameServer" runat="server" meta:resourcekey="locPreferredNameServer" Text="Preferred Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="externalPreferredNameServer" runat="server" Required="true" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locAlternateNameServer" runat="server" meta:resourcekey="locAlternateNameServer" Text="Alternate Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="externalAlternateNameServer" runat="server" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox ID="chkAssignIPAutomatically" runat="server" meta:resourcekey="chkAssignIPAutomatically" Text="Assign IP addresses to the space on creation" />
</td>
</tr>
</table>
</fieldset>
<br />
<asp:UpdatePanel ID="ManageUpdatePanel" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<fieldset>
<legend>
<asp:Localize ID="locManagementNetwork" runat="server" meta:resourcekey="locManagementNetwork" Text="Management Network"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td style="width:200px;">
<asp:Localize ID="locManagementNetworkName" runat="server" meta:resourcekey="locManagementNetworkName" Text="Connect to Network:"></asp:Localize>
</td>
<td>
<asp:DropDownList ID="ddlManagementNetworks" runat="server"
CssClass="NormalTextBox" Width="450"
DataValueField="SwitchId" DataTextField="Name" AutoPostBack="true"
onselectedindexchanged="ddlManagementNetworks_SelectedIndexChanged"></asp:DropDownList>
</td>
</tr>
<tr id="ManageNicConfigRow" runat="server">
<td>
<asp:Localize ID="locManageNicConfig" runat="server" meta:resourcekey="locManageNicConfig" Text="Network Adapter Configuration:"></asp:Localize>
</td>
<td>
<asp:DropDownList ID="ddlManageNicConfig" runat="server" AutoPostBack="true"
onselectedindexchanged="ddlManageNicConfig_SelectedIndexChanged">
<asp:ListItem Value="Pool" meta:resourcekey="ddlManageNicConfigPool" Selected="True">POOL</asp:ListItem>
<asp:ListItem Value="DHCP" meta:resourcekey="ddlManageNicConfigDhcp">DHCP</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr id="ManagePreferredNameServerRow" runat="server">
<td>
<asp:Localize ID="locManagePreferredNameServer" runat="server" meta:resourcekey="locPreferredNameServer" Text="Preferred Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="managePreferredNameServer" runat="server" Required="true" />
</td>
</tr>
<tr id="ManageAlternateNameServerRow" runat="server">
<td>
<asp:Localize ID="locManageAlternateNameServer" runat="server" meta:resourcekey="locAlternateNameServer" Text="Alternate Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="manageAlternateNameServer" runat="server" />
</td>
</tr>
</table>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="PrivUpdatePanel" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
<fieldset>
<legend>
<asp:Localize ID="locPrivateNetwork" runat="server" meta:resourcekey="locPrivateNetwork" Text="Private Network"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locIPFormat" runat="server" meta:resourcekey="locIPFormat" Text="IP addresses format:"></asp:Localize>
</td>
<td>
<asp:DropDownList ID="ddlPrivateNetworkFormat" runat="server"
AutoPostBack="true" onselectedindexchanged="ddlPrivateNetworkFormat_SelectedIndexChanged">
<asp:ListItem Value="" meta:resourcekey="ddlPrivateNetworkFormatCustom">Custom</asp:ListItem>
<asp:ListItem Value="192.168.0.1/16" meta:resourcekey="ddlPrivateNetworkFormat192" Selected="True">192.168.0.1</asp:ListItem>
<asp:ListItem Value="172.16.0.1/12" meta:resourcekey="ddlPrivateNetworkFormat172">172.16.0.1</asp:ListItem>
<asp:ListItem Value="10.0.0.1/8" meta:resourcekey="ddlPrivateNetworkFormat10">10.0.0.1</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr id="PrivCustomFormatRow" runat="server">
<td class="SubHead">
<asp:Localize ID="locPrivCustomFormat" runat="server" meta:resourcekey="locPrivCustomFormat" Text="Start IP Address:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="privateIPAddress" runat="server" Required="true" />
/
<asp:TextBox ID="privateSubnetMask" runat="server" MaxLength="3" Width="40px" CssClass="NormalTextBox"></asp:TextBox>
<asp:RequiredFieldValidator ID="privateSubnetMaskValidator" runat="server" ControlToValidate="privateSubnetMask"
Text="*" meta:resourcekey="privateSubnetMaskValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locPrivDefaultGateway" runat="server" meta:resourcekey="locDefaultGateway" Text="Default Gateway:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="privateDefaultGateway" runat="server" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locPrivPreferredNameServer" runat="server" meta:resourcekey="locPreferredNameServer" Text="Preferred Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="privatePreferredNameServer" runat="server" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Localize ID="locPrivAlternateNameServer" runat="server" meta:resourcekey="locAlternateNameServer" Text="Alternate Name Server:"></asp:Localize>
</td>
<td>
<wsp:EditIPAddressControl id="privateAlternateNameServer" runat="server" />
</td>
</tr>
</table>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<fieldset>
<legend>
<asp:Localize ID="locHostname" runat="server" meta:resourcekey="locHostname" Text="Host name"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td class="SubHead" style="width:200px;">
<asp:Localize ID="locHostnamePattern" runat="server" meta:resourcekey="locHostnamePattern" Text="VPS host name pattern:"></asp:Localize>
</td>
<td>
<asp:TextBox Width="200px" CssClass="NormalTextBox" Runat="server" ID="txtHostnamePattern"></asp:TextBox>
<asp:RequiredFieldValidator ID="HostnamePatternValidator" runat="server" ControlToValidate="txtHostnamePattern"
Text="*" meta:resourcekey="HostnamePatternValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
</table>
<p style="margin: 10px;">
<asp:Localize ID="locPatternText" runat="server" meta:resourcekey="locPatternText" Text="Help text goes here..."></asp:Localize>
</p>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locStartAction" runat="server" meta:resourcekey="locStartAction" Text="Automatic Start Action"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td>
<asp:Localize ID="locStartOptionsText" runat="server" meta:resourcekey="locStartOptionsText" Text="What do you want VPS to do when the physical computer starts?"></asp:Localize>
</td>
</tr>
<tr>
<td>
<asp:RadioButtonList ID="radioStartAction" runat="server">
<asp:ListItem Value="0" meta:resourcekey="radioStartActionNothing">Nothing</asp:ListItem>
<asp:ListItem Value="1" meta:resourcekey="radioStartActionStart" Selected="True">Start</asp:ListItem>
<asp:ListItem Value="2" meta:resourcekey="radioStartActionAlwaysStart">AlwaysStart</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td>
<asp:Localize ID="locStartupDelayText" runat="server" meta:resourcekey="locStartupDelayText" Text="Specify a startup delay to reduce resource contention between virtual machines."></asp:Localize>
</td>
</tr>
<tr>
<td>
<asp:Localize ID="locStartupDelay" runat="server" meta:resourcekey="locStartupDelay" Text="Startup delay:"></asp:Localize>
<asp:TextBox ID="txtStartupDelay" runat="server" Width="30px"></asp:TextBox>
<asp:Localize ID="locSeconds" runat="server" meta:resourcekey="locSeconds" Text="seconds"></asp:Localize>
<asp:RequiredFieldValidator ID="StartupDelayValidator" runat="server" ControlToValidate="txtStartupDelay"
Text="*" meta:resourcekey="StartupDelayValidator" Display="Dynamic" SetFocusOnError="true" />
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend>
<asp:Localize ID="locStopAction" runat="server" meta:resourcekey="locStopAction" Text="Automatic Stop Action"></asp:Localize>
</legend>
<table cellpadding="2" cellspacing="0" width="100%" style="margin: 10px;">
<tr>
<td>
<asp:Localize ID="locStopActionText" runat="server" meta:resourcekey="locStopActionText" Text="What do you want VPS to do when the physical shuts down?"></asp:Localize>
</td>
</tr>
<tr>
<td>
<asp:RadioButtonList ID="radioStopAction" runat="server">
<asp:ListItem Value="1" meta:resourcekey="radioStopActionSave">Save</asp:ListItem>
<asp:ListItem Value="0" meta:resourcekey="radioStopActionTurnOff">TurnOff</asp:ListItem>
<asp:ListItem Value="2" meta:resourcekey="radioStopActionShutDown" Selected="True">ShutDown</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</table>
</fieldset>
<br />

View file

@ -0,0 +1,227 @@
// Copyright (c) 2015, 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;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Specialized;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.EnterpriseServer;
using System.Web.UI.MobileControls;
using System.Collections.Generic;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class HyperV2012R2_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{
protected void Page_Load(object sender, EventArgs e)
{
}
void IHostingServiceProviderSettings.BindSettings(StringDictionary settings)
{
txtServerName.Text = settings["ServerName"];
radioServer.SelectedIndex = (txtServerName.Text == "") ? 0 : 1;
// bind networks
BindNetworksList();
// general settings
txtVpsRootFolder.Text = settings["RootFolder"];
txtOSTemplatesPath.Text = settings["OsTemplatesPath"];
txtExportedVpsPath.Text = settings["ExportedVpsPath"];
// CPU
txtCpuLimit.Text = settings["CpuLimit"];
txtCpuReserve.Text = settings["CpuReserve"];
txtCpuWeight.Text = settings["CpuWeight"];
// DVD library
txtDvdLibraryPath.Text = settings["DvdLibraryPath"];
// VHD type
radioVirtualDiskType.SelectedValue = settings["VirtualDiskType"];
// External network
ddlExternalNetworks.SelectedValue = settings["ExternalNetworkId"];
externalPreferredNameServer.Text = settings["ExternalPreferredNameServer"];
externalAlternateNameServer.Text = settings["ExternalAlternateNameServer"];
chkAssignIPAutomatically.Checked = Utils.ParseBool(settings["AutoAssignExternalIP"], true);
// Private network
ddlPrivateNetworkFormat.SelectedValue = settings["PrivateNetworkFormat"];
privateIPAddress.Text = settings["PrivateIPAddress"];
privateSubnetMask.Text = settings["PrivateSubnetMask"];
privateDefaultGateway.Text = settings["PrivateDefaultGateway"];
privatePreferredNameServer.Text = settings["PrivatePreferredNameServer"];
privateAlternateNameServer.Text = settings["PrivateAlternateNameServer"];
// Management network
ddlManagementNetworks.SelectedValue = settings["ManagementNetworkId"];
ddlManageNicConfig.SelectedValue = settings["ManagementNicConfig"];
managePreferredNameServer.Text = settings["ManagementPreferredNameServer"];
manageAlternateNameServer.Text = settings["ManagementAlternateNameServer"];
// host name
txtHostnamePattern.Text = settings["HostnamePattern"];
// start action
radioStartAction.SelectedValue = settings["StartAction"];
txtStartupDelay.Text = settings["StartupDelay"];
// stop
radioStopAction.SelectedValue = settings["StopAction"];
ToggleControls();
}
void IHostingServiceProviderSettings.SaveSettings(StringDictionary settings)
{
settings["ServerName"] = txtServerName.Text.Trim();
// general settings
settings["RootFolder"] = txtVpsRootFolder.Text.Trim();
settings["OsTemplatesPath"] = txtOSTemplatesPath.Text.Trim();
settings["ExportedVpsPath"] = txtExportedVpsPath.Text.Trim();
// CPU
settings["CpuLimit"] = txtCpuLimit.Text.Trim();
settings["CpuReserve"] = txtCpuReserve.Text.Trim();
settings["CpuWeight"] = txtCpuWeight.Text.Trim();
// DVD library
settings["DvdLibraryPath"] = txtDvdLibraryPath.Text.Trim();
// VHD type
settings["VirtualDiskType"] = radioVirtualDiskType.SelectedValue;
// External network
settings["ExternalNetworkId"] = ddlExternalNetworks.SelectedValue;
settings["ExternalPreferredNameServer"] = externalPreferredNameServer.Text;
settings["ExternalAlternateNameServer"] = externalAlternateNameServer.Text;
settings["AutoAssignExternalIP"] = chkAssignIPAutomatically.Checked.ToString();
// Private network
settings["PrivateNetworkFormat"] = ddlPrivateNetworkFormat.SelectedValue;
settings["PrivateIPAddress"] = ddlPrivateNetworkFormat.SelectedIndex == 0 ? privateIPAddress.Text : "";
settings["PrivateSubnetMask"] = ddlPrivateNetworkFormat.SelectedIndex == 0 ? privateSubnetMask.Text : "";
settings["PrivateDefaultGateway"] = privateDefaultGateway.Text;
settings["PrivatePreferredNameServer"] = privatePreferredNameServer.Text;
settings["PrivateAlternateNameServer"] = privateAlternateNameServer.Text;
// Management network
settings["ManagementNetworkId"] = ddlManagementNetworks.SelectedValue;
settings["ManagementNicConfig"] = ddlManageNicConfig.SelectedValue;
settings["ManagementPreferredNameServer"] = ddlManageNicConfig.SelectedIndex == 0 ? managePreferredNameServer.Text : "";
settings["ManagementAlternateNameServer"] = ddlManageNicConfig.SelectedIndex == 0 ? manageAlternateNameServer.Text : "";
// host name
settings["HostnamePattern"] = txtHostnamePattern.Text.Trim();
// start action
settings["StartAction"] = radioStartAction.SelectedValue;
settings["StartupDelay"] = Utils.ParseInt(txtStartupDelay.Text.Trim(), 0).ToString();
// stop
settings["StopAction"] = radioStopAction.SelectedValue;
}
private void BindNetworksList()
{
try
{
VirtualSwitch[] switches = ES.Services.VPS.GetExternalSwitches(PanelRequest.ServiceId, txtServerName.Text.Trim());
ddlExternalNetworks.DataSource = switches;
ddlExternalNetworks.DataBind();
ddlManagementNetworks.DataSource = switches;
ddlManagementNetworks.DataBind();
ddlManagementNetworks.Items.Insert(0, new ListItem(GetLocalizedString("ddlManagementNetworks.Text"), ""));
locErrorReadingNetworksList.Visible = false;
}
catch
{
ddlExternalNetworks.Items.Add(new ListItem(GetLocalizedString("ErrorReadingNetworksList.Text"), ""));
ddlManagementNetworks.Items.Add(new ListItem(GetLocalizedString("ErrorReadingNetworksList.Text"), ""));
locErrorReadingNetworksList.Visible = true;
}
}
private void ToggleControls()
{
ServerNameRow.Visible = (radioServer.SelectedIndex == 1);
if (radioServer.SelectedIndex == 0)
{
txtServerName.Text = "";
}
// private network
PrivCustomFormatRow.Visible = (ddlPrivateNetworkFormat.SelectedIndex == 0);
// management network
ManageNicConfigRow.Visible = (ddlManagementNetworks.SelectedIndex > 0);
ManageAlternateNameServerRow.Visible = ManageNicConfigRow.Visible && (ddlManageNicConfig.SelectedIndex == 0);
ManagePreferredNameServerRow.Visible = ManageNicConfigRow.Visible && (ddlManageNicConfig.SelectedIndex == 0);
}
protected void radioServer_SelectedIndexChanged(object sender, EventArgs e)
{
ToggleControls();
}
protected void btnConnect_Click(object sender, EventArgs e)
{
BindNetworksList();
}
protected void ddlPrivateNetworkFormat_SelectedIndexChanged(object sender, EventArgs e)
{
ToggleControls();
}
protected void ddlManageNicConfig_SelectedIndexChanged(object sender, EventArgs e)
{
ToggleControls();
}
protected void ddlManagementNetworks_SelectedIndexChanged(object sender, EventArgs e)
{
ToggleControls();
}
}
}

View file

@ -0,0 +1,825 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ProviderControls {
public partial class HyperV2012R2_Settings {
/// <summary>
/// ValidationSummary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary;
/// <summary>
/// locHyperVServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locHyperVServer;
/// <summary>
/// radioServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList radioServer;
/// <summary>
/// ServerNameRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow ServerNameRow;
/// <summary>
/// locServerName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locServerName;
/// <summary>
/// txtServerName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtServerName;
/// <summary>
/// btnConnect control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnConnect;
/// <summary>
/// ServerNameValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator ServerNameValidator;
/// <summary>
/// ServerErrorRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow ServerErrorRow;
/// <summary>
/// locErrorReadingNetworksList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label locErrorReadingNetworksList;
/// <summary>
/// locGeneralSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locGeneralSettings;
/// <summary>
/// locVpsRootFolder control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locVpsRootFolder;
/// <summary>
/// txtVpsRootFolder control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtVpsRootFolder;
/// <summary>
/// RootFolderValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RootFolderValidator;
/// <summary>
/// locFolderVariables control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locFolderVariables;
/// <summary>
/// locOSTemplatesPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locOSTemplatesPath;
/// <summary>
/// txtOSTemplatesPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtOSTemplatesPath;
/// <summary>
/// TemplatesPathValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator TemplatesPathValidator;
/// <summary>
/// locExportedVpsPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locExportedVpsPath;
/// <summary>
/// txtExportedVpsPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtExportedVpsPath;
/// <summary>
/// ExportedVpsPathValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator ExportedVpsPathValidator;
/// <summary>
/// locProcessorSettings control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locProcessorSettings;
/// <summary>
/// locCpuReserve control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locCpuReserve;
/// <summary>
/// txtCpuReserve control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtCpuReserve;
/// <summary>
/// CpuReserveValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator CpuReserveValidator;
/// <summary>
/// locCpuLimit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locCpuLimit;
/// <summary>
/// txtCpuLimit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtCpuLimit;
/// <summary>
/// CpuLimitValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator CpuLimitValidator;
/// <summary>
/// locCpuWeight control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locCpuWeight;
/// <summary>
/// txtCpuWeight control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtCpuWeight;
/// <summary>
/// CpuWeightValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator CpuWeightValidator;
/// <summary>
/// locMediaLibrary control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locMediaLibrary;
/// <summary>
/// locDvdIsoPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locDvdIsoPath;
/// <summary>
/// txtDvdLibraryPath control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtDvdLibraryPath;
/// <summary>
/// DvdLibraryPathValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator DvdLibraryPathValidator;
/// <summary>
/// locVhd control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locVhd;
/// <summary>
/// locDiskType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locDiskType;
/// <summary>
/// radioVirtualDiskType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList radioVirtualDiskType;
/// <summary>
/// locExternalNetwork control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locExternalNetwork;
/// <summary>
/// locExternalNetworkName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locExternalNetworkName;
/// <summary>
/// ddlExternalNetworks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlExternalNetworks;
/// <summary>
/// locPreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPreferredNameServer;
/// <summary>
/// externalPreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl externalPreferredNameServer;
/// <summary>
/// locAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locAlternateNameServer;
/// <summary>
/// externalAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl externalAlternateNameServer;
/// <summary>
/// chkAssignIPAutomatically control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkAssignIPAutomatically;
/// <summary>
/// ManageUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ManageUpdatePanel;
/// <summary>
/// locManagementNetwork control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locManagementNetwork;
/// <summary>
/// locManagementNetworkName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locManagementNetworkName;
/// <summary>
/// ddlManagementNetworks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlManagementNetworks;
/// <summary>
/// ManageNicConfigRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow ManageNicConfigRow;
/// <summary>
/// locManageNicConfig control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locManageNicConfig;
/// <summary>
/// ddlManageNicConfig control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlManageNicConfig;
/// <summary>
/// ManagePreferredNameServerRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow ManagePreferredNameServerRow;
/// <summary>
/// locManagePreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locManagePreferredNameServer;
/// <summary>
/// managePreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl managePreferredNameServer;
/// <summary>
/// ManageAlternateNameServerRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow ManageAlternateNameServerRow;
/// <summary>
/// locManageAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locManageAlternateNameServer;
/// <summary>
/// manageAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl manageAlternateNameServer;
/// <summary>
/// PrivUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel PrivUpdatePanel;
/// <summary>
/// locPrivateNetwork control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPrivateNetwork;
/// <summary>
/// locIPFormat control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locIPFormat;
/// <summary>
/// ddlPrivateNetworkFormat control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlPrivateNetworkFormat;
/// <summary>
/// PrivCustomFormatRow control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow PrivCustomFormatRow;
/// <summary>
/// locPrivCustomFormat control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPrivCustomFormat;
/// <summary>
/// privateIPAddress control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl privateIPAddress;
/// <summary>
/// privateSubnetMask control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox privateSubnetMask;
/// <summary>
/// privateSubnetMaskValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator privateSubnetMaskValidator;
/// <summary>
/// locPrivDefaultGateway control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPrivDefaultGateway;
/// <summary>
/// privateDefaultGateway control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl privateDefaultGateway;
/// <summary>
/// locPrivPreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPrivPreferredNameServer;
/// <summary>
/// privatePreferredNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl privatePreferredNameServer;
/// <summary>
/// locPrivAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPrivAlternateNameServer;
/// <summary>
/// privateAlternateNameServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.EditIPAddressControl privateAlternateNameServer;
/// <summary>
/// locHostname control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locHostname;
/// <summary>
/// locHostnamePattern control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locHostnamePattern;
/// <summary>
/// txtHostnamePattern control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtHostnamePattern;
/// <summary>
/// HostnamePatternValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator HostnamePatternValidator;
/// <summary>
/// locPatternText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locPatternText;
/// <summary>
/// locStartAction control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStartAction;
/// <summary>
/// locStartOptionsText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStartOptionsText;
/// <summary>
/// radioStartAction control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList radioStartAction;
/// <summary>
/// locStartupDelayText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStartupDelayText;
/// <summary>
/// locStartupDelay control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStartupDelay;
/// <summary>
/// txtStartupDelay control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtStartupDelay;
/// <summary>
/// locSeconds control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locSeconds;
/// <summary>
/// StartupDelayValidator control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator StartupDelayValidator;
/// <summary>
/// locStopAction control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStopAction;
/// <summary>
/// locStopActionText control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locStopActionText;
/// <summary>
/// radioStopAction control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList radioStopAction;
}
}

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="cbAdministrators.Text" xml:space="preserve">
<value>Administrators</value>
</data>
<data name="cbUsers.Text" xml:space="preserve">
<value>Users</value>
</data>
<data name="secDriveSpace.Text" xml:space="preserve">
<value>Drive Space Threshold</value>
</data>
<data name="secHideCDrive.Text" xml:space="preserve">
<value>Hide C: Drive</value>
</data>
<data name="secPowershellCommand.Text" xml:space="preserve">
<value>Remove "Powershell" Command</value>
</data>
<data name="secRunCommand.Text" xml:space="preserve">
<value>Remove "Run" Command</value>
</data>
<data name="secScreenSaver.Text" xml:space="preserve">
<value>Disable Screen Saver</value>
</data>
<data name="secShutdown.Text" xml:space="preserve">
<value>Remove Shutdown and Restart</value>
</data>
<data name="secTaskManager.Text" xml:space="preserve">
<value>Disable Task Manager</value>
</data>
<data name="secTimeout.Text" xml:space="preserve">
<value>Lock Screen Timeout</value>
</data>
<data name="sekChangeDesktop.Text" xml:space="preserve">
<value>Changing Desktop Disabled</value>
</data>
</root>

View file

@ -0,0 +1,163 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditUserExperience.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditUserExperience" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="imgEditRDSCollection" SkinID="EnterpriseStorageSpace48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit RDS Collection"></asp:Localize>
-
<asp:Literal ID="litCollectionName" runat="server" Text="" />
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="rds_collection_user_experience" />
<wsp:CollapsiblePanel id="secTimeout" runat="server" TargetControlID="timeoutPanel" meta:resourcekey="secTimeout" Text="Lock Screen Timeout"/>
<asp:Panel ID="timeoutPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td colspan="2">
<asp:TextBox ID="txtTimeout" runat="server" CssClass="TextBox200" ></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbTimeoutUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbTimeoutAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secRunCommand" runat="server" TargetControlID="runCommandPanel" meta:resourcekey="secRunCommand" Text="Remove Run Command"/>
<asp:Panel ID="runCommandPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbRunCommandUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbRunCommandAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secPowershellCommand" runat="server" TargetControlID="powershellCommandPanel" meta:resourcekey="secPowershellCommand" Text="Remove Powershell Command"/>
<asp:Panel ID="powershellCommandPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbPowershellUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbPowershellAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secHideCDrive" runat="server" TargetControlID="hideCDrivePanel" meta:resourcekey="secHideCDrive" Text="Hide C: Drive"/>
<asp:Panel ID="hideCDrivePanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbHideCDriveUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbHideCDriveAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secShutdown" runat="server" TargetControlID="shutdownPanel" meta:resourcekey="secShutdown" Text="Remove Shutdown and Restart"/>
<asp:Panel ID="shutdownPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbShutdownUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbShutdownAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secTaskManager" runat="server" TargetControlID="taskManagerPanel" meta:resourcekey="secTaskManager" Text="Disable Task Manager"/>
<asp:Panel ID="taskManagerPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbTaskManagerUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbTaskManagerAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secChangeDesktop" runat="server" TargetControlID="desktopPanel" meta:resourcekey="secChangeDesktop" Text="Changing Desktop Disabled"/>
<asp:Panel ID="desktopPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbDesktopUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbDesktopAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secScreenSaver" runat="server" TargetControlID="screenSaverPanel" meta:resourcekey="secScreenSaver" Text="Disable Screen Saver"/>
<asp:Panel ID="screenSaverPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbScreenSaverUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbScreenSaverAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secDriveSpace" runat="server" TargetControlID="driveSpacePanel" meta:resourcekey="secDriveSpace" Text="Drive Space Threshold"/>
<asp:Panel ID="driveSpacePanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td colspan="2">
<asp:TextBox ID="txtThreshold" runat="server" CssClass="TextBox200" ></asp:TextBox>
</td>
</tr>
</table>
<br />
</asp:Panel>
<div class="FormFooterClean">
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,230 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.Portal.RDS
{
public partial class RDSEditUserExperience : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
litCollectionName.Text = collection.DisplayName;
BindSettings();
}
}
private void BindSettings()
{
var serverSettings = ES.Services.RDS.GetRdsServerSettings(PanelRequest.CollectionID, string.Format("Collection-{0}-Settings", PanelRequest.CollectionID));
if (serverSettings == null || !serverSettings.Settings.Any())
{
var defaultSettings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.RDS_POLICY);
BindDefaultSettings(defaultSettings);
}
else
{
BindSettings(serverSettings);
}
}
private void BindSettings(RdsServerSettings settings)
{
var setting = GetServerSetting(settings, RdsServerSettings.LOCK_SCREEN_TIMEOUT);
txtTimeout.Text = setting.PropertyValue;
cbTimeoutAdministrators.Checked = setting.ApplyAdministrators;
cbTimeoutUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.REMOVE_RUN_COMMAND);
cbRunCommandAdministrators.Checked = setting.ApplyAdministrators;
cbRunCommandUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.REMOVE_POWERSHELL_COMMAND);
cbPowershellAdministrators.Checked = setting.ApplyAdministrators;
cbPowershellUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.HIDE_C_DRIVE);
cbHideCDriveAdministrators.Checked = setting.ApplyAdministrators;
cbHideCDriveUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.REMOVE_SHUTDOWN_RESTART);
cbShutdownAdministrators.Checked = setting.ApplyAdministrators;
cbShutdownUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.DISABLE_TASK_MANAGER);
cbTaskManagerAdministrators.Checked = setting.ApplyAdministrators;
cbTaskManagerUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.CHANGE_DESKTOP_DISABLED);
cbDesktopAdministrators.Checked = setting.ApplyAdministrators;
cbDesktopUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.SCREEN_SAVER_DISABLED);
cbScreenSaverAdministrators.Checked = setting.ApplyAdministrators;
cbScreenSaverUsers.Checked = setting.ApplyUsers;
setting = GetServerSetting(settings, RdsServerSettings.DRIVE_SPACE_THRESHOLD);
txtThreshold.Text = setting.PropertyValue;
}
private RdsServerSetting GetServerSetting(RdsServerSettings settings, string propertyName)
{
return settings.Settings.First(s => s.PropertyName.Equals(propertyName));
}
private RdsServerSettings GetSettings()
{
var settings = new RdsServerSettings();
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.LOCK_SCREEN_TIMEOUT,
PropertyValue = txtTimeout.Text,
ApplyAdministrators = cbTimeoutAdministrators.Checked,
ApplyUsers = cbTimeoutUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_RUN_COMMAND,
PropertyValue = "",
ApplyAdministrators = cbRunCommandAdministrators.Checked,
ApplyUsers = cbRunCommandUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_POWERSHELL_COMMAND,
PropertyValue = "",
ApplyAdministrators = cbPowershellAdministrators.Checked,
ApplyUsers = cbPowershellUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.HIDE_C_DRIVE,
PropertyValue = "",
ApplyAdministrators = cbHideCDriveAdministrators.Checked,
ApplyUsers = cbHideCDriveUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.REMOVE_SHUTDOWN_RESTART,
PropertyValue = "",
ApplyAdministrators = cbShutdownAdministrators.Checked,
ApplyUsers = cbShutdownUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.DISABLE_TASK_MANAGER,
PropertyValue = "",
ApplyAdministrators = cbTaskManagerAdministrators.Checked,
ApplyUsers = cbTaskManagerUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.CHANGE_DESKTOP_DISABLED,
PropertyValue = "",
ApplyAdministrators = cbDesktopAdministrators.Checked,
ApplyUsers = cbDesktopUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.SCREEN_SAVER_DISABLED,
PropertyValue = "",
ApplyAdministrators = cbScreenSaverAdministrators.Checked,
ApplyUsers = cbScreenSaverUsers.Checked
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.DRIVE_SPACE_THRESHOLD,
PropertyValue = txtThreshold.Text,
ApplyAdministrators = true,
ApplyUsers = true
});
return settings;
}
private void BindDefaultSettings(UserSettings settings)
{
txtTimeout.Text = settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE];
cbTimeoutAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS]);
cbTimeoutUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS]);
cbRunCommandAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS]);
cbRunCommandUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS]);
cbPowershellAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS]);
cbPowershellUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS]);
cbHideCDriveAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS]);
cbHideCDriveUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_USERS]);
cbShutdownAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS]);
cbShutdownUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS]);
cbTaskManagerAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS]);
cbTaskManagerUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS]);
cbDesktopAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS]);
cbDesktopUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS]);
cbScreenSaverAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS]);
cbScreenSaverUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS]);
txtThreshold.Text = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE];
}
private bool SaveServerSettings()
{
try
{
ES.Services.RDS.UpdateRdsServerSettings(PanelRequest.CollectionID, string.Format("Collection-{0}-Settings", PanelRequest.CollectionID), GetSettings());
}
catch (Exception ex)
{
ShowErrorMessage("RDSLOCALADMINS_NOT_ADDED", ex);
return false;
}
return true;
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
SaveServerSettings();
}
protected void btnSaveExit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
{
return;
}
if (SaveServerSettings())
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId));
}
}
}
}

View file

@ -0,0 +1,402 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.RDS {
public partial class RDSEditUserExperience {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// imgEditRDSCollection control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image imgEditRDSCollection;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litCollectionName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litCollectionName;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs;
/// <summary>
/// secTimeout control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secTimeout;
/// <summary>
/// timeoutPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel timeoutPanel;
/// <summary>
/// txtTimeout control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTimeout;
/// <summary>
/// cbTimeoutUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTimeoutUsers;
/// <summary>
/// cbTimeoutAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTimeoutAdministrators;
/// <summary>
/// secRunCommand control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRunCommand;
/// <summary>
/// runCommandPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel runCommandPanel;
/// <summary>
/// cbRunCommandUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbRunCommandUsers;
/// <summary>
/// cbRunCommandAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbRunCommandAdministrators;
/// <summary>
/// secPowershellCommand control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPowershellCommand;
/// <summary>
/// powershellCommandPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel powershellCommandPanel;
/// <summary>
/// cbPowershellUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbPowershellUsers;
/// <summary>
/// cbPowershellAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbPowershellAdministrators;
/// <summary>
/// secHideCDrive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secHideCDrive;
/// <summary>
/// hideCDrivePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel hideCDrivePanel;
/// <summary>
/// cbHideCDriveUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveUsers;
/// <summary>
/// cbHideCDriveAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveAdministrators;
/// <summary>
/// secShutdown control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secShutdown;
/// <summary>
/// shutdownPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel shutdownPanel;
/// <summary>
/// cbShutdownUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbShutdownUsers;
/// <summary>
/// cbShutdownAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbShutdownAdministrators;
/// <summary>
/// secTaskManager control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secTaskManager;
/// <summary>
/// taskManagerPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel taskManagerPanel;
/// <summary>
/// cbTaskManagerUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerUsers;
/// <summary>
/// cbTaskManagerAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerAdministrators;
/// <summary>
/// secChangeDesktop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secChangeDesktop;
/// <summary>
/// desktopPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel desktopPanel;
/// <summary>
/// cbDesktopUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbDesktopUsers;
/// <summary>
/// cbDesktopAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbDesktopAdministrators;
/// <summary>
/// secScreenSaver control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secScreenSaver;
/// <summary>
/// screenSaverPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel screenSaverPanel;
/// <summary>
/// cbScreenSaverUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverUsers;
/// <summary>
/// cbScreenSaverAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverAdministrators;
/// <summary>
/// secDriveSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secDriveSpace;
/// <summary>
/// driveSpacePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel driveSpacePanel;
/// <summary>
/// txtThreshold control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtThreshold;
/// <summary>
/// buttonPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
}
}

View file

@ -138,4 +138,7 @@
<data name="Tab.RdsSetupLetter" xml:space="preserve"> <data name="Tab.RdsSetupLetter" xml:space="preserve">
<value>Setup Instructions</value> <value>Setup Instructions</value>
</data> </data>
<data name="Tab.UserExperience" xml:space="preserve">
<value>User Experience</value>
</data>
</root> </root>

View file

@ -26,7 +26,8 @@ namespace WebsitePanel.Portal.RDS.UserControls
tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers")); tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers"));
tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions")); tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions"));
tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins")); tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins"));
tabsList.Add(CreateTab("rds_setup_letter", "Tab.RdsSetupLetter")); tabsList.Add(CreateTab("rds_collection_user_experience", "Tab.UserExperience"));
tabsList.Add(CreateTab("rds_setup_letter", "Tab.RdsSetupLetter"));
int idx = 0; int idx = 0;

View file

@ -0,0 +1,131 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsRdsPolicy.ascx.cs" Inherits="WebsitePanel.Portal.SettingsRdsPolicy" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %>
<wsp:CollapsiblePanel id="secTimeout" runat="server" TargetControlID="timeoutPanel" meta:resourcekey="secTimeout" Text="Lock Screen Timeout"/>
<asp:Panel ID="timeoutPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td colspan="2">
<asp:TextBox ID="txtTimeout" runat="server" CssClass="TextBox200" ></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbTimeoutUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbTimeoutAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secRunCommand" runat="server" TargetControlID="runCommandPanel" meta:resourcekey="secRunCommand" Text="Remove Run Command"/>
<asp:Panel ID="runCommandPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbRunCommandUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbRunCommandAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secPowershellCommand" runat="server" TargetControlID="powershellCommandPanel" meta:resourcekey="secPowershellCommand" Text="Remove Powershell Command"/>
<asp:Panel ID="powershellCommandPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbPowershellUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbPowershellAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secHideCDrive" runat="server" TargetControlID="hideCDrivePanel" meta:resourcekey="secHideCDrive" Text="Hide C: Drive"/>
<asp:Panel ID="hideCDrivePanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbHideCDriveUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbHideCDriveAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secShutdown" runat="server" TargetControlID="shutdownPanel" meta:resourcekey="secShutdown" Text="Remove Shutdown and Restart"/>
<asp:Panel ID="shutdownPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbShutdownUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbShutdownAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secTaskManager" runat="server" TargetControlID="taskManagerPanel" meta:resourcekey="secTaskManager" Text="Disable Task Manager"/>
<asp:Panel ID="taskManagerPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbTaskManagerUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbTaskManagerAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secChangeDesktop" runat="server" TargetControlID="desktopPanel" meta:resourcekey="secChangeDesktop" Text="Changing Desktop Disabled"/>
<asp:Panel ID="desktopPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbDesktopUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbDesktopAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secScreenSaver" runat="server" TargetControlID="screenSaverPanel" meta:resourcekey="secScreenSaver" Text="Disable Screen Saver"/>
<asp:Panel ID="screenSaverPanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td>
<asp:CheckBox runat="server" Text="Users" ID="cbScreenSaverUsers" meta:resourcekey="cbUsers" Checked="false" />
</td>
<td>
<asp:CheckBox runat="server" Text="Administrators" meta:resourcekey="cbAdministrators" ID="cbScreenSaverAdministrators" Checked="false" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<wsp:CollapsiblePanel id="secDriveSpace" runat="server" TargetControlID="driveSpacePanel" meta:resourcekey="secDriveSpace" Text="Drive Space Threshold"/>
<asp:Panel ID="driveSpacePanel" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td colspan="2">
<asp:TextBox ID="txtThreshold" runat="server" CssClass="TextBox200" ></asp:TextBox>
</td>
</tr>
</table>
<br />
</asp:Panel>

View file

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.EnterpriseServer.Base.RDS;
namespace WebsitePanel.Portal
{
public partial class SettingsRdsPolicy : WebsitePanelControlBase, IUserSettingsEditorControl
{
public void BindSettings(UserSettings settings)
{
txtTimeout.Text = settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE];
cbTimeoutAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS]);
cbTimeoutUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS]);
cbRunCommandAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS]);
cbRunCommandUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS]);
cbPowershellAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS]);
cbPowershellUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS]);
cbHideCDriveAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS]);
cbHideCDriveUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_USERS]);
cbShutdownAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS]);
cbShutdownUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS]);
cbTaskManagerAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS]);
cbTaskManagerUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS]);
cbDesktopAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS]);
cbDesktopUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS]);
cbScreenSaverAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS]);
cbScreenSaverUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS]);
txtThreshold.Text = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE];
}
public void SaveSettings(UserSettings settings)
{
settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE] = txtTimeout.Text;
settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS] = cbTimeoutAdministrators.Checked.ToString();
settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS] = cbTimeoutUsers.Checked.ToString();
settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS] = cbRunCommandAdministrators.Checked.ToString();
settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS] = cbRunCommandUsers.Checked.ToString();
settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS] = cbPowershellAdministrators.Checked.ToString();
settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS] = cbPowershellUsers.Checked.ToString();
settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS] = cbHideCDriveAdministrators.Checked.ToString();
settings[RdsServerSettings.HIDE_C_DRIVE_USERS] = cbHideCDriveUsers.Checked.ToString();
settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS] = cbShutdownAdministrators.Checked.ToString();
settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS] = cbShutdownUsers.Checked.ToString();
settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS] = cbTaskManagerAdministrators.Checked.ToString();
settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS] = cbTaskManagerUsers.Checked.ToString();
settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS] = cbDesktopAdministrators.Checked.ToString();
settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS] = cbDesktopUsers.Checked.ToString();
settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS] = cbScreenSaverAdministrators.Checked.ToString();
settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS] = cbScreenSaverUsers.Checked.ToString();
settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE] = txtThreshold.Text;
}
}
}

View file

@ -0,0 +1,339 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SettingsRdsPolicy {
/// <summary>
/// secTimeout control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secTimeout;
/// <summary>
/// timeoutPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel timeoutPanel;
/// <summary>
/// txtTimeout control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTimeout;
/// <summary>
/// cbTimeoutUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTimeoutUsers;
/// <summary>
/// cbTimeoutAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTimeoutAdministrators;
/// <summary>
/// secRunCommand control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secRunCommand;
/// <summary>
/// runCommandPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel runCommandPanel;
/// <summary>
/// cbRunCommandUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbRunCommandUsers;
/// <summary>
/// cbRunCommandAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbRunCommandAdministrators;
/// <summary>
/// secPowershellCommand control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPowershellCommand;
/// <summary>
/// powershellCommandPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel powershellCommandPanel;
/// <summary>
/// cbPowershellUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbPowershellUsers;
/// <summary>
/// cbPowershellAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbPowershellAdministrators;
/// <summary>
/// secHideCDrive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secHideCDrive;
/// <summary>
/// hideCDrivePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel hideCDrivePanel;
/// <summary>
/// cbHideCDriveUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveUsers;
/// <summary>
/// cbHideCDriveAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveAdministrators;
/// <summary>
/// secShutdown control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secShutdown;
/// <summary>
/// shutdownPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel shutdownPanel;
/// <summary>
/// cbShutdownUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbShutdownUsers;
/// <summary>
/// cbShutdownAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbShutdownAdministrators;
/// <summary>
/// secTaskManager control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secTaskManager;
/// <summary>
/// taskManagerPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel taskManagerPanel;
/// <summary>
/// cbTaskManagerUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerUsers;
/// <summary>
/// cbTaskManagerAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerAdministrators;
/// <summary>
/// secChangeDesktop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secChangeDesktop;
/// <summary>
/// desktopPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel desktopPanel;
/// <summary>
/// cbDesktopUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbDesktopUsers;
/// <summary>
/// cbDesktopAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbDesktopAdministrators;
/// <summary>
/// secScreenSaver control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secScreenSaver;
/// <summary>
/// screenSaverPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel screenSaverPanel;
/// <summary>
/// cbScreenSaverUsers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverUsers;
/// <summary>
/// cbScreenSaverAdministrators control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverAdministrators;
/// <summary>
/// secDriveSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secDriveSpace;
/// <summary>
/// driveSpacePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel driveSpacePanel;
/// <summary>
/// txtThreshold control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtThreshold;
}
}

View file

@ -63,6 +63,10 @@
<asp:HyperLink ID="lnkVpsPolicy" runat="server" meta:resourcekey="lnkVpsPolicy" <asp:HyperLink ID="lnkVpsPolicy" runat="server" meta:resourcekey="lnkVpsPolicy"
Text="Virtual Private Servers Policy" NavigateUrl='<%# GetSettingsLink("VpsPolicy", "SettingsVpsPolicy") %>'></asp:HyperLink> Text="Virtual Private Servers Policy" NavigateUrl='<%# GetSettingsLink("VpsPolicy", "SettingsVpsPolicy") %>'></asp:HyperLink>
</li> </li>
<li>
<asp:HyperLink ID="lnkRdsPolicy" runat="server" meta:resourcekey="lnkRdsPolicy"
Text="Remote Desktop Servers Policy" NavigateUrl='<%# GetSettingsLink("RdsPolicy", "SettingsRdsPolicy") %>'></asp:HyperLink>
</li>
</ul> </ul>
</div> </div>
<div class="FormFooter"> <div class="FormFooter">

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -175,6 +147,15 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkVpsPolicy; protected global::System.Web.UI.WebControls.HyperLink lnkVpsPolicy;
/// <summary>
/// lnkRdsPolicy control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkRdsPolicy;
/// <summary> /// <summary>
/// btnCancel control. /// btnCancel control.
/// </summary> /// </summary>

View file

@ -56,15 +56,15 @@ namespace WebsitePanel.Portal
set { ViewState["DisplayText"] = value; } set { ViewState["DisplayText"] = value; }
} }
public long Progress public int Progress
{ {
get { return (ViewState["Progress"] != null) ? (long)ViewState["Progress"] : 0; } get { return (ViewState["Progress"] != null) ? (int)ViewState["Progress"] : 0; }
set { ViewState["Progress"] = value; } set { ViewState["Progress"] = value; }
} }
public long Total public int Total
{ {
get { return (ViewState["Total"] != null) ? (long)ViewState["Total"] : 0; } get { return (ViewState["Total"] != null) ? (int)ViewState["Total"] : 0; }
set { ViewState["Total"] = value; } set { ViewState["Total"] = value; }
} }
@ -101,7 +101,7 @@ namespace WebsitePanel.Portal
string bkgSrc = Page.ResolveUrl(PortalUtils.GetThemedImage("gauge_bkg.gif")); string bkgSrc = Page.ResolveUrl(PortalUtils.GetThemedImage("gauge_bkg.gif"));
// calculate the width of the gauge // calculate the width of the gauge
long fTotal = Total; int fTotal = Total;
int percent = (fTotal > 0) ? Convert.ToInt32(Math.Round((double)Progress / (double)fTotal * 100)) : 0; int percent = (fTotal > 0) ? Convert.ToInt32(Math.Round((double)Progress / (double)fTotal * 100)) : 0;
double fFilledWidth = (fTotal > 0) ? ((double)Progress / (double)fTotal * Width) : 0; double fFilledWidth = (fTotal > 0) ? ((double)Progress / (double)fTotal * Width) : 0;

View file

@ -96,10 +96,10 @@ namespace WebsitePanel.Portal.UserControls
//SharePoint menu group; //SharePoint menu group;
if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointFoundationServer)) if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointFoundationServer))
PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup")); PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup"), ResourceGroups.SharepointFoundationServer.Replace(" ", ""));
if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointServer)) if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointServer))
PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointServerGroup")); PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointServerGroup"), ResourceGroups.SharepointServer.Replace(" ", ""));
//CRM Menu //CRM Menu
if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
@ -362,11 +362,11 @@ namespace WebsitePanel.Portal.UserControls
bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Icons/blackberry_users_48.png")); bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Icons/blackberry_users_48.png"));
} }
private void PrepareSharePointMenuRoot(MenuItemCollection items, string menuItemText) private void PrepareSharePointMenuRoot(MenuItemCollection items, string menuItemText, string group)
{ {
if (ShortMenu) if (ShortMenu)
{ {
PrepareSharePointMenu(items); PrepareSharePointMenu(items, group);
} }
else else
{ {
@ -374,7 +374,7 @@ namespace WebsitePanel.Portal.UserControls
item.Selectable = false; item.Selectable = false;
PrepareSharePointMenu(item.ChildItems); PrepareSharePointMenu(item.ChildItems, group);
if (item.ChildItems.Count > 0) if (item.ChildItems.Count > 0)
{ {
@ -383,14 +383,28 @@ namespace WebsitePanel.Portal.UserControls
} }
} }
private void PrepareSharePointMenu(MenuItemCollection spItems) private void PrepareSharePointMenu(MenuItemCollection spItems, string group)
{
spItems.Add(CreateSharepointMenuItem("Text.SiteCollections", "sharepoint_sitecollections", @"Icons/sharepoint_sitecollections_48.png", group));
spItems.Add(CreateSharepointMenuItem("Text.StorageUsage", "sharepoint_storage_usage", @"Icons/sharepoint_storage_usage_48.png", group));
spItems.Add(CreateSharepointMenuItem("Text.StorageLimits", "sharepoint_storage_settings", @"Icons/sharepoint_storage_settings_48.png", group));
}
private MenuItem CreateSharepointMenuItem(string text, string key, string img, string group)
{ {
spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections", @"Icons/sharepoint_sitecollections_48.png")); MenuItem item = new MenuItem();
string PID_SPACE_EXCHANGE_SERVER = "SpaceExchangeServer";
item.Text = GetLocalizedString(text);
item.NavigateUrl = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGE_SERVER, "ItemID", ItemID.ToString(),
PortalUtils.SPACE_ID_PARAM + "=" + PackageId, DefaultPage.CONTROL_ID_PARAM + "=" + key, "GroupName=" + group,
"moduleDefId=exchangeserver");
//if (ShortMenu) return; if (ShowImg)
{
item.ImageUrl = PortalUtils.GetThemedIcon(img);
}
spItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage", @"Icons/sharepoint_storage_usage_48.png")); return item;
spItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings", @"Icons/sharepoint_storage_settings_48.png"));
} }
private void PrepareOCSMenuRoot(MenuItemCollection items) private void PrepareOCSMenuRoot(MenuItemCollection items)

View file

@ -92,7 +92,7 @@ namespace WebsitePanel.Portal
private void UpdateControl() private void UpdateControl()
{ {
long total = gauge.Total; int total = gauge.Total;
if (QuotaTypeId == 1) if (QuotaTypeId == 1)
{ {
litValue.Text = (total == 0) ? GetLocalizedString("Text.Disabled") : GetLocalizedString("Text.Enabled"); litValue.Text = (total == 0) ? GetLocalizedString("Text.Disabled") : GetLocalizedString("Text.Enabled");

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ddlGenerationItem.1" xml:space="preserve">
<value>First</value>
</data>
<data name="ddlGenerationItem.2" xml:space="preserve">
<value>Second</value>
</data>
<data name="locGeneration.Text" xml:space="preserve">
<value>Generation:</value>
</data>
<data name="secGeneration.Text" xml:space="preserve">
<value>Generation</value>
</data>
</root>

View file

@ -0,0 +1,20 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HyperV2012R2_Create.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.HyperV2012R2_Create" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../../UserControls/CollapsiblePanel.ascx" %>
<wsp:CollapsiblePanel id="secGeneration" runat="server" TargetControlID="GenerationPanel" meta:resourcekey="secGeneration" Text="Generation">
</wsp:CollapsiblePanel>
<asp:Panel ID="GenerationPanel" runat="server" Height="0" Style="overflow: hidden; padding: 5px;">
<table>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locGeneration" runat="server"
meta:resourcekey="locGeneration" Text="Generation:"></asp:Localize></td>
<td>
<asp:DropDownList ID="ddlGeneration" runat="server" CssClass="NormalTextBox" resourcekey="ddlGeneration">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</asp:Panel>

View file

@ -0,0 +1,51 @@
// Copyright (c) 2015, 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 WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class HyperV2012R2_Create : WebsitePanelControlBase, IVirtualMachineCreateControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void BindItem(VirtualMachine item)
{
var generation = item.Generation > 1 ? item.Generation : 1;
ddlGeneration.SelectedValue = generation.ToString();
}
public void SaveItem(VirtualMachine item)
{
item.Generation = Convert.ToInt32(ddlGeneration.SelectedValue);
}
}
}

View file

@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ProviderControls {
public partial class HyperV2012R2_Create {
/// <summary>
/// secGeneration control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secGeneration;
/// <summary>
/// GenerationPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel GenerationPanel;
/// <summary>
/// locGeneration control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locGeneration;
/// <summary>
/// ddlGeneration control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlGeneration;
}
}

View file

@ -189,6 +189,8 @@
</table> </table>
</asp:Panel> </asp:Panel>
<asp:PlaceHolder ID="providerControl" runat="server"></asp:PlaceHolder>
<wsp:CollapsiblePanel id="secSnapshots" runat="server" <wsp:CollapsiblePanel id="secSnapshots" runat="server"
TargetControlID="SnapshotsPanel" meta:resourcekey="secSnapshots" Text="Snapshots"> TargetControlID="SnapshotsPanel" meta:resourcekey="secSnapshots" Text="Snapshots">
</wsp:CollapsiblePanel> </wsp:CollapsiblePanel>

View file

@ -42,6 +42,8 @@ namespace WebsitePanel.Portal.VPS
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
LoadCustomProviderControl();
if (!IsPostBack) if (!IsPostBack)
{ {
BindFormControls(); BindFormControls();
@ -54,6 +56,26 @@ namespace WebsitePanel.Portal.VPS
ToggleControls(); ToggleControls();
} }
private void LoadCustomProviderControl()
{
try
{
LoadProviderControl(PanelSecurity.PackageId, "VPS", providerControl, "Create.ascx");
}
catch { /* skip */ }
}
private IVirtualMachineCreateControl CustomProviderControl
{
get
{
if (providerControl.Controls.Count == 0)
return null;
return (IVirtualMachineCreateControl)providerControl.Controls[0];
}
}
private void ToggleWizardSteps() private void ToggleWizardSteps()
{ {
// external network // external network
@ -113,6 +135,13 @@ namespace WebsitePanel.Portal.VPS
ddlCpu.SelectedIndex = ddlCpu.Items.Count - 1; // select last (maximum) item ddlCpu.SelectedIndex = ddlCpu.Items.Count - 1; // select last (maximum) item
// the custom provider control
if (CustomProviderControl != null)
{
IVirtualMachineCreateControl ctrl = (IVirtualMachineCreateControl)providerControl.Controls[0];
ctrl.BindItem(new VirtualMachine());
}
// external network details // external network details
if (PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS_EXTERNAL_NETWORK_ENABLED)) if (PackagesHelper.IsQuotaEnabled(PanelSecurity.PackageId, Quotas.VPS_EXTERNAL_NETWORK_ENABLED))
{ {
@ -287,6 +316,15 @@ namespace WebsitePanel.Portal.VPS
try try
{ {
VirtualMachine virtualMachine = new VirtualMachine();
// the custom provider control
if (CustomProviderControl != null)
{
IVirtualMachineCreateControl ctrl = (IVirtualMachineCreateControl)providerControl.Controls[0];
ctrl.SaveItem(virtualMachine);
}
// collect and prepare data // collect and prepare data
string hostname = String.Format("{0}.{1}", txtHostname.Text.Trim(), txtDomain.Text.Trim()); string hostname = String.Format("{0}.{1}", txtHostname.Text.Trim(), txtDomain.Text.Trim());
@ -305,7 +343,7 @@ namespace WebsitePanel.Portal.VPS
// create virtual machine // create virtual machine
IntResult res = ES.Services.VPS.CreateVirtualMachine(PanelSecurity.PackageId, IntResult res = ES.Services.VPS.CreateVirtualMachine(PanelSecurity.PackageId,
hostname, listOperatingSystems.SelectedValue, adminPassword, summaryEmail, hostname, listOperatingSystems.SelectedValue, adminPassword, summaryEmail,
Utils.ParseInt(ddlCpu.SelectedValue), Utils.ParseInt(txtRam.Text.Trim()), virtualMachine.Generation, Utils.ParseInt(ddlCpu.SelectedValue), Utils.ParseInt(txtRam.Text.Trim()),
Utils.ParseInt(txtHdd.Text.Trim()), Utils.ParseInt(txtSnapshots.Text.Trim()), Utils.ParseInt(txtHdd.Text.Trim()), Utils.ParseInt(txtSnapshots.Text.Trim()),
chkDvdInstalled.Checked, chkBootFromCd.Checked, chkNumLock.Checked, chkDvdInstalled.Checked, chkBootFromCd.Checked, chkNumLock.Checked,
chkStartShutdown.Checked, chkPauseResume.Checked, chkReboot.Checked, chkReset.Checked, chkReinstall.Checked, chkStartShutdown.Checked, chkPauseResume.Checked, chkReboot.Checked, chkReset.Checked, chkReinstall.Checked,

View file

@ -1,38 +1,9 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -401,6 +372,15 @@ namespace WebsitePanel.Portal.VPS {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locGB; protected global::System.Web.UI.WebControls.Localize locGB;
/// <summary>
/// providerControl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder providerControl;
/// <summary> /// <summary>
/// secSnapshots control. /// secSnapshots control.
/// </summary> /// </summary>
@ -1354,14 +1334,5 @@ namespace WebsitePanel.Portal.VPS {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Literal litPrivateAddressesList; protected global::System.Web.UI.WebControls.Literal litPrivateAddressesList;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
} }
} }

View file

@ -195,6 +195,7 @@
<Compile Include="Code\ProviderControls\IDatabaseEditUserControl.cs" /> <Compile Include="Code\ProviderControls\IDatabaseEditUserControl.cs" />
<Compile Include="Code\ProviderControls\IFtpEditAccountControl.cs" /> <Compile Include="Code\ProviderControls\IFtpEditAccountControl.cs" />
<Compile Include="Code\ProviderControls\IHostingServiceProviderSettings.cs" /> <Compile Include="Code\ProviderControls\IHostingServiceProviderSettings.cs" />
<Compile Include="Code\ProviderControls\IVirtualMachineCreateControl.cs" />
<Compile Include="Code\ProviderControls\IMailEditAccountControl.cs" /> <Compile Include="Code\ProviderControls\IMailEditAccountControl.cs" />
<Compile Include="Code\ProviderControls\IMailEditDomainControl.cs" /> <Compile Include="Code\ProviderControls\IMailEditDomainControl.cs" />
<Compile Include="Code\ProviderControls\IMailEditForwardingControl.cs" /> <Compile Include="Code\ProviderControls\IMailEditForwardingControl.cs" />
@ -257,6 +258,20 @@
<Compile Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx.designer.cs"> <Compile Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx.designer.cs">
<DependentUpon>EnterpriseStorageOwaUsersList.ascx</DependentUpon> <DependentUpon>EnterpriseStorageOwaUsersList.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="ProviderControls\HyperV2012R2_Settings.ascx.cs">
<DependentUpon>HyperV2012R2_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\HyperV2012R2_Settings.ascx.designer.cs">
<DependentUpon>HyperV2012R2_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="VPS\ProviderControls\HyperV2012R2_Create.ascx.cs">
<DependentUpon>HyperV2012R2_Create.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="VPS\ProviderControls\HyperV2012R2_Create.ascx.designer.cs">
<DependentUpon>HyperV2012R2_Create.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\SmarterMail100_EditAccount.ascx.cs"> <Compile Include="ProviderControls\SmarterMail100_EditAccount.ascx.cs">
<DependentUpon>SmarterMail100_EditAccount.ascx</DependentUpon> <DependentUpon>SmarterMail100_EditAccount.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -428,6 +443,13 @@
<Compile Include="RDS\RDSCollections.ascx.designer.cs"> <Compile Include="RDS\RDSCollections.ascx.designer.cs">
<DependentUpon>RDSCollections.ascx</DependentUpon> <DependentUpon>RDSCollections.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="RDS\RDSEditUserExperience.ascx.cs">
<DependentUpon>RDSEditUserExperience.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="RDS\RDSEditUserExperience.ascx.designer.cs">
<DependentUpon>RDSEditUserExperience.ascx</DependentUpon>
</Compile>
<Compile Include="RDS\RDSLocalAdmins.ascx.cs"> <Compile Include="RDS\RDSLocalAdmins.ascx.cs">
<DependentUpon>RDSLocalAdmins.ascx</DependentUpon> <DependentUpon>RDSLocalAdmins.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -517,6 +539,13 @@
<Compile Include="SettingsDomainLookupLetter.ascx.designer.cs"> <Compile Include="SettingsDomainLookupLetter.ascx.designer.cs">
<DependentUpon>SettingsDomainLookupLetter.ascx</DependentUpon> <DependentUpon>SettingsDomainLookupLetter.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="SettingsRdsPolicy.ascx.cs">
<DependentUpon>SettingsRdsPolicy.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsRdsPolicy.ascx.designer.cs">
<DependentUpon>SettingsRdsPolicy.ascx</DependentUpon>
</Compile>
<Compile Include="SettingsRdsSetupLetter.ascx.cs"> <Compile Include="SettingsRdsSetupLetter.ascx.cs">
<DependentUpon>SettingsRdsSetupLetter.ascx</DependentUpon> <DependentUpon>SettingsRdsSetupLetter.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -4509,6 +4538,8 @@
<Content Include="ExchangeServer\ExchangeCheckDomainName.ascx" /> <Content Include="ExchangeServer\ExchangeCheckDomainName.ascx" />
<Content Include="ExchangeServer\UserControls\EnterpriseStorageEditFolderTabs.ascx" /> <Content Include="ExchangeServer\UserControls\EnterpriseStorageEditFolderTabs.ascx" />
<Content Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx" /> <Content Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx" />
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
<Content Include="VPS\ProviderControls\HyperV2012R2_Create.ascx" />
<Content Include="ProviderControls\SmarterMail100_EditAccount.ascx" /> <Content Include="ProviderControls\SmarterMail100_EditAccount.ascx" />
<Content Include="ProviderControls\SmarterMail100_EditDomain.ascx" /> <Content Include="ProviderControls\SmarterMail100_EditDomain.ascx" />
<Content Include="ProviderControls\SmarterMail100_EditDomain_Features.ascx" /> <Content Include="ProviderControls\SmarterMail100_EditDomain_Features.ascx" />
@ -4558,6 +4589,13 @@
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsFolderPermissions.ascx.resx" /> <Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsFolderPermissions.ascx.resx" />
<Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStorageOwaUsersList.ascx.resx" /> <Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStorageOwaUsersList.ascx.resx" />
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsOwaEditing.ascx.resx" /> <Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsOwaEditing.ascx.resx" />
<Content Include="App_LocalResources\SettingsRdsPolicy.ascx.resx" />
<Content Include="VPS\ProviderControls\App_LocalResources\HyperV2012R2_Create.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="ProviderControls\App_LocalResources\HyperV2012R2_Settings.ascx.resx">
<SubType>Designer</SubType>
</Content>
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" /> <EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
<Content Include="RDSServersEditServer.ascx" /> <Content Include="RDSServersEditServer.ascx" />
<Content Include="RDS\AssignedRDSServers.ascx" /> <Content Include="RDS\AssignedRDSServers.ascx" />
@ -4569,6 +4607,7 @@
<Content Include="RDS\RDSEditCollectionUsers.ascx" /> <Content Include="RDS\RDSEditCollectionUsers.ascx" />
<Content Include="RDS\RDSCreateCollection.ascx" /> <Content Include="RDS\RDSCreateCollection.ascx" />
<Content Include="RDS\RDSCollections.ascx" /> <Content Include="RDS\RDSCollections.ascx" />
<Content Include="RDS\RDSEditUserExperience.ascx" />
<Content Include="RDS\RDSLocalAdmins.ascx" /> <Content Include="RDS\RDSLocalAdmins.ascx" />
<Content Include="RDS\RDSSetupLetter.ascx" /> <Content Include="RDS\RDSSetupLetter.ascx" />
<Content Include="RDS\RDSUserSessions.ascx" /> <Content Include="RDS\RDSUserSessions.ascx" />
@ -4596,6 +4635,7 @@
<Content Include="RDS\App_LocalResources\RDSUserSessions.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSUserSessions.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSLocalAdmins.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSLocalAdmins.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSSetupLetter.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSSetupLetter.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSEditUserExperience.ascx.resx" />
<EmbeddedResource Include="ScheduleTaskControls\App_LocalResources\DomainLookupView.ascx.resx"> <EmbeddedResource Include="ScheduleTaskControls\App_LocalResources\DomainLookupView.ascx.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>DomainLookupView.ascx.Designer.cs</LastGenOutput> <LastGenOutput>DomainLookupView.ascx.Designer.cs</LastGenOutput>
@ -4604,6 +4644,7 @@
<Content Include="ScheduleTaskControls\DomainLookupView.ascx" /> <Content Include="ScheduleTaskControls\DomainLookupView.ascx" />
<Content Include="SettingsDomainExpirationLetter.ascx" /> <Content Include="SettingsDomainExpirationLetter.ascx" />
<Content Include="SettingsDomainLookupLetter.ascx" /> <Content Include="SettingsDomainLookupLetter.ascx" />
<Content Include="SettingsRdsPolicy.ascx" />
<Content Include="SettingsRdsSetupLetter.ascx" /> <Content Include="SettingsRdsSetupLetter.ascx" />
<Content Include="SettingsServiceLevels.ascx" /> <Content Include="SettingsServiceLevels.ascx" />
<Content Include="CRM\CRMStorageSettings.ascx" /> <Content Include="CRM\CRMStorageSettings.ascx" />