This commit is contained in:
vfedosevich 2014-12-16 02:10:16 -08:00
commit 20c474a8a7
36 changed files with 2498 additions and 1575 deletions

View file

@ -3,13 +3,23 @@
<?include Config.wxi?> <?include Config.wxi?>
<?define VERSION="2.1"?> <?define VERSION="2.1"?>
<Product Id="*" Name="WebsitePanel Scheduler Service Installer" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation" UpgradeCode="629ccd5c-1f6d-4168-bbe6-01c69e232f44"> <Product Id="*" Name="WebsitePanel Scheduler Service Installer" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation" UpgradeCode="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
<Package InstallerVersion="200" Compressed="yes" />
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" EmbedCab="yes" Cabinet="schedulerservice.cab" /> <Media Id="1" EmbedCab="yes" Cabinet="schedulerservice.cab" />
<Feature Id="ProductFeature" Title="WebsitePanel Scheduler Service Installer" Level="1"> <Feature Id="ProductFeature" Title="WebsitePanel Scheduler Service Installer" Level="1">
<ComponentRef Id="ProductFiles" /> <ComponentRef Id="ProductFiles" />
</Feature> </Feature>
<Property Id="BannerBitmap">bannrbmp</Property> <Property Id="BannerBitmap">bannrbmp</Property>
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" /> <WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" /> <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<Icon Id="WebSitePanel.ico" SourceFile="WebSitePanel.ico" /> <Icon Id="WebSitePanel.ico" SourceFile="WebSitePanel.ico" />
@ -95,7 +105,9 @@
<TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" /> <TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" />
</UI> </UI>
<InstallExecuteSequence> <InstallExecuteSequence>
<Custom Action="FinalizeInstall" After="InstallFinalize" /> <Custom Action="FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<RemoveExistingProducts After="InstallValidate" />
<Custom Action='FinalizeInstall' After='InstallFinalize'>NOT Installed or REINSTALL</Custom>
</InstallExecuteSequence> </InstallExecuteSequence>
</Product> </Product>
<Fragment> <Fragment>
@ -103,8 +115,13 @@
<Binary Id="CheckConnection.CA" SourceFile="bin\WebsitePanel.SchedulerServiceInstaller.CA.dll" /> <Binary Id="CheckConnection.CA" SourceFile="bin\WebsitePanel.SchedulerServiceInstaller.CA.dll" />
</Fragment> </Fragment>
<Fragment> <Fragment>
<CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" /> <CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" />
</Fragment> </Fragment>
<Fragment>
<CustomAction Id="FinalizeUnInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeUnInstall" />
<CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
</Fragment>
<Fragment> <Fragment>
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WEBSITEPANELFOLDER" Name="WebsitePanel"> <Directory Id="WEBSITEPANELFOLDER" Name="WebsitePanel">
@ -115,8 +132,8 @@
<Fragment> <Fragment>
<DirectoryRef Id="INSTALLFOLDER"> <DirectoryRef Id="INSTALLFOLDER">
<Component Id="ProductFiles" Guid="A89FA6CF-53E2-4390-9E9D-11CD4297D739"> <Component Id="ProductFiles" Guid="A89FA6CF-53E2-4390-9E9D-11CD4297D739">
<File Id="WebsitePanel.SchedulerService.exe" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe" /> <File Id="WebsitePanel.SchedulerService.exe" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe" />
<File Id="WebsitePanel.SchedulerService.exe.config" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe.config" /> <File Id="WebsitePanel.SchedulerService.exe.config" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe.config" />
<File Id="Ionic.Zip.Reduced.dll" Source="$(var.SERVERBUILDPATH)\Ionic.Zip.Reduced.dll"/> <File Id="Ionic.Zip.Reduced.dll" Source="$(var.SERVERBUILDPATH)\Ionic.Zip.Reduced.dll"/>
<File Id="Microsoft.Web.Services3.dll" Source="$(var.SERVERBUILDPATH)\Microsoft.Web.Services3.dll"/> <File Id="Microsoft.Web.Services3.dll" Source="$(var.SERVERBUILDPATH)\Microsoft.Web.Services3.dll"/>
<File Id="WebsitePanel.Common.Utils.dll" Source="$(var.BUILDPATH)\WebsitePanel.Common.Utils.dll"/> <File Id="WebsitePanel.Common.Utils.dll" Source="$(var.BUILDPATH)\WebsitePanel.Common.Utils.dll"/>

View file

@ -34,6 +34,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.ServiceProcess; using System.ServiceProcess;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using Microsoft.Deployment.WindowsInstaller; using Microsoft.Deployment.WindowsInstaller;
using WebsitePanel.Setup; using WebsitePanel.Setup;
@ -69,6 +70,14 @@ namespace WebsitePanel.SchedulerServiceInstaller
return ActionResult.Success; return ActionResult.Success;
} }
[CustomAction]
public static ActionResult FinalizeUnInstall(Session session)
{
UnInstallService();
return ActionResult.Success;
}
private static void InstallService(string installFolder) private static void InstallService(string installFolder)
{ {
try try
@ -93,6 +102,26 @@ namespace WebsitePanel.SchedulerServiceInstaller
} }
} }
private static void UnInstallService()
{
try
{
var schedulerService =
ServiceController.GetServices().FirstOrDefault(
s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase));
if (schedulerService != null)
{
StopService(schedulerService.ServiceName);
SecurityUtils.DeleteService(schedulerService.ServiceName);
}
}
catch (Exception)
{
}
}
private static void ChangeCryptoKey(string installFolder) private static void ChangeCryptoKey(string installFolder)
{ {
string path = Path.Combine(installFolder.Replace("SchedulerService", "Enterprise Server"), "web.config"); string path = Path.Combine(installFolder.Replace("SchedulerService", "Enterprise Server"), "web.config");

View file

@ -1,6 +1,5 @@
USE [${install.database}] USE [${install.database}]
GO GO
-- update database version -- update database version
DECLARE @build_version nvarchar(10), @build_date datetime DECLARE @build_version nvarchar(10), @build_date datetime
SET @build_version = N'${release.version}' SET @build_version = N'${release.version}'
@ -5451,7 +5450,8 @@ CREATE TABLE RDSServers
Name NVARCHAR(255), Name NVARCHAR(255),
FqdName NVARCHAR(255), FqdName NVARCHAR(255),
Description NVARCHAR(255), Description NVARCHAR(255),
RDSCollectionId INT/* FOREIGN KEY REFERENCES RDSCollection (ID)*/ RDSCollectionId INT,
ConnectionEnabled BIT NOT NULL DEFAULT(1)
) )
GO GO
@ -5528,31 +5528,6 @@ WHERE Id = @Id
GO GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServer')
DROP PROCEDURE UpdateRDSServer
GO
CREATE PROCEDURE [dbo].[UpdateRDSServer]
(
@Id INT,
@ItemID INT,
@Name NVARCHAR(255),
@FqdName NVARCHAR(255),
@Description NVARCHAR(255),
@RDSCollectionId INT
)
AS
UPDATE RDSServers
SET
ItemID = @ItemID,
Name = @Name,
FqdName = @FqdName,
Description = @Description,
RDSCollectionId = @RDSCollectionId
WHERE ID = @Id
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServerToOrganization') IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServerToOrganization')
DROP PROCEDURE AddRDSServerToOrganization DROP PROCEDURE AddRDSServerToOrganization
GO GO
@ -5704,76 +5679,6 @@ GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersPaged')
DROP PROCEDURE GetRDSServersPaged
GO
CREATE PROCEDURE [dbo].[GetRDSServersPaged]
(
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@ItemID int,
@IgnoreItemId bit,
@RdsCollectionId int,
@IgnoreRdsCollectionId bit,
@SortColumn nvarchar(50),
@StartRow int,
@MaximumRows int
)
AS
-- build query and run it to the temporary table
DECLARE @sql nvarchar(2000)
SET @sql = '
DECLARE @EndRow int
SET @EndRow = @StartRow + @MaximumRows
DECLARE @RDSServer TABLE
(
ItemPosition int IDENTITY(0,1),
RDSServerId int
)
INSERT INTO @RDSServer (RDSServerId)
SELECT
S.ID
FROM RDSServers AS S
WHERE
((((@ItemID is Null AND S.ItemID is null) or @IgnoreItemId = 1)
or (@ItemID is not Null AND S.ItemID = @ItemID))
and
(((@RdsCollectionId is Null AND S.RDSCollectionId is null) or @IgnoreRdsCollectionId = 1)
or (@RdsCollectionId is not Null AND S.RDSCollectionId = @RdsCollectionId)))'
IF @FilterColumn <> '' AND @FilterValue <> ''
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
SET @sql = @sql + ' SELECT COUNT(RDSServerId) FROM @RDSServer;
SELECT
ST.ID,
ST.ItemID,
ST.Name,
ST.FqdName,
ST.Description,
ST.RdsCollectionId,
SI.ItemName
FROM @RDSServer AS S
INNER JOIN RDSServers AS ST ON S.RDSServerId = ST.ID
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = ST.ItemId
WHERE S.ItemPosition BETWEEN @StartRow AND @EndRow'
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int, @RdsCollectionId int, @IgnoreItemId bit, @IgnoreRdsCollectionId bit',
@StartRow, @MaximumRows, @FilterValue, @ItemID, @RdsCollectionId, @IgnoreItemId , @IgnoreRdsCollectionId
RETURN
GO
SET ANSI_NULLS ON SET ANSI_NULLS ON
GO GO
SET QUOTED_IDENTIFIER ON SET QUOTED_IDENTIFIER ON
@ -6914,3 +6819,108 @@ exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @PackageID int, @Fil
RETURN RETURN
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServersPaged')
DROP PROCEDURE GetRDSServersPaged
GO
CREATE PROCEDURE [dbo].[GetRDSServersPaged]
(
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@ItemID int,
@IgnoreItemId bit,
@RdsCollectionId int,
@IgnoreRdsCollectionId bit,
@SortColumn nvarchar(50),
@StartRow int,
@MaximumRows int
)
AS
-- build query and run it to the temporary table
DECLARE @sql nvarchar(2000)
SET @sql = '
DECLARE @EndRow int
SET @EndRow = @StartRow + @MaximumRows
DECLARE @RDSServer TABLE
(
ItemPosition int IDENTITY(0,1),
RDSServerId int
)
INSERT INTO @RDSServer (RDSServerId)
SELECT
S.ID
FROM RDSServers AS S
WHERE
((((@ItemID is Null AND S.ItemID is null) or @IgnoreItemId = 1)
or (@ItemID is not Null AND S.ItemID = @ItemID))
and
(((@RdsCollectionId is Null AND S.RDSCollectionId is null) or @IgnoreRdsCollectionId = 1)
or (@RdsCollectionId is not Null AND S.RDSCollectionId = @RdsCollectionId)))'
IF @FilterColumn <> '' AND @FilterValue <> ''
SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue '
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' '
SET @sql = @sql + ' SELECT COUNT(RDSServerId) FROM @RDSServer;
SELECT
ST.ID,
ST.ItemID,
ST.Name,
ST.FqdName,
ST.Description,
ST.RdsCollectionId,
SI.ItemName,
ST.ConnectionEnabled
FROM @RDSServer AS S
INNER JOIN RDSServers AS ST ON S.RDSServerId = ST.ID
LEFT OUTER JOIN ServiceItems AS SI ON SI.ItemId = ST.ItemId
WHERE S.ItemPosition BETWEEN @StartRow AND @EndRow'
exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @ItemID int, @RdsCollectionId int, @IgnoreItemId bit, @IgnoreRdsCollectionId bit',
@StartRow, @MaximumRows, @FilterValue, @ItemID, @RdsCollectionId, @IgnoreItemId , @IgnoreRdsCollectionId
RETURN
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServer')
DROP PROCEDURE UpdateRDSServer
GO
CREATE PROCEDURE [dbo].[UpdateRDSServer]
(
@Id INT,
@ItemID INT,
@Name NVARCHAR(255),
@FqdName NVARCHAR(255),
@Description NVARCHAR(255),
@RDSCollectionId INT,
@ConnectionEnabled BIT
)
AS
UPDATE RDSServers
SET
ItemID = @ItemID,
Name = @Name,
FqdName = @FqdName,
Description = @Description,
RDSCollectionId = @RDSCollectionId,
ConnectionEnabled = @ConnectionEnabled
WHERE ID = @Id
GO
-- fix Windows 2012 Provider
BEGIN
UPDATE [dbo].[Providers] SET [EditorControl] = 'Windows2012' WHERE [ProviderName] = 'Windows2012'
END
GO

View file

@ -4627,10 +4627,10 @@ namespace WebsitePanel.EnterpriseServer
public static void UpdateRDSServer(RdsServer server) public static void UpdateRDSServer(RdsServer server)
{ {
UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description, UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description,
server.RdsCollectionId); server.RdsCollectionId, server.ConnectionEnabled);
} }
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId) public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId, bool connectionEnabled)
{ {
SqlHelper.ExecuteNonQuery( SqlHelper.ExecuteNonQuery(
ConnectionString, ConnectionString,
@ -4641,7 +4641,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Name", name), new SqlParameter("@Name", name),
new SqlParameter("@FqdName", fqdName), new SqlParameter("@FqdName", fqdName),
new SqlParameter("@Description", description), new SqlParameter("@Description", description),
new SqlParameter("@RDSCollectionId", rdsCollectionId) new SqlParameter("@RDSCollectionId", rdsCollectionId),
new SqlParameter("@ConnectionEnabled", connectionEnabled)
); );
} }

View file

@ -980,11 +980,13 @@ namespace WebsitePanel.EnterpriseServer
homeFolder.PackageId = packageId; homeFolder.PackageId = packageId;
homeFolder.Name = path; homeFolder.Name = path;
int res = AddPackageItem(homeFolder);
// Added By Haya // Added By Haya
UpdatePackageHardQuota(packageId); UpdatePackageHardQuota(packageId);
// save package item // save package item
return AddPackageItem(homeFolder); return res;
} }
public static DateTime GetPackageBandwidthUpdate(int packageId) public static DateTime GetPackageBandwidthUpdate(int packageId)

View file

@ -68,6 +68,11 @@ namespace WebsitePanel.EnterpriseServer
return AddRdsCollectionInternal(itemId, collection); return AddRdsCollectionInternal(itemId, collection);
} }
public static ResultObject EditRdsCollection(int itemId, RdsCollection collection)
{
return EditRdsCollectionInternal(itemId, collection);
}
public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{ {
return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows); return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
@ -93,9 +98,9 @@ namespace WebsitePanel.EnterpriseServer
return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows); return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
} }
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{ {
return GetOrganizationRdsServersPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows); return GetOrganizationRdsServersPagedInternal(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
} }
public static RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) public static RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
@ -108,6 +113,11 @@ namespace WebsitePanel.EnterpriseServer
return GetRdsServerInternal(rdsSeverId); return GetRdsServerInternal(rdsSeverId);
} }
public static ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
{
return SetRDServerNewConnectionAllowedInternal(itemId, newConnectionAllowed, rdsSeverId);
}
public static List<RdsServer> GetCollectionRdsServers(int collectionId) public static List<RdsServer> GetCollectionRdsServers(int collectionId)
{ {
return GetCollectionRdsServersInternal(collectionId); return GetCollectionRdsServersInternal(collectionId);
@ -280,6 +290,58 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
private static ResultObject EditRdsCollectionInternal(int itemId, RdsCollection collection)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "EDIT_RDS_COLLECTION");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
var existingServers =
ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
var removedServers = existingServers.Where(x => !collection.Servers.Select(y => y.Id).Contains(x.Id));
var newServers = collection.Servers.Where(x => !existingServers.Select(y => y.Id).Contains(x.Id));
foreach(var server in removedServers)
{
DataProvider.RemoveRDSServerFromCollection(server.Id);
}
rds.AddRdsServersToDeployment(newServers.ToArray());
foreach (var server in newServers)
{
DataProvider.AddRDSServerToCollection(server.Id, collection.Id);
}
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_COLLECTION", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{ {
DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows); DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
@ -420,9 +482,9 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{ {
DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true); DataSet ds = DataProvider.GetRDSServersPaged(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: !collectionId.HasValue);
RdsServersPaged result = new RdsServersPaged(); RdsServersPaged result = new RdsServersPaged();
result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
@ -457,6 +519,54 @@ namespace WebsitePanel.EnterpriseServer
return ObjectUtils.FillObjectFromDataReader<RdsServer>(DataProvider.GetRDSServerById(rdsSeverId)); return ObjectUtils.FillObjectFromDataReader<RdsServer>(DataProvider.GetRDSServerById(rdsSeverId));
} }
private static ResultObject SetRDServerNewConnectionAllowedInternal(int itemId, bool newConnectionAllowed, int rdsSeverId)
{
ResultObject result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED"); ;
try
{
// load organization
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
var rdsServer = GetRdsServer(rdsSeverId);
if (rdsServer == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("RDS Server not found"));
return result;
}
rds.SetRDServerNewConnectionAllowed(newConnectionAllowed, rdsServer);
rdsServer.ConnectionEnabled = newConnectionAllowed;
DataProvider.UpdateRDSServer(rdsServer);
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static int GetOrganizationRdsUsersCountInternal(int itemId) private static int GetOrganizationRdsUsersCountInternal(int itemId)
{ {
return DataProvider.GetOrganizationRdsUsersCount(itemId); return DataProvider.GetOrganizationRdsUsersCount(itemId);
@ -639,7 +749,7 @@ namespace WebsitePanel.EnterpriseServer
RdsServer rdsServer = GetRdsServer(serverId); RdsServer rdsServer = GetRdsServer(serverId);
if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName)) //if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName))
{ {
rds.AddSessionHostFeatureToServer(rdsServer.FqdName); rds.AddSessionHostFeatureToServer(rdsServer.FqdName);
} }

View file

@ -70,6 +70,12 @@ namespace WebsitePanel.EnterpriseServer
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection); return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
} }
[WebMethod]
public ResultObject EditRdsCollection(int itemId, RdsCollection collection)
{
return RemoteDesktopServicesController.EditRdsCollection(itemId, collection);
}
[WebMethod] [WebMethod]
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows) string sortColumn, int startRow, int maximumRows)
@ -101,10 +107,10 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod] [WebMethod]
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue, public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows) string sortColumn, int startRow, int maximumRows)
{ {
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, filterColumn, filterValue, return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, collectionId, filterColumn, filterValue,
sortColumn, startRow, maximumRows); sortColumn, startRow, maximumRows);
} }
@ -122,6 +128,12 @@ namespace WebsitePanel.EnterpriseServer
return RemoteDesktopServicesController.GetRdsServer(rdsSeverId); return RemoteDesktopServicesController.GetRdsServer(rdsSeverId);
} }
[WebMethod]
public ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
{
return RemoteDesktopServicesController.SetRDServerNewConnectionAllowed(itemId, newConnectionAllowed, rdsSeverId);
}
[WebMethod] [WebMethod]
public List<RdsServer> GetCollectionRdsServers(int collectionId) public List<RdsServer> GetCollectionRdsServers(int collectionId)
{ {

View file

@ -40,6 +40,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public interface IRemoteDesktopServices public interface IRemoteDesktopServices
{ {
bool CreateCollection(string organizationId, RdsCollection collection); bool CreateCollection(string organizationId, RdsCollection collection);
bool AddRdsServersToDeployment(RdsServer[] servers);
RdsCollection GetCollection(string collectionName); RdsCollection GetCollection(string collectionName);
bool RemoveCollection(string organizationId, string collectionName); bool RemoveCollection(string organizationId, string collectionName);
bool SetUsersInCollection(string organizationId, string collectionName, List<string> users); bool SetUsersInCollection(string organizationId, string collectionName, List<string> users);
@ -48,6 +49,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server); void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server);
void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers); void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers);
void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server);
List<StartMenuApp> GetAvailableRemoteApplications(string collectionName); List<StartMenuApp> GetAvailableRemoteApplications(string collectionName);
List<RemoteApplication> GetCollectionRemoteApplications(string collectionName); List<RemoteApplication> GetCollectionRemoteApplications(string collectionName);
bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp); bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp);

View file

@ -18,5 +18,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string Address { get; set; } public string Address { get; set; }
public string ItemName { get; set; } public string ItemName { get; set; }
public int? RdsCollectionId { get; set; } public int? RdsCollectionId { get; set; }
public bool ConnectionEnabled { get; set; }
} }
} }

View file

@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath> <OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -25,7 +25,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>..\WebsitePanel.Server\bin\</OutputPath> <OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -48,10 +48,12 @@
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj"> <ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project> <Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name> <Name>WebsitePanel.Providers.Base</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj"> <ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project> <Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
<Name>WebsitePanel.Server.Utils</Name> <Name>WebsitePanel.Server.Utils</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -80,10 +80,12 @@ namespace WebsitePanel.Providers.OS
{ {
Log.WriteStart("SetQuotaLimitOnFolder"); Log.WriteStart("SetQuotaLimitOnFolder");
Log.WriteInfo("FolderPath : {0}", folderPath); Log.WriteInfo("FolderPath : {0}", folderPath);
Log.WriteInfo("ShareNameDrive : {0}", shareNameDrive);
Log.WriteInfo("QuotaLimit : {0}", quotaLimit); Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
string path = Path.Combine(shareNameDrive + @":\", folderPath); string path = folderPath;
if (shareNameDrive != null)
path = Path.Combine(shareNameDrive + @":\", folderPath);
Runspace runSpace = null; Runspace runSpace = null;
try try

View file

@ -128,17 +128,76 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#region HostingServiceProvider methods #region HostingServiceProvider methods
public override bool IsInstalled() public override bool IsInstalled()
{ {
// TODO: Remove it.
//return true;
Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion(); Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion();
return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012; return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012 || version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012R2;
}
public override string[] Install()
{
Runspace runSpace = null;
PSObject feature = null;
try
{
runSpace = OpenRunspace();
if (!IsFeatureInstalled("Desktop-Experience", runSpace))
{
feature = AddFeature(runSpace, "Desktop-Experience", true, false);
}
if (!IsFeatureInstalled("NET-Framework-Core", runSpace))
{
feature = AddFeature(runSpace, "NET-Framework-Core", true, false);
}
if (!IsFeatureInstalled("NET-Framework-45-Core", runSpace))
{
feature = AddFeature(runSpace, "NET-Framework-45-Core", true, false);
}
}
finally
{
CloseRunspace(runSpace);
}
return new string[]{};
} }
#endregion #endregion
#region RDS Collections #region RDS Collections
public bool AddRdsServersToDeployment(RdsServer[] servers)
{
var result = true;
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
foreach (var server in servers)
{
if (!ExistRdsServerInDeployment(runSpace, server))
{
AddRdsServerToDeployment(runSpace, server);
}
}
}
catch (Exception e)
{
result = false;
}
finally
{
CloseRunspace(runSpace);
}
return result;
}
public bool CreateCollection(string organizationId, RdsCollection collection) public bool CreateCollection(string organizationId, RdsCollection collection)
{ {
var result = true; var result = true;
@ -370,7 +429,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
} }
} }
public void AddSessionHostServersToCollection(string organizationId, string collectionName, List<RdsServer> servers) public void AddSessionHostServersToCollection(string organizationId, string collectionName, List<RdsServer> servers)
{ {
foreach (var server in servers) foreach (var server in servers)
{ {
@ -390,7 +449,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker); cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
cmd.Parameters.Add("SessionHost", server.FqdName); cmd.Parameters.Add("SessionHost", server.FqdName);
cmd.Parameters.Add("Force", true); cmd.Parameters.Add("Force", true);
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server); RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
@ -411,6 +470,30 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#endregion #endregion
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
{
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
Command cmd = new Command("Set-RDSessionHost");
cmd.Parameters.Add("SessionHost", server.FqdName);
cmd.Parameters.Add("NewConnectionAllowed", string.Format("${0}", newConnectionAllowed.ToString()));
ExecuteShellCommand(runSpace, cmd, false);
}
catch (Exception e)
{
}
finally
{
CloseRunspace(runSpace);
}
}
#region Remote Applications #region Remote Applications
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName) public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
@ -635,8 +718,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ExecuteShellCommand(runSpace, cmd, false); ExecuteShellCommand(runSpace, cmd, false);
} }
private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server) private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server)
{ {
Command cmd = new Command("Get-RDserver"); Command cmd = new Command("Get-RDserver");
@ -737,6 +820,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName)); ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName));
} }
} }
SetRDServerNewConnectionAllowed(false, server);
} }
private void RemoveComputerFromCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server) private void RemoveComputerFromCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server)
@ -764,16 +849,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public bool AddSessionHostFeatureToServer(string hostName) public bool AddSessionHostFeatureToServer(string hostName)
{ {
bool installationResult = false; bool installationResult = false;
Runspace runSpace = null; Runspace runSpace = null;
try try
{ {
runSpace = OpenRunspace(); runSpace = OpenRunspace();
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true); var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
installationResult = (bool)GetPSObjectProperty(feature, "Success");
installationResult = (bool) GetPSObjectProperty(feature, "Success");
} }
finally finally
{ {
@ -1087,60 +1169,70 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#region Windows Feature PowerShell #region Windows Feature PowerShell
internal bool IsFeatureInstalled(string hostName, string featureName) internal bool IsFeatureInstalled(string featureName, Runspace runSpace)
{ {
bool isInstalled = false; bool isInstalled = false;
Command cmd = new Command("Get-WindowsFeature");
cmd.Parameters.Add("Name", featureName);
var feature = ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
Runspace runSpace = null; if (feature != null)
try
{ {
runSpace = OpenRunspace(); isInstalled = (bool)GetPSObjectProperty(feature, "Installed");
Command cmd = new Command("Get-WindowsFeature");
cmd.Parameters.Add("Name", featureName);
var feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
if (feature != null)
{
isInstalled = (bool) GetPSObjectProperty(feature, "Installed");
}
}
finally
{
CloseRunspace(runSpace);
} }
return isInstalled; return isInstalled;
} }
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false) internal bool IsFeatureInstalled(string hostName, string featureName, Runspace runSpace)
{ {
PSObject feature; bool isInstalled = false;
Command cmd = new Command("Get-WindowsFeature");
try cmd.Parameters.Add("Name", featureName);
var feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
if (feature != null)
{ {
Command cmd = new Command("Add-WindowsFeature"); isInstalled = (bool) GetPSObjectProperty(feature, "Installed");
cmd.Parameters.Add("Name", featureName); }
if (includeAllSubFeature) return isInstalled;
{ }
cmd.Parameters.Add("IncludeAllSubFeature", "");
}
if (restart) internal PSObject AddFeature(Runspace runSpace, string featureName, bool includeAllSubFeature = true, bool restart = false)
{ {
cmd.Parameters.Add("Restart", ""); Command cmd = new Command("Add-WindowsFeature");
} cmd.Parameters.Add("Name", featureName);
feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault(); if (includeAllSubFeature)
}
finally
{ {
CloseRunspace(runSpace); cmd.Parameters.Add("IncludeAllSubFeature", true);
} }
return feature; if (restart)
{
cmd.Parameters.Add("Restart", true);
}
return ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
}
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false)
{
Command cmd = new Command("Add-WindowsFeature");
cmd.Parameters.Add("Name", featureName);
if (includeAllSubFeature)
{
cmd.Parameters.Add("IncludeAllSubFeature", "");
}
if (restart)
{
cmd.Parameters.Add("Restart", "");
}
return ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
} }
#endregion #endregion

View file

@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath> <OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -25,7 +25,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>..\WebsitePanel.Server\bin\</OutputPath> <OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -56,18 +56,22 @@
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj"> <ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project> <Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
<Name>WebsitePanel.Providers.Base</Name> <Name>WebsitePanel.Providers.Base</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj"> <ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project> <Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
<Name>WebsitePanel.Providers.Web.IIs60</Name> <Name>WebsitePanel.Providers.Web.IIs60</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj"> <ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj">
<Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project> <Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project>
<Name>WebsitePanel.Providers.Web.IIs70</Name> <Name>WebsitePanel.Providers.Web.IIs70</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj"> <ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{e91e52f3-9555-4d00-b577-2b1dbdd87ca7}</Project> <Project>{e91e52f3-9555-4d00-b577-2b1dbdd87ca7}</Project>
<Name>WebsitePanel.Server.Utils</Name> <Name>WebsitePanel.Server.Utils</Name>
<Private>False</Private>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />

View file

@ -31,6 +31,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback CreateCollectionOperationCompleted; private System.Threading.SendOrPostCallback CreateCollectionOperationCompleted;
private System.Threading.SendOrPostCallback AddRdsServersToDeploymentOperationCompleted;
private System.Threading.SendOrPostCallback GetCollectionOperationCompleted; private System.Threading.SendOrPostCallback GetCollectionOperationCompleted;
private System.Threading.SendOrPostCallback RemoveCollectionOperationCompleted; private System.Threading.SendOrPostCallback RemoveCollectionOperationCompleted;
@ -45,6 +47,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback RemoveSessionHostServersFromCollectionOperationCompleted; private System.Threading.SendOrPostCallback RemoveSessionHostServersFromCollectionOperationCompleted;
private System.Threading.SendOrPostCallback SetRDServerNewConnectionAllowedOperationCompleted;
private System.Threading.SendOrPostCallback GetAvailableRemoteApplicationsOperationCompleted; private System.Threading.SendOrPostCallback GetAvailableRemoteApplicationsOperationCompleted;
private System.Threading.SendOrPostCallback GetCollectionRemoteApplicationsOperationCompleted; private System.Threading.SendOrPostCallback GetCollectionRemoteApplicationsOperationCompleted;
@ -69,6 +73,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
public event CreateCollectionCompletedEventHandler CreateCollectionCompleted; public event CreateCollectionCompletedEventHandler CreateCollectionCompleted;
/// <remarks/>
public event AddRdsServersToDeploymentCompletedEventHandler AddRdsServersToDeploymentCompleted;
/// <remarks/> /// <remarks/>
public event GetCollectionCompletedEventHandler GetCollectionCompleted; public event GetCollectionCompletedEventHandler GetCollectionCompleted;
@ -90,6 +97,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/> /// <remarks/>
public event RemoveSessionHostServersFromCollectionCompletedEventHandler RemoveSessionHostServersFromCollectionCompleted; public event RemoveSessionHostServersFromCollectionCompletedEventHandler RemoveSessionHostServersFromCollectionCompleted;
/// <remarks/>
public event SetRDServerNewConnectionAllowedCompletedEventHandler SetRDServerNewConnectionAllowedCompleted;
/// <remarks/> /// <remarks/>
public event GetAvailableRemoteApplicationsCompletedEventHandler GetAvailableRemoteApplicationsCompleted; public event GetAvailableRemoteApplicationsCompletedEventHandler GetAvailableRemoteApplicationsCompleted;
@ -159,6 +169,48 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRdsServersToDeployment", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool AddRdsServersToDeployment(RdsServer[] servers) {
object[] results = this.Invoke("AddRdsServersToDeployment", new object[] {
servers});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginAddRdsServersToDeployment(RdsServer[] servers, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddRdsServersToDeployment", new object[] {
servers}, callback, asyncState);
}
/// <remarks/>
public bool EndAddRdsServersToDeployment(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void AddRdsServersToDeploymentAsync(RdsServer[] servers) {
this.AddRdsServersToDeploymentAsync(servers, null);
}
/// <remarks/>
public void AddRdsServersToDeploymentAsync(RdsServer[] servers, object userState) {
if ((this.AddRdsServersToDeploymentOperationCompleted == null)) {
this.AddRdsServersToDeploymentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddRdsServersToDeploymentOperationCompleted);
}
this.InvokeAsync("AddRdsServersToDeployment", new object[] {
servers}, this.AddRdsServersToDeploymentOperationCompleted, userState);
}
private void OnAddRdsServersToDeploymentOperationCompleted(object arg) {
if ((this.AddRdsServersToDeploymentCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddRdsServersToDeploymentCompleted(this, new AddRdsServersToDeploymentCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollection", 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/GetCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -478,6 +530,49 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetRDServerNewConnectionAllowed", 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 SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server) {
this.Invoke("SetRDServerNewConnectionAllowed", new object[] {
newConnectionAllowed,
server});
}
/// <remarks/>
public System.IAsyncResult BeginSetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetRDServerNewConnectionAllowed", new object[] {
newConnectionAllowed,
server}, callback, asyncState);
}
/// <remarks/>
public void EndSetRDServerNewConnectionAllowed(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void SetRDServerNewConnectionAllowedAsync(bool newConnectionAllowed, RdsServer server) {
this.SetRDServerNewConnectionAllowedAsync(newConnectionAllowed, server, null);
}
/// <remarks/>
public void SetRDServerNewConnectionAllowedAsync(bool newConnectionAllowed, RdsServer server, object userState) {
if ((this.SetRDServerNewConnectionAllowedOperationCompleted == null)) {
this.SetRDServerNewConnectionAllowedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetRDServerNewConnectionAllowedOperationCompleted);
}
this.InvokeAsync("SetRDServerNewConnectionAllowed", new object[] {
newConnectionAllowed,
server}, this.SetRDServerNewConnectionAllowedOperationCompleted, userState);
}
private void OnSetRDServerNewConnectionAllowedOperationCompleted(object arg) {
if ((this.SetRDServerNewConnectionAllowedCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetRDServerNewConnectionAllowedCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetAvailableRemoteApplications", 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/GetAvailableRemoteApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -855,6 +950,32 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddRdsServersToDeploymentCompletedEventHandler(object sender, AddRdsServersToDeploymentCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddRdsServersToDeploymentCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal AddRdsServersToDeploymentCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(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 GetCollectionCompletedEventHandler(object sender, GetCollectionCompletedEventArgs e); public delegate void GetCollectionCompletedEventHandler(object sender, GetCollectionCompletedEventArgs e);
@ -949,6 +1070,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void RemoveSessionHostServersFromCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void RemoveSessionHostServersFromCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetRDServerNewConnectionAllowedCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetAvailableRemoteApplicationsCompletedEventHandler(object sender, GetAvailableRemoteApplicationsCompletedEventArgs e); public delegate void GetAvailableRemoteApplicationsCompletedEventHandler(object sender, GetAvailableRemoteApplicationsCompletedEventArgs e);

View file

@ -76,6 +76,23 @@ namespace WebsitePanel.Server
} }
} }
[WebMethod, SoapHeader("settings")]
public bool AddRdsServersToDeployment(RdsServer[] servers)
{
try
{
Log.WriteStart("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
var result = RDSProvider.AddRdsServersToDeployment(servers);
Log.WriteEnd("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public RdsCollection GetCollection(string collectionName) public RdsCollection GetCollection(string collectionName)
{ {
@ -191,6 +208,22 @@ namespace WebsitePanel.Server
} }
} }
[WebMethod, SoapHeader("settings")]
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
{
try
{
Log.WriteStart("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
RDSProvider.SetRDServerNewConnectionAllowed(newConnectionAllowed, server);
Log.WriteEnd("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName) public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
{ {

View file

@ -1,46 +1,51 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0"?>
<configuration> <configuration>
<!-- Custom configuration sections --> <!-- Custom configuration sections -->
<configSections> <configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3" /> <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/>
<section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server" /> <section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server"/>
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching" /> <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup> </sectionGroup>
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup> </sectionGroup>
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<appSettings> <appSettings>
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false" /> <add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
<add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false" /> <add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false"/>
<add key="WebsitePanel.Exchange.enableSP2abp" value="false" /> <add key="WebsitePanel.Exchange.enableSP2abp" value="false"/>
<add key="SCVMMServerName" value="" /> <add key="SCVMMServerName" value=""/>
<add key="SCVMMServerPort" value="" /> <add key="SCVMMServerPort" value=""/>
</appSettings> </appSettings>
<system.diagnostics> <system.diagnostics>
<switches> <switches>
<add name="Log" value="2" /> <add name="Log" value="2"/>
<!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose --> <!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose -->
</switches> </switches>
<trace autoflush="true"> <trace autoflush="true">
<listeners> <listeners>
<add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel" /> <add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel"/>
<!-- Writes log to the file <!-- Writes log to the file
<add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" /> <add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" />
--> -->
<remove name="Default" /> <remove name="Default"/>
</listeners> </listeners>
</trace> </trace>
</system.diagnostics> </system.diagnostics>
<!-- Caching Configuration --> <!-- Caching Configuration -->
<cachingConfiguration defaultCacheManager="Default Cache Manager"> <cachingConfiguration defaultCacheManager="Default Cache Manager">
<backingStores> <backingStores>
<add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" /> <add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching"/>
</backingStores> </backingStores>
<cacheManagers> <cacheManagers>
<add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory" /> <add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory"/>
</cacheManagers> </cacheManagers>
</cachingConfiguration> </cachingConfiguration>
<!-- WebsitePanel Configuration --> <!-- WebsitePanel Configuration -->
@ -48,85 +53,85 @@
<!-- Security settings --> <!-- Security settings -->
<security> <security>
<!-- Perform security check --> <!-- Perform security check -->
<enabled value="true" /> <enabled value="true"/>
<!-- Server password --> <!-- Server password -->
<password value="+uxnDOdf55yuH6iZYXgYAxsfIBw=" /> <password value="+uxnDOdf55yuH6iZYXgYAxsfIBw="/>
</security> </security>
</websitepanel.server> </websitepanel.server>
<system.web> <system.web>
<!-- Disable any authentication --> <!-- Disable any authentication -->
<authentication mode="None" /> <authentication mode="None"/>
<!-- Correct HTTP runtime settings --> <!-- Correct HTTP runtime settings -->
<httpRuntime executionTimeout="3600" maxRequestLength="16384" /> <httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
<!-- Set globalization settings --> <!-- Set globalization settings -->
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" /> <globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
<!-- Web Services settings --> <!-- Web Services settings -->
<webServices> <webServices>
<protocols> <protocols>
<remove name="HttpPost" /> <remove name="HttpPost"/>
<remove name="HttpPostLocalhost" /> <remove name="HttpPostLocalhost"/>
<remove name="HttpGet" /> <remove name="HttpGet"/>
</protocols> </protocols>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3" /> <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
</webServices> </webServices>
<compilation debug="true"> <compilation debug="true">
<assemblies> <assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies> </assemblies>
</compilation> </compilation>
<pages> <pages>
<controls> <controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls> </controls>
</pages> </pages>
<httpHandlers> <httpHandlers>
<remove verb="*" path="*.asmx" /> <remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers> </httpHandlers>
<httpModules> <httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules> </httpModules>
</system.web> </system.web>
<!-- WSE 3.0 settings --> <!-- WSE 3.0 settings -->
<microsoft.web.services3> <microsoft.web.services3>
<diagnostics> <diagnostics>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" /> <trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
</diagnostics> </diagnostics>
<messaging> <messaging>
<maxMessageLength value="-1" /> <maxMessageLength value="-1"/>
<mtom serverMode="optional" clientMode="On" /> <mtom serverMode="optional" clientMode="On"/>
</messaging> </messaging>
<security> <security>
<securityTokenManager> <securityTokenManager>
<add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" /> <add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/>
</securityTokenManager> </securityTokenManager>
<timeToleranceInSeconds value="86400" /> <timeToleranceInSeconds value="86400"/>
</security> </security>
<policy fileName="WsePolicyCache.Config" /> <policy fileName="WsePolicyCache.Config"/>
</microsoft.web.services3> </microsoft.web.services3>
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
<wsHttpBinding> <wsHttpBinding>
<binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message"> <security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security> </security>
</binding> </binding>
<binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message"> <security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security> </security>
</binding> </binding>
</wsHttpBinding> </wsHttpBinding>
@ -135,40 +140,40 @@
<system.codedom> <system.codedom>
<compilers> <compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" /> <providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false" /> <providerOption name="WarnAsError" value="false"/>
</compiler> </compiler>
</compilers> </compilers>
</system.codedom> </system.codedom>
<system.webServer> <system.webServer>
<validation validateIntegratedModeConfiguration="false" /> <validation validateIntegratedModeConfiguration="false"/>
<modules> <modules>
<remove name="ScriptModule" /> <remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules> </modules>
<handlers> <handlers>
<remove name="WebServiceHandlerFactory-Integrated" /> <remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" /> <remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices" /> <remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource" /> <remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers> </handlers>
</system.webServer> </system.webServer>
<runtime> <runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /> <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</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" /> <probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80"/>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View file

@ -17,7 +17,7 @@
<OldToolsVersion>4.0</OldToolsVersion> <OldToolsVersion>4.0</OldToolsVersion>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress> <UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
@ -79,7 +79,6 @@
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" /> <Reference Include="System.ServiceProcess" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" /> <Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" /> <Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />

View file

@ -141,4 +141,5 @@
<Control key="rds_create_collection" general_key="rds_collections" /> <Control key="rds_create_collection" general_key="rds_collections" />
<Control key="rds_collection_edit_apps" general_key="rds_collections" /> <Control key="rds_collection_edit_apps" general_key="rds_collections" />
<Control key="rds_collection_edit_users" general_key="rds_collections" /> <Control key="rds_collection_edit_users" general_key="rds_collections" />
<Control key="rds_edit_collection" general_key="rds_collections" />
</Controls> </Controls>

View file

@ -574,6 +574,7 @@
<Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" /> <Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" />
<Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" /> <Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" />
<Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" /> <Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" />
<Control key="rds_edit_collection" src="WebsitePanel/RDS/RDSEditCollection.ascx" title="RDSEditCollection" type="View" />
</Controls> </Controls>
</ModuleDefinition> </ModuleDefinition>

View file

@ -66,7 +66,7 @@ namespace WebsitePanel.Portal
public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue) public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
{ {
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, "", filterValue, sortColumn, startRowIndex, maximumRows); rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, null, "", filterValue, sortColumn, startRowIndex, maximumRows);
return rdsServers.Servers; return rdsServers.Servers;
} }

View file

@ -0,0 +1,126 @@
<?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="chkEnableHardQuota.Text" xml:space="preserve">
<value>Enable Hard Quota:</value>
</data>
<data name="lblSpacesFolder.Text" xml:space="preserve">
<value>Hosting Spaces Folder:</value>
</data>
</root>

View file

@ -0,0 +1,25 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Windows2012_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.Windows2012_Settings" %>
<table cellpadding="1" cellspacing="0" width="100%">
<tr>
<td class="SubHead" width="200" nowrap>
<asp:Label ID="lblSpacesFolder" runat="server" meta:resourcekey="lblSpacesFolder" Text="Hosting Spaces Folder:"></asp:Label>
</td>
<td width="100%">
<asp:TextBox runat="server" ID="txtFolder" Width="300px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap></td>
<td width="100%">
<table>
<tr>
<td>
<asp:CheckBox runat="server" AutoPostBack="false" ID="chkEnableHardQuota" meta:resourcekey="chkEnableHardQuota" Text="Enable Hard Quota:" /></td>
</tr>
<tr>
<td>
<asp:Label runat="server" ID="lblFileServiceInfo" meta:resourcekey="lblFileServiceInfo" Text="Install File Services role on the file server to enable the check box" Font-Italic="true" Visible="false"></asp:Label></td>
</tr>
</table>
</td>
</tr>
</table>

View file

@ -0,0 +1,79 @@
// Copyright (c) 2014, 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.Collections;
using System.Collections.Specialized;
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;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class Windows2012_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{
protected void Page_Load(object sender, EventArgs e)
{
//CO Changes
if (!IsPostBack)
{
try
{
chkEnableHardQuota.Enabled = ES.Services.OperatingSystems.CheckFileServicesInstallation(PanelRequest.ServiceId);
if (!chkEnableHardQuota.Enabled)
lblFileServiceInfo.Visible = true;
}
catch
{
}
}
//END
}
public void BindSettings(StringDictionary settings)
{
txtFolder.Text = settings["UsersHome"];
//CO Changes
chkEnableHardQuota.Checked = settings["EnableHardQuota"] == "true" ? true : false;
//END
}
public void SaveSettings(StringDictionary settings)
{
settings["UsersHome"] = txtFolder.Text;
//CO Changes
settings["EnableHardQuota"] = chkEnableHardQuota.Checked.ToString().ToLower();
//END
}
}
}

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 Windows2012_Settings {
/// <summary>
/// lblSpacesFolder 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 lblSpacesFolder;
/// <summary>
/// txtFolder 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 txtFolder;
/// <summary>
/// chkEnableHardQuota 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 chkEnableHardQuota;
/// <summary>
/// lblFileServiceInfo 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 lblFileServiceInfo;
}
}

View file

@ -147,4 +147,16 @@
<data name="locQuota.Text" xml:space="preserve"> <data name="locQuota.Text" xml:space="preserve">
<value>Total RDS Servers Allocated:</value> <value>Total RDS Servers Allocated:</value>
</data> </data>
<data name="cmdDisable.Text" xml:space="preserve">
<value>Disable</value>
</data>
<data name="cmdEnable.Text" xml:space="preserve">
<value>Enable</value>
</data>
<data name="cmdDisable.ToolTip" xml:space="preserve">
<value>Disable</value>
</data>
<data name="cmdEnable.ToolTip" xml:space="preserve">
<value>Enable</value>
</data>
</root> </root>

View file

@ -0,0 +1,144 @@
<?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="btnCreate.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Adding RDS Server ...');</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value />
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Edit RDS Collection</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit RDS Collection</value>
</data>
<data name="locCollectionName.Text" xml:space="preserve">
<value>Collection Name</value>
</data>
<data name="gvRDSServerName.Header" xml:space="preserve">
<value>Server Name</value>
</data>
<data name="gvRDSServers.Empty" xml:space="preserve">
<value>No RDS Servers have been added yet. To add a new RDS Servers click "Add RDS Server" button.</value>
</data>
</root>

View file

@ -1,4 +1,5 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AssignedRDSServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.AssignedRDSServers" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AssignedRDSServers.ascx.cs" Inherits="WebsitePanel.Portal.RDS.AssignedRDSServers" %>
<%@ Import Namespace="WebsitePanel.Portal" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
@ -46,15 +47,24 @@
DataSourceID="odsRDSAssignedServersPaged" PageSize="20"> DataSourceID="odsRDSAssignedServersPaged" PageSize="20">
<Columns> <Columns>
<asp:TemplateField HeaderText="gvRDSServerName" SortExpression="Name"> <asp:TemplateField HeaderText="gvRDSServerName" SortExpression="Name">
<ItemStyle Width="90%"></ItemStyle> <ItemStyle Width="80%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Label id="litRDSServerName" runat="server"> <asp:Label id="litRDSServerName" runat="server">
<%# Eval("Name") %> <%# Eval("Name") %>
</asp:Label> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
<ItemStyle Width="10%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:ImageButton ID="EnableLinkButton" ImageUrl='<%# PortalUtils.GetThemedImage("Exchange/bullet.gif")%>' runat="server" Visible='<%# Eval("RdsCollectionId") != null && !Convert.ToBoolean(Eval("ConnectionEnabled")) %>'
CommandName="EnableItem" CommandArgument='<%# Eval("Id") %>' meta:resourcekey="cmdEnable"></asp:ImageButton>
<asp:ImageButton ID="DisableLinkButton" ImageUrl='<%# PortalUtils.GetThemedImage("Exchange/bullet_hover.gif")%>' runat="server" Visible='<%# Eval("RdsCollectionId") != null && Convert.ToBoolean(Eval("ConnectionEnabled")) %>'
CommandName="DisableItem" CommandArgument='<%# Eval("Id") %>' meta:resourcekey="cmdDisable"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="imgRemove1" runat="server" Text="Remove" Visible='<%# Eval("RdsCollectionId") == null %>' <asp:LinkButton ID="imgRemove1" runat="server" Text="Remove" Visible='<%# Eval("RdsCollectionId") == null %>'
CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>' CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>'
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected server?')"></asp:LinkButton> meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected server?')"></asp:LinkButton>

View file

@ -61,35 +61,31 @@ namespace WebsitePanel.Portal.RDS
protected void gvRDSAssignedServers_RowCommand(object sender, GridViewCommandEventArgs e) protected void gvRDSAssignedServers_RowCommand(object sender, GridViewCommandEventArgs e)
{ {
if (e.CommandName == "DeleteItem") int rdsServerId = int.Parse(e.CommandArgument.ToString());
{
// delete RDS Server
int rdsServerId = int.Parse(e.CommandArgument.ToString());
try
{ RdsServer rdsServer = ES.Services.RDS.GetRdsServer(rdsServerId);
RdsServer rdsServer = ES.Services.RDS.GetRdsServer(rdsServerId);
switch (e.CommandName)
{
case "DeleteItem":
if (rdsServer.RdsCollectionId != null) if (rdsServer.RdsCollectionId != null)
{ {
messageBox.ShowErrorMessage("RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION"); messageBox.ShowErrorMessage("RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION");
return; return;
} }
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId); DeleteItem(rdsServerId);
if (!result.IsSuccess) break;
{ case "EnableItem":
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS"); ChangeConnectionState(true, rdsServer);
return; break;
} case "DisableItem":
ChangeConnectionState(false, rdsServer);
gvRDSAssignedServers.DataBind(); break;
}
catch (Exception ex)
{
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", ex);
}
} }
gvRDSAssignedServers.DataBind();
} }
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
@ -97,6 +93,26 @@ namespace WebsitePanel.Portal.RDS
gvRDSAssignedServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue); gvRDSAssignedServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
gvRDSAssignedServers.DataBind(); gvRDSAssignedServers.DataBind();
}
#region Methods
private void DeleteItem(int rdsServerId)
{
ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId);
if (!result.IsSuccess)
{
messageBox.ShowMessage(result, "REMOTE_DESKTOP_SERVICES_UNASSIGN_SERVER_FROM_ORG", "RDS");
return;
}
} }
private void ChangeConnectionState(bool enabled, RdsServer rdsServer)
{
ES.Services.RDS.SetRDServerNewConnectionAllowed(rdsServer.ItemId.Value, enabled, rdsServer.Id);
}
#endregion
} }
} }

View file

@ -47,8 +47,8 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name"> <asp:TemplateField HeaderText="gvCollectionName" SortExpression="Name">
<ItemStyle Width="40%"></ItemStyle> <ItemStyle Width="40%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Literal id="litCollectionName" runat="server" Text='<%# Eval("Name").ToString() %>'></asp:Literal> <asp:hyperlink id="lnkCollectionName" meta:resourcekey="lnkApps" runat="server" NavigateUrl='<%# GetCollectionEditUrl(Eval("Id").ToString()) %>'><%# Eval("Name").ToString() %></asp:hyperlink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="gvServer"> <asp:TemplateField HeaderText="gvServer">

View file

@ -111,5 +111,10 @@ namespace WebsitePanel.Portal.RDS
"CollectionId=" + collectionId, "CollectionId=" + collectionId,
"ItemID=" + PanelRequest.ItemID); "ItemID=" + PanelRequest.ItemID);
} }
public string GetCollectionEditUrl(string collectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID);
}
} }
} }

View file

@ -0,0 +1,36 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditCollection.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditCollection" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/RDSCollectionServers.ascx" TagName="CollectionServers" 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="imgAddRDSServer" SkinID="AddRDSServer48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Server To Organization"></asp:Localize>
</div>
<div class="FormContentRDS">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<fieldset id="RDSServersPanel" runat="server">
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
<div style="padding: 10px;">
<wsp:CollectionServers id="servers" runat="server" />
</div>
</fieldset>
<div class="FormFooter">
<asp:Button id="btnSave" runat="server" Text="Save" CssClass="Button1" meta:resourcekey="btnSave" OnClick="btnSave_Click" ValidationGroup="SaveRDSCollection"></asp:Button>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.RDS
{
public partial class RDSEditCollection : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
try
{
if (servers.GetServers().Count < 1)
{
messageBox.ShowErrorMessage("RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED");
return;
}
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
collection.Servers = servers.GetServers();
ES.Services.RDS.EditRdsCollection(PanelRequest.ItemID, collection);
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections",
"SpaceID=" + PanelSecurity.PackageId));
}
catch { }
}
}
}

View file

@ -0,0 +1,87 @@
//------------------------------------------------------------------------------
// <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 RDSEditCollection {
/// <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>
/// imgAddRDSServer 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 imgAddRDSServer;
/// <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>
/// 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>
/// RDSServersPanel 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.HtmlGenericControl RDSServersPanel;
/// <summary>
/// locRDSServersSection 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 locRDSServersSection;
/// <summary>
/// servers 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.RDSCollectionServers servers;
/// <summary>
/// btnSave 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 btnSave;
}
}

View file

@ -53,19 +53,14 @@ namespace WebsitePanel.Portal.RDS.UserControls
{ {
BindServers(servers, false); BindServers(servers, false);
} }
//public RdsServer[] GetServers()
//{
// return GetGridViewServers(SelectedState.All).ToArray();
//}
public List<RdsServer> GetServers() public List<RdsServer> GetServers()
{ {
return GetGridViewServers(SelectedState.All); return GetGridViewServers(SelectedState.All);
} }
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
// register javascript // register javascript
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes")) if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
{ {
@ -80,8 +75,14 @@ namespace WebsitePanel.Portal.RDS.UserControls
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes", Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
script, true); script, true);
} }
if (!IsPostBack && PanelRequest.CollectionID > 0)
{
BindOrganizationServers();
}
} }
protected void btnAdd_Click(object sender, EventArgs e) protected void btnAdd_Click(object sender, EventArgs e)
{ {
// bind all servers // bind all servers
@ -205,6 +206,25 @@ namespace WebsitePanel.Portal.RDS.UserControls
} }
protected void BindOrganizationServers()
{
RdsServer[] servers = ES.Services.RDS.GetOrganizationRdsServersPaged(PanelRequest.ItemID, PanelRequest.CollectionID, "FqdName", txtSearchValue.Text, null, 0, 1000).Servers;
Array.Sort(servers, CompareAccount);
if (Direction == SortDirection.Ascending)
{
Array.Reverse(servers);
Direction = SortDirection.Descending;
}
else
{
Direction = SortDirection.Ascending;
}
gvServers.DataSource = servers;
gvServers.DataBind();
}
protected void cmdSearch_Click(object sender, ImageClickEventArgs e) protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
{ {
BindPopupServers(); BindPopupServers();

View file

@ -211,6 +211,13 @@
<Compile Include="Code\ReportingServices\IResourceStorage.cs" /> <Compile Include="Code\ReportingServices\IResourceStorage.cs" />
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" /> <Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
<Compile Include="Code\UserControls\Tab.cs" /> <Compile Include="Code\UserControls\Tab.cs" />
<Compile Include="ProviderControls\Windows2012_Settings.ascx.cs">
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\Windows2012_Settings.ascx.designer.cs">
<DependentUpon>Windows2012_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="RDSServersAddserver.ascx.cs"> <Compile Include="RDSServersAddserver.ascx.cs">
<DependentUpon>RDSServersAddserver.ascx</DependentUpon> <DependentUpon>RDSServersAddserver.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -239,6 +246,13 @@
<Compile Include="RDS\AddRDSServer.ascx.designer.cs"> <Compile Include="RDS\AddRDSServer.ascx.designer.cs">
<DependentUpon>AddRDSServer.ascx</DependentUpon> <DependentUpon>AddRDSServer.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="RDS\RDSEditCollection.ascx.cs">
<DependentUpon>RDSEditCollection.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="RDS\RDSEditCollection.ascx.designer.cs">
<DependentUpon>RDSEditCollection.ascx</DependentUpon>
</Compile>
<Compile Include="RDS\RDSEditCollectionApps.ascx.cs"> <Compile Include="RDS\RDSEditCollectionApps.ascx.cs">
<DependentUpon>RDSEditCollectionApps.ascx</DependentUpon> <DependentUpon>RDSEditCollectionApps.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -4263,10 +4277,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="ApplyEnableHardQuotaFeature.ascx" /> <Content Include="ApplyEnableHardQuotaFeature.ascx" />
<Content Include="ProviderControls\Windows2012_Settings.ascx" />
<Content Include="RDSServersAddserver.ascx" /> <Content Include="RDSServersAddserver.ascx" />
<Content Include="RDSServers.ascx" /> <Content Include="RDSServers.ascx" />
<Content Include="RDS\AssignedRDSServers.ascx" /> <Content Include="RDS\AssignedRDSServers.ascx" />
<Content Include="RDS\AddRDSServer.ascx" /> <Content Include="RDS\AddRDSServer.ascx" />
<Content Include="RDS\RDSEditCollection.ascx" />
<Content Include="RDS\RDSEditCollectionApps.ascx" /> <Content Include="RDS\RDSEditCollectionApps.ascx" />
<Content Include="RDS\RDSEditCollectionUsers.ascx" /> <Content Include="RDS\RDSEditCollectionUsers.ascx" />
<Content Include="RDS\RDSCreateCollection.ascx" /> <Content Include="RDS\RDSCreateCollection.ascx" />
@ -4277,6 +4293,10 @@
<Content Include="ScheduleTaskControls\App_LocalResources\DomainExpirationView.ascx.resx" /> <Content Include="ScheduleTaskControls\App_LocalResources\DomainExpirationView.ascx.resx" />
<Content Include="App_LocalResources\SettingsDomainExpirationLetter.ascx.resx" /> <Content Include="App_LocalResources\SettingsDomainExpirationLetter.ascx.resx" />
<Content Include="App_LocalResources\SettingsDomainLookupLetter.ascx.resx" /> <Content Include="App_LocalResources\SettingsDomainLookupLetter.ascx.resx" />
<Content Include="ProviderControls\App_LocalResources\Windows2012_Settings.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSEditCollection.ascx.resx" >
<SubType>Designer</SubType>
</Content>
<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>
@ -5584,7 +5604,9 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
<Content Include="RDS\App_LocalResources\AddRDSServer.ascx.resx" /> <Content Include="RDS\App_LocalResources\AddRDSServer.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSCreateCollection.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSCreateCollection.ascx.resx">
<SubType>Designer</SubType>
</Content>
<Content Include="RDS\App_LocalResources\RDSEditCollectionUsers.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSEditCollectionUsers.ascx.resx" />
<Content Include="RDS\App_LocalResources\RDSEditCollectionApps.ascx.resx" /> <Content Include="RDS\App_LocalResources\RDSEditCollectionApps.ascx.resx" />
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" /> <Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" />