This commit is contained in:
vfedosevich 2015-04-16 05:00:56 -07:00
commit 097378bc50
352 changed files with 45244 additions and 2550 deletions

View file

@ -21,7 +21,10 @@ DELETE FROM HostingPlanQuotas WHERE QuotaID = 342
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 343
GO
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE GroupID = 33 AND [GroupName] = 'VPS2012')
BEGIN
DELETE FROM HostingPlanResources WHERE GroupID = 33
END
GO
@ -8204,6 +8207,27 @@ AS
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 558 BEGIN -- RAM of VPS2012
DECLARE @Result1 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
DECLARE @Result2 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'DynamicMemory.Maximum' AND PT.ParentPackageID = @PackageID)
SET @Result = CASE WHEN isnull(@Result1,0) > isnull(@Result2,0) THEN @Result1 ELSE @Result2 END
END
ELSE IF @QuotaID = 559 -- HDD of VPS2012
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 562 -- External IP addresses of VPS2012
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 100 -- Dedicated Web IP addresses
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
@ -8846,16 +8870,168 @@ RETURN
GO
-- Hyper-V 2012 R2 Provider
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'VPS2012')
BEGIN
INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (33, N'VPS2012', 19, NULL, 1)
INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (41, 33, N'VirtualMachine', N'WebsitePanel.Providers.Virtualization.VirtualMachine, WebsitePanel.Providers.Base', 1, 0, 0, 1, 1, 1, 0, 0)
INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (42, 33, N'VirtualSwitch', N'WebsitePanel.Providers.Virtualization.VirtualSwitch, WebsitePanel.Providers.Base', 2, 0, 0, 1, 1, 1, 0, 0)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (553, 33, 1, N'VPS2012.ServersNumber', N'Number of VPS', 2, 0, 41, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (554, 33, 2, N'VPS2012.ManagingAllowed', N'Allow user to create VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (555, 33, 3, N'VPS2012.CpuNumber', N'Number of CPU cores', 3, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (556, 33, 7, N'VPS2012.BootCdAllowed', N'Boot from CD allowed', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (557, 33, 8, N'VPS2012.BootCdEnabled', N'Boot from CD', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (558, 33, 4, N'VPS2012.Ram', N'RAM size, MB', 2, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (559, 33, 5, N'VPS2012.Hdd', N'Hard Drive size, GB', 2, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (560, 33, 6, N'VPS2012.DvdEnabled', N'DVD drive', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (561, 33, 10, N'VPS2012.ExternalNetworkEnabled', N'External Network', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (562, 33, 11, N'VPS2012.ExternalIPAddressesNumber', N'Number of External IP addresses', 2, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (563, 33, 13, N'VPS2012.PrivateNetworkEnabled', N'Private Network', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (564, 33, 14, N'VPS2012.PrivateIPAddressesNumber', N'Number of Private IP addresses per VPS', 3, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (565, 33, 9, N'VPS2012.SnapshotsNumber', N'Number of Snaphots', 3, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (566, 33, 15, N'VPS2012.StartShutdownAllowed', N'Allow user to Start, Turn off and Shutdown VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (567, 33, 16, N'VPS2012.PauseResumeAllowed', N'Allow user to Pause, Resume VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (568, 33, 17, N'VPS2012.RebootAllowed', N'Allow user to Reboot VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (569, 33, 18, N'VPS2012.ResetAlowed', N'Allow user to Reset VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (570, 33, 19, N'VPS2012.ReinstallAllowed', N'Allow user to Re-install VPS', 1, 0, NULL, NULL)
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (571, 33, 12, N'VPS2012.Bandwidth', N'Monthly bandwidth, GB', 2, 0, NULL, NULL)
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2')
BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV2012R2', 1)
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 33, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV2012R2', 1)
END
ELSE
BEGIN
UPDATE [dbo].[Providers] SET [EditorControl] = N'HyperV2012R2' WHERE [ProviderName] = 'HyperV2012R2'
UPDATE [dbo].[Providers] SET [EditorControl] = N'HyperV2012R2', [GroupID] = 33 WHERE [ProviderName] = 'HyperV2012R2'
END
GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetVirtualMachinesPaged2012')
DROP PROCEDURE GetVirtualMachinesPaged2012
GO
CREATE PROCEDURE [dbo].[GetVirtualMachinesPaged2012]
(
@ActorID int,
@PackageID int,
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@SortColumn nvarchar(50),
@StartRow int,
@MaximumRows int,
@Recursive bit
)
AS
-- check rights
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
RAISERROR('You are not allowed to access this package', 16, 1)
-- start
DECLARE @condition nvarchar(700)
SET @condition = '
SI.ItemTypeID = 41 -- VPS2012
AND ((@Recursive = 0 AND P.PackageID = @PackageID)
OR (@Recursive = 1 AND dbo.CheckPackageParent(@PackageID, P.PackageID) = 1))
'
IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL
AND @FilterValue <> '' AND @FilterValue IS NOT NULL
SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + ''''
IF @SortColumn IS NULL OR @SortColumn = ''
SET @SortColumn = 'SI.ItemName ASC'
DECLARE @sql nvarchar(3500)
set @sql = '
SELECT COUNT(SI.ItemID) FROM Packages AS P
INNER JOIN ServiceItems AS SI ON P.PackageID = SI.PackageID
INNER JOIN Users AS U ON P.UserID = U.UserID
LEFT OUTER JOIN (
SELECT PIP.ItemID, IP.ExternalIP FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
WHERE PIP.IsPrimary = 1 AND IP.PoolID = 3 -- external IP addresses
) AS EIP ON SI.ItemID = EIP.ItemID
LEFT OUTER JOIN PrivateIPAddresses AS PIP ON PIP.ItemID = SI.ItemID AND PIP.IsPrimary = 1
WHERE ' + @condition + '
DECLARE @Items AS TABLE
(
ItemID int
);
WITH TempItems AS (
SELECT ROW_NUMBER() OVER (ORDER BY ' + @SortColumn + ') as Row,
SI.ItemID
FROM Packages AS P
INNER JOIN ServiceItems AS SI ON P.PackageID = SI.PackageID
INNER JOIN Users AS U ON P.UserID = U.UserID
LEFT OUTER JOIN (
SELECT PIP.ItemID, IP.ExternalIP FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
WHERE PIP.IsPrimary = 1 AND IP.PoolID = 3 -- external IP addresses
) AS EIP ON SI.ItemID = EIP.ItemID
LEFT OUTER JOIN PrivateIPAddresses AS PIP ON PIP.ItemID = SI.ItemID AND PIP.IsPrimary = 1
WHERE ' + @condition + '
)
INSERT INTO @Items
SELECT ItemID FROM TempItems
WHERE TempItems.Row BETWEEN @StartRow + 1 and @StartRow + @MaximumRows
SELECT
SI.ItemID,
SI.ItemName,
SI.PackageID,
P.PackageName,
P.UserID,
U.Username,
EIP.ExternalIP,
PIP.IPAddress
FROM @Items AS TSI
INNER JOIN ServiceItems AS SI ON TSI.ItemID = SI.ItemID
INNER JOIN Packages AS P ON SI.PackageID = P.PackageID
INNER JOIN Users AS U ON P.UserID = U.UserID
LEFT OUTER JOIN (
SELECT PIP.ItemID, IP.ExternalIP FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
WHERE PIP.IsPrimary = 1 AND IP.PoolID = 3 -- external IP addresses
) AS EIP ON SI.ItemID = EIP.ItemID
LEFT OUTER JOIN PrivateIPAddresses AS PIP ON PIP.ItemID = SI.ItemID AND PIP.IsPrimary = 1
'
--print @sql
exec sp_executesql @sql, N'@PackageID int, @StartRow int, @MaximumRows int, @Recursive bit',
@PackageID, @StartRow, @MaximumRows, @Recursive
RETURN
GO
--ES OWA Editing
IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'EnterpriseFoldersOwaPermissions')
CREATE TABLE EnterpriseFoldersOwaPermissions
@ -9446,10 +9622,167 @@ END
GO
UPDATE [dbo].[Quotas] SET GroupID = 45 WHERE QuotaName = 'EnterpriseStorage.DriveMaps'
GO
UPDATE [dbo].[ResourceGroups] SET GroupName = 'Sharepoint Enterprise Server' WHERE GroupName = 'Sharepoint Server'
GO
UPDATE [dbo].[ResourceGroups] SET GroupController = 'WebsitePanel.EnterpriseServer.HostedSharePointServerEntController' WHERE GroupName = 'Sharepoint Enterprise Server'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted SharePoint Enterprise 2013')
BEGIN
DECLARE @provider_id AS INT
DECLARE @group_id AS INT
SELECT @group_id = GroupId FROM [dbo].[ResourceGroups] WHERE GroupName = 'Sharepoint Enterprise Server'
SELECT TOP 1 @provider_id = ProviderId + 1 From [dbo].[Providers] ORDER BY ProviderID DESC
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery])
VALUES (@provider_id, @group_id, N'HostedSharePoint2013Ent', N'Hosted SharePoint Enterprise 2013', N'WebsitePanel.Providers.HostedSolution.HostedSharePointServer2013Ent, WebsitePanel.Providers.HostedSolution.SharePoint2013Ent', N'HostedSharePoint30', NULL)
END
GO
UPDATE [dbo].[Quotas] SET QuotaName = 'HostedSharePointEnterprise.Sites' WHERE QuotaId = 550
GO
UPDATE [dbo].[Quotas] SET QuotaName = 'HostedSharePointEnterprise.MaxStorage' WHERE QuotaId = 551
GO
UPDATE [dbo].[Quotas] SET QuotaName = 'HostedSharePointEnterprise.UseSharedSSL' WHERE QuotaId = 552
GO
UPDATE [dbo].[ServiceItemTypes] SET DisplayName = 'SharePointEnterpriseSiteCollection' WHERE DisplayName = 'SharePointSiteCollection'
GO
IF EXISTS (SELECT * FROM Providers WHERE ProviderName = 'HostedSharePoint2013' AND GroupID IN (Select GroupID FROM ResourceGroups WHERE GroupName = 'Sharepoint Enterprise Server'))
BEGIN
DECLARE @group_id INT
SELECT @group_id = GroupId FROM ResourceGroups WHERE GroupName = 'Sharepoint Enterprise Server'
DELETE FROM Providers WHERE ProviderName = 'HostedSharePoint2013' AND GroupID = @group_id
END
GO
ALTER PROCEDURE [dbo].[AddServiceItem]
(
@ActorID int,
@PackageID int,
@ServiceID int,
@ItemName nvarchar(500),
@ItemTypeName nvarchar(200),
@ItemID int OUTPUT,
@XmlProperties ntext,
@CreatedDate datetime
)
AS
BEGIN TRAN
-- check rights
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
RAISERROR('You are not allowed to access this package', 16, 1)
-- get GroupID
DECLARE @GroupID int
SELECT
@GroupID = PROV.GroupID
FROM Services AS S
INNER JOIN Providers AS PROV ON S.ProviderID = PROV.ProviderID
WHERE S.ServiceID = @ServiceID
DECLARE @ItemTypeID int
SELECT @ItemTypeID = ItemTypeID FROM ServiceItemTypes
WHERE TypeName = @ItemTypeName
AND ((@GroupID IS NULL) OR (@GroupID IS NOT NULL AND GroupID = @GroupID))
-- Fix to allow plans assigned to serveradmin
IF (@ItemTypeName = 'WebsitePanel.Providers.HostedSolution.Organization, WebsitePanel.Providers.Base')
BEGIN
IF NOT EXISTS (SELECT * FROM ServiceItems WHERE PackageID = 1)
BEGIN
INSERT INTO ServiceItems (PackageID, ItemTypeID,ServiceID,ItemName,CreatedDate)
VALUES(1, @ItemTypeID, @ServiceID, 'System', @CreatedDate)
DECLARE @TempItemID int
SET @TempItemID = SCOPE_IDENTITY()
INSERT INTO ExchangeOrganizations (ItemID, OrganizationID)
VALUES(@TempItemID, 'System')
END
END
-- add item
INSERT INTO ServiceItems
(
PackageID,
ServiceID,
ItemName,
ItemTypeID,
CreatedDate
)
VALUES
(
@PackageID,
@ServiceID,
@ItemName,
@ItemTypeID,
@CreatedDate
)
SET @ItemID = SCOPE_IDENTITY()
DECLARE @idoc int
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @idoc OUTPUT, @XmlProperties
-- Execute a SELECT statement that uses the OPENXML rowset provider.
DELETE FROM ServiceItemProperties
WHERE ItemID = @ItemID
CREATE TABLE #TempTable(
ItemID int,
PropertyName nvarchar(50),
PropertyValue nvarchar(3000))
INSERT INTO #TempTable (ItemID, PropertyName, PropertyValue)
SELECT
@ItemID,
PropertyName,
PropertyValue
FROM OPENXML(@idoc, '/properties/property',1) WITH
(
PropertyName nvarchar(50) '@name',
PropertyValue nvarchar(3000) '@value'
) as PV
-- Move data from temp table to real table
INSERT INTO ServiceItemProperties
(
ItemID,
PropertyName,
PropertyValue
)
SELECT
ItemID,
PropertyName,
PropertyValue
FROM #TempTable
DROP TABLE #TempTable
-- remove document
exec sp_xml_removedocument @idoc
COMMIT TRAN
RETURN
GO
UPDATE [dbo].[ServiceItemTypes] SET TypeName ='WebsitePanel.Providers.SharePoint.SharePointEnterpriseSiteCollection, WebsitePanel.Providers.Base' WHERE DisplayName = 'SharePointEnterpriseSiteCollection'
GO
-- USER PASSWORD EXPIRATION NOTIFICATION tasks
@ -9998,4 +10331,4 @@ GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
GO

View file

@ -65,21 +65,6 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WebsitePanel.EnterpriseServer">
<HintPath>..\..\WebsitePanel.EnterpriseServer\bin\WebsitePanel.EnterpriseServer.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.EnterpriseServer.Base">
<HintPath>..\..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.EnterpriseServer.Client">
<HintPath>..\..\..\Bin\WebsitePanel.EnterpriseServer.Client.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.EnterpriseServer.Code">
<HintPath>..\..\..\Bin\WebsitePanel.EnterpriseServer.Code.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.Providers.Base">
<HintPath>..\..\..\Bin\WebsitePanel.Providers.Base.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\VersionInfo.cs">
@ -216,6 +201,28 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\WebsitePanel.EnterpriseServer.Base\WebsitePanel.EnterpriseServer.Base.csproj">
<Project>{c09ce910-f16b-48a1-b2cc-c99b8c1cf775}</Project>
<Name>WebsitePanel.EnterpriseServer.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\WebsitePanel.EnterpriseServer.Client\WebsitePanel.EnterpriseServer.Client.csproj">
<Project>{4b344644-a570-477e-adcc-f2b267d6c038}</Project>
<Name>WebsitePanel.EnterpriseServer.Client</Name>
</ProjectReference>
<ProjectReference Include="..\..\WebsitePanel.EnterpriseServer.Code\WebsitePanel.EnterpriseServer.Code.csproj">
<Project>{60e39314-659c-4fad-ab91-d0d08e223578}</Project>
<Name>WebsitePanel.EnterpriseServer.Code</Name>
</ProjectReference>
<ProjectReference Include="..\..\WebsitePanel.EnterpriseServer\WebsitePanel.EnterpriseServer.csproj">
<Project>{59c7623a-5181-48a5-880a-c9b82b48f589}</Project>
<Name>WebsitePanel.EnterpriseServer</Name>
</ProjectReference>
<ProjectReference Include="..\..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -44,6 +44,7 @@ namespace WebsitePanel.EnterpriseServer
public const string EXCHANGE_SERVER = "ExchangeServer";
public const string HOSTED_SOLLUTION = "HostedSollution";
public const string VIRTUAL_PRIVATE_SERVERS = "VirtualPrivateServers";
public const string VIRTUAL_PRIVATE_SERVERS_2012 = "VirtualPrivateServers2012";
public const string VIRTUAL_PRIVATE_SERVERS_FOR_PRIVATE_CLOUD = "VirtualPrivateServersForPrivateCloud";
public int PackageId;

View file

@ -154,6 +154,9 @@ order by rg.groupOrder
public const string HOSTED_SHAREPOINT_SITES = "HostedSharePoint.Sites"; // Hosted SharePoint Sites
public const string HOSTED_SHAREPOINT_STORAGE_SIZE = "HostedSharePoint.MaxStorage"; // Hosted SharePoint storage size;
public const string HOSTED_SHAREPOINT_USESHAREDSSL = "HostedSharePoint.UseSharedSSL"; // Hosted SharePoint Use Shared SSL Root
public const string HOSTED_SHAREPOINT_ENTERPRISE_SITES = "HostedSharePointEnterprise.Sites"; // Hosted SharePoint Sites
public const string HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE = "HostedSharePointEnterprise.MaxStorage"; // Hosted SharePoint storage size;
public const string HOSTED_SHAREPOINT_ENTERPRISE_USESHAREDSSL = "HostedSharePointEnterprise.UseSharedSSL"; // Hosted SharePoint Use Shared SSL Root
public const string DNS_EDITOR = "DNS.Editor"; // DNS Editor
public const string DNS_ZONES = "DNS.Zones"; // DNS Editor
public const string DNS_PRIMARY_ZONES = "DNS.PrimaryZones"; // DNS Editor
@ -201,6 +204,26 @@ order by rg.groupOrder
public const string VPS_REINSTALL_ALLOWED = "VPS.ReinstallAllowed"; // Allow user to Re-install VPS
public const string VPS_BANDWIDTH = "VPS.Bandwidth"; // Monthly bandwidth, GB
public const string VPS2012_SERVERS_NUMBER = "VPS2012.ServersNumber"; // Number of VPS
public const string VPS2012_MANAGING_ALLOWED = "VPS2012.ManagingAllowed"; // Allow user to create VPS
public const string VPS2012_CPU_NUMBER = "VPS2012.CpuNumber"; // Number of CPU cores
public const string VPS2012_BOOT_CD_ALLOWED = "VPS2012.BootCdAllowed"; // Boot from CD allowed
public const string VPS2012_BOOT_CD_ENABLED = "VPS2012.BootCdEnabled"; // Boot from CD
public const string VPS2012_RAM = "VPS2012.Ram"; // RAM size, MB
public const string VPS2012_HDD = "VPS2012.Hdd"; // Hard Drive size, GB
public const string VPS2012_DVD_ENABLED = "VPS2012.DvdEnabled"; // DVD drive
public const string VPS2012_EXTERNAL_NETWORK_ENABLED = "VPS2012.ExternalNetworkEnabled"; // External Network
public const string VPS2012_EXTERNAL_IP_ADDRESSES_NUMBER = "VPS2012.ExternalIPAddressesNumber"; // Number of External IP addresses
public const string VPS2012_PRIVATE_NETWORK_ENABLED = "VPS2012.PrivateNetworkEnabled"; // Private Network
public const string VPS2012_PRIVATE_IP_ADDRESSES_NUMBER = "VPS2012.PrivateIPAddressesNumber"; // Number of Private IP addresses per VPS
public const string VPS2012_SNAPSHOTS_NUMBER = "VPS2012.SnapshotsNumber"; // Number of Snaphots
public const string VPS2012_START_SHUTDOWN_ALLOWED = "VPS2012.StartShutdownAllowed"; // Allow user to Start, Turn off and Shutdown VPS
public const string VPS2012_PAUSE_RESUME_ALLOWED = "VPS2012.PauseResumeAllowed"; // Allow user to Pause, Resume VPS
public const string VPS2012_REBOOT_ALLOWED = "VPS2012.RebootAllowed"; // Allow user to Reboot VPS
public const string VPS2012_RESET_ALOWED = "VPS2012.ResetAlowed"; // Allow user to Reset VPS
public const string VPS2012_REINSTALL_ALLOWED = "VPS2012.ReinstallAllowed"; // Allow user to Re-install VPS
public const string VPS2012_BANDWIDTH = "VPS2012.Bandwidth"; // Monthly bandwidth, GB
public const string VPSForPC_SERVERS_NUMBER = "VPSForPC.ServersNumber"; // Number of VPS
public const string VPSForPC_MANAGING_ALLOWED = "VPSForPC.ManagingAllowed"; // Allow user to create VPS
public const string VPSForPC_CPU_NUMBER = "VPSForPC.CpuNumber"; // Number of CPU cores

View file

@ -45,12 +45,14 @@ namespace WebsitePanel.EnterpriseServer
public const string Statistics = "Statistics";
public const string SharePoint = "SharePoint";
public const string SharepointFoundationServer = "Sharepoint Foundation Server";
public const string SharepointEnterpriseServer = "Sharepoint Enterprise Server";
public const string SharepointServer = "Sharepoint Server";
public const string Exchange = "Exchange";
public const string HostedOrganizations = "Hosted Organizations";
public const string HostedCRM = "Hosted CRM"; // CRM 4/2011
public const string HostedCRM2013 = "Hosted CRM2013"; // CRM 2013/2015
public const string VPS = "VPS";
public const string VPS2012 = "VPS2012";
public const string BlackBerry = "BlackBerry";
public const string OCS = "OCS";
public const string VPSForPC = "VPSForPC";

View file

@ -39,6 +39,7 @@
public const string QUOTA_EXCEEDED_CPU = "VPS_QUOTA_EXCEEDED_CPU";
public const string QUOTA_EXCEEDED_RAM = "VPS_QUOTA_EXCEEDED_RAM";
public const string QUOTA_WRONG_RAM = "VPS_QUOTA_WRONG_RAM";
public const string QUOTA_NOT_IN_DYNAMIC_RAM = "VPS_QUOTA_NOT_IN_DYNAMIC_RAM";
public const string QUOTA_EXCEEDED_HDD = "VPS_QUOTA_EXCEEDED_HDD";
public const string QUOTA_WRONG_HDD = "VPS_QUOTA_WRONG_HDD";
public const string QUOTA_EXCEEDED_SNAPSHOTS = "VPS_QUOTA_EXCEEDED_SNAPSHOTS";

View file

@ -39,7 +39,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\</OutputPath>
<OutputPath>..\WebsitePanel.EnterpriseServer\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -49,7 +49,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Bin\</OutputPath>
<OutputPath>..\WebsitePanel.EnterpriseServer\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View file

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

View file

@ -1,7 +1,35 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.7905
// Runtime Version:2.0.50727.8009
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -22,6 +50,7 @@ namespace WebsitePanel.EnterpriseServer {
using WebsitePanel.Providers;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
@ -112,7 +141,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) {
public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] {
packageId,
organizationId,
@ -120,13 +149,12 @@ namespace WebsitePanel.EnterpriseServer {
filterValue,
sortColumn,
startRow,
maximumRows,
groupName});
maximumRows});
return ((SharePointSiteCollectionListPaged)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, System.AsyncCallback callback, object asyncState) {
public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollectionsPaged", new object[] {
packageId,
organizationId,
@ -134,8 +162,7 @@ namespace WebsitePanel.EnterpriseServer {
filterValue,
sortColumn,
startRow,
maximumRows,
groupName}, callback, asyncState);
maximumRows}, callback, asyncState);
}
/// <remarks/>
@ -145,12 +172,12 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) {
this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, groupName, null);
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null);
}
/// <remarks/>
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, object userState) {
public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) {
if ((this.GetSiteCollectionsPagedOperationCompleted == null)) {
this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted);
}
@ -161,8 +188,7 @@ namespace WebsitePanel.EnterpriseServer {
filterValue,
sortColumn,
startRow,
maximumRows,
groupName}, this.GetSiteCollectionsPagedOperationCompleted, userState);
maximumRows}, this.GetSiteCollectionsPagedOperationCompleted, userState);
}
private void OnGetSiteCollectionsPagedOperationCompleted(object arg) {
@ -215,20 +241,18 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive, string groupName) {
public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive) {
object[] results = this.Invoke("GetSiteCollections", new object[] {
packageId,
recursive,
groupName});
recursive});
return ((SharePointSiteCollection[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, string groupName, System.AsyncCallback callback, object asyncState) {
public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSiteCollections", new object[] {
packageId,
recursive,
groupName}, callback, asyncState);
recursive}, callback, asyncState);
}
/// <remarks/>
@ -238,19 +262,18 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName) {
this.GetSiteCollectionsAsync(packageId, recursive, groupName, null);
public void GetSiteCollectionsAsync(int packageId, bool recursive) {
this.GetSiteCollectionsAsync(packageId, recursive, null);
}
/// <remarks/>
public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName, object userState) {
public void GetSiteCollectionsAsync(int packageId, bool recursive, object userState) {
if ((this.GetSiteCollectionsOperationCompleted == null)) {
this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted);
}
this.InvokeAsync("GetSiteCollections", new object[] {
packageId,
recursive,
groupName}, this.GetSiteCollectionsOperationCompleted, userState);
recursive}, this.GetSiteCollectionsOperationCompleted, userState);
}
private void OnGetSiteCollectionsOperationCompleted(object arg) {
@ -397,18 +420,16 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddSiteCollection(SharePointSiteCollection item, string groupName) {
public int AddSiteCollection(SharePointSiteCollection item) {
object[] results = this.Invoke("AddSiteCollection", new object[] {
item,
groupName});
item});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, string groupName, System.AsyncCallback callback, object asyncState) {
public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddSiteCollection", new object[] {
item,
groupName}, callback, asyncState);
item}, callback, asyncState);
}
/// <remarks/>
@ -418,18 +439,17 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName) {
this.AddSiteCollectionAsync(item, groupName, null);
public void AddSiteCollectionAsync(SharePointSiteCollection item) {
this.AddSiteCollectionAsync(item, null);
}
/// <remarks/>
public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName, object userState) {
public void AddSiteCollectionAsync(SharePointSiteCollection item, object userState) {
if ((this.AddSiteCollectionOperationCompleted == null)) {
this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted);
}
this.InvokeAsync("AddSiteCollection", new object[] {
item,
groupName}, this.AddSiteCollectionOperationCompleted, userState);
item}, this.AddSiteCollectionOperationCompleted, userState);
}
private void OnAddSiteCollectionOperationCompleted(object arg) {

View file

@ -20,8 +20,8 @@ namespace WebsitePanel.EnterpriseServer {
using System.Diagnostics;
using WebsitePanel.Providers.RemoteDesktopServices;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.EnterpriseServer.Base.RDS;
using WebsitePanel.Providers.HostedSolution;
/// <remarks/>
@ -137,6 +137,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback UpdateRdsServerSettingsOperationCompleted;
private System.Threading.SendOrPostCallback ShadowSessionOperationCompleted;
/// <remarks/>
public esRemoteDesktopServices() {
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
@ -301,6 +303,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event UpdateRdsServerSettingsCompletedEventHandler UpdateRdsServerSettingsCompleted;
/// <remarks/>
public event ShadowSessionCompletedEventHandler ShadowSessionCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollection GetRdsCollection(int collectionId) {
@ -2671,6 +2676,53 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ShadowSession", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject ShadowSession(int itemId, string sessionId, bool control) {
object[] results = this.Invoke("ShadowSession", new object[] {
itemId,
sessionId,
control});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginShadowSession(int itemId, string sessionId, bool control, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ShadowSession", new object[] {
itemId,
sessionId,
control}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndShadowSession(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void ShadowSessionAsync(int itemId, string sessionId, bool control) {
this.ShadowSessionAsync(itemId, sessionId, control, null);
}
/// <remarks/>
public void ShadowSessionAsync(int itemId, string sessionId, bool control, object userState) {
if ((this.ShadowSessionOperationCompleted == null)) {
this.ShadowSessionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShadowSessionOperationCompleted);
}
this.InvokeAsync("ShadowSession", new object[] {
itemId,
sessionId,
control}, this.ShadowSessionOperationCompleted, userState);
}
private void OnShadowSessionOperationCompleted(object arg) {
if ((this.ShadowSessionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ShadowSessionCompleted(this, new ShadowSessionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@ -4054,4 +4106,30 @@ namespace WebsitePanel.EnterpriseServer {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ShadowSessionCompletedEventHandler(object sender, ShadowSessionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ShadowSessionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal ShadowSessionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
}

View file

@ -89,8 +89,10 @@
<SubType>code</SubType>
</Compile>
<Compile Include="HeliconZooProxy.cs" />
<Compile Include="HostedSharePointServersEntProxy.cs" />
<Compile Include="LyncProxy.cs" />
<Compile Include="RemoteDesktopServicesProxy.cs" />
<Compile Include="VirtualizationServerProxy2012.cs" />
<Compile Include="VirtualizationServerProxyForPrivateCloud.cs" />
<Compile Include="CRMProxy.cs" />
<Compile Include="DatabaseServersProxy.cs" />

View file

@ -100,6 +100,19 @@ namespace WebsitePanel.EnterpriseServer
svals[i] = ivals[i].ToString();
s = String.Join(";", svals);
}
// when property is custom class with Persistent attribute
else if (prop.PropertyType.GetCustomAttributes(typeof(PersistentAttribute), false).Length > 0)
{
// add sub-class properties to hash
var childHash = GetObjectProperties(val, persistentOnly);
foreach (var hashKey in childHash.Keys)
{
var value = childHash[hashKey];
hash.Add(prop.Name + "." + hashKey, value);
}
// exit
continue;
}
else
s = val.ToString();
}
@ -478,6 +491,41 @@ namespace WebsitePanel.EnterpriseServer
}
}
private static Hashtable GetPropertiesForCache(Type type, bool persistentOnly)
{
// create properties cache
var props = new Hashtable();
PropertyInfo[] objProps = type.GetProperties(BindingFlags.Instance
//| BindingFlags.DeclaredOnly
| BindingFlags.Public);
foreach (PropertyInfo prop in objProps)
{
// check for persistent attribute
object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false);
if (!persistentOnly || (persistentOnly && attrs.Length > 0) && !props.ContainsKey(prop.Name))
{
// when property is custom class with Persistent attribute
if (prop.PropertyType.GetCustomAttributes(typeof (PersistentAttribute), false).Length > 0)
{
// add sub-class properties to hash
var childHash = GetPropertiesForCache(prop.PropertyType, persistentOnly);
foreach (var hashKey in childHash.Keys)
{
var value = childHash[hashKey];
props.Add(prop.Name + "." + hashKey, value);
}
// exit
continue;
}
// add property to hash
props.Add(prop.Name, prop);
}
}
return props;
}
public static void CreateObjectFromHash(object obj, Hashtable propValues, bool persistentOnly)
{
Type type = obj.GetType();
@ -491,21 +539,7 @@ namespace WebsitePanel.EnterpriseServer
}
else
{
// create properties cache
props = new Hashtable();
PropertyInfo[] objProps = type.GetProperties(BindingFlags.Instance
//| BindingFlags.DeclaredOnly
| BindingFlags.Public);
foreach (PropertyInfo prop in objProps)
{
// check for persistent attribute
object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false);
if (!persistentOnly || (persistentOnly && attrs.Length > 0) && !props.ContainsKey(prop.Name))
{
// add property to hash
props.Add(prop.Name, prop);
}
}
props = GetPropertiesForCache(type, persistentOnly);
if (!propertiesCache.ContainsKey(type.Name))
{
@ -520,38 +554,63 @@ namespace WebsitePanel.EnterpriseServer
// try to locate specified property
if (props[propName] != null)
{
PropertyInfo prop = (PropertyInfo)props[propName];
string val = propValues[propName].ToString();
var currentObj = obj;
// when property is custom class with Persistent attribute
if (propName.Contains("."))
{
var mainPropertyName = propName.Split('.')[0];
var childPropertyName = propName.Split('.')[1];
var mainProperty = type.GetProperty(mainPropertyName);
if (mainProperty == null) continue;
var mainVal = mainProperty.GetValue(obj, null);
if (mainVal == null)
{
mainVal = Activator.CreateInstance(mainProperty.PropertyType);
mainProperty.SetValue(obj, mainVal, null);
}
currentObj = mainVal;
var childProperty = mainProperty.PropertyType.GetProperty(childPropertyName);
if (childProperty == null) continue;
prop = childProperty;
}
// set property
// we support:
// String
// Int32
// Boolean
// Float
PropertyInfo prop = (PropertyInfo)props[propName];
string val = propValues[propName].ToString();
if (prop.PropertyType == typeof(String))
prop.SetValue(obj, val, null);
prop.SetValue(currentObj, val, null);
else if (prop.PropertyType == typeof(Int32))
prop.SetValue(obj, Int32.Parse(val), null);
prop.SetValue(currentObj, Int32.Parse(val), null);
else
if (prop.PropertyType == typeof(long))
prop.SetValue(obj, long.Parse(val), null);
prop.SetValue(currentObj, long.Parse(val), null);
else
if (prop.PropertyType == typeof(Boolean))
prop.SetValue(obj, Boolean.Parse(val), null);
prop.SetValue(currentObj, Boolean.Parse(val), null);
else if (prop.PropertyType == typeof(Single))
prop.SetValue(obj, Single.Parse(val), null);
prop.SetValue(currentObj, Single.Parse(val), null);
else if (prop.PropertyType.IsEnum)
prop.SetValue(obj, Enum.Parse(prop.PropertyType, val, true), null);
prop.SetValue(currentObj, Enum.Parse(prop.PropertyType, val, true), null);
else
if (prop.PropertyType == typeof(Guid))
prop.SetValue(obj, new Guid(val), null);
prop.SetValue(currentObj, new Guid(val), null);
else
if (prop.PropertyType == typeof(string[]))
{
if (val == "")
prop.SetValue(obj, new string[0], null);
prop.SetValue(currentObj, new string[0], null);
else
prop.SetValue(obj, val.Split(';'), null);
prop.SetValue(currentObj, val.Split(';'), null);
}
else if (prop.PropertyType == typeof(int[]))
{
@ -564,7 +623,7 @@ namespace WebsitePanel.EnterpriseServer
if (val == "")
ivals = new int[0];
prop.SetValue(obj, ivals, null);
prop.SetValue(currentObj, ivals, null);
}
}
}

View file

@ -3540,6 +3540,21 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Recursive", recursive));
return reader;
}
public static IDataReader GetVirtualMachinesPaged2012(int actorId, int packageId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows, bool recursive)
{
IDataReader reader = SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure,
"GetVirtualMachinesPaged2012",
new SqlParameter("@ActorID", actorId),
new SqlParameter("@PackageID", packageId),
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
new SqlParameter("@StartRow", startRow),
new SqlParameter("@MaximumRows", maximumRows),
new SqlParameter("@Recursive", recursive));
return reader;
}
#endregion
public static IDataReader GetVirtualMachinesForPCPaged(int actorId, int packageId, string filterColumn, string filterValue,

View file

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

View file

@ -383,6 +383,13 @@ namespace WebsitePanel.EnterpriseServer
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE] != null)
org.WarningSharePointStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE].QuotaAllocatedValue;
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE] != null)
org.MaxSharePointEnterpriseStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE].QuotaAllocatedValue;
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE] != null)
org.WarningSharePointEnterpriseStorage = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_STORAGE_SIZE].QuotaAllocatedValue;
//add organization to package items
itemId = AddOrganizationToPackageItems(org, serviceId, packageId, organizationName, organizationId, domainName);
@ -670,6 +677,16 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.WriteError(ex);
}
try
{
HostedSharePointServerEntController.DeleteSiteCollections(itemId);
}
catch (Exception ex)
{
successful = false;
TaskManager.WriteError(ex);
}
if (org.IsOCSOrganization)
{
DeleteOCSUsers(itemId, ref successful);
@ -939,7 +956,9 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedUsers = 5;
stats.AllocatedUsers = 10;
stats.CreatedSharePointSiteCollections = 1;
stats.CreatedSharePointEnterpriseSiteCollections = 1;
stats.AllocatedSharePointSiteCollections = 5;
stats.AllocatedSharePointEnterpriseSiteCollections = 5;
return stats;
}
#endregion
@ -971,6 +990,13 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedSharePointSiteCollections = sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointEnterpriseSiteCollectionListPaged sharePointStats = HostedSharePointServerEntController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointEnterpriseSiteCollections = sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
{
stats.CreatedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL).Value;
@ -1050,8 +1076,15 @@ namespace WebsitePanel.EnterpriseServer
{
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointEnterpriseSiteCollectionListPaged sharePointStats = HostedSharePointServerEntController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointEnterpriseSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
{
stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty, CRMUserLycenseTypes.FULL ).Value;
@ -1119,6 +1152,11 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedSharePointSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_SITES].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
stats.AllocatedSharePointEnterpriseSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_ENTERPRISE_SITES].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
{
stats.AllocatedCRMUsers = cntx.Quotas[Quotas.CRM_USERS].QuotaAllocatedValue;

View file

@ -116,6 +116,21 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
}
}
if (report.SharePointEnterpriseReport != null)
{
List<SharePointEnterpriseStatistics> sharePoints =
report.SharePointEnterpriseReport.Items.FindAll(
delegate(SharePointEnterpriseStatistics stats) { return stats.OrganizationID == org.OrganizationId; });
item.TotalSharePointEnterpriseSiteCollections = sharePoints.Count;
foreach (SharePointEnterpriseStatistics current in sharePoints)
{
item.TotalSharePointEnterpriseSiteCollectionsSize += current.SiteCollectionSize;
}
}
if (report.CRMReport != null)
{
List<CRMOrganizationStatistics> crmOrganizationStatistics =
@ -158,6 +173,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointFoundationServer);
}
private static HostedSharePointServerEnt GetHostedSharePointServerEnt(int serviceId)
{
HostedSharePointServerEnt sps = new HostedSharePointServerEnt();
ServiceProviderProxy.Init(sps, serviceId);
return sps;
}
private static int GetHostedSharePointEntServiceId(int packageId)
{
return PackageController.GetPackageServiceId(packageId, ResourceGroups.SharepointEnterpriseServer);
}
private static void PopulateBaseItem(BaseStatistics stats, Organization org, string topReseller)
{
@ -324,6 +351,21 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
}
}
if (report.SharePointEnterpriseReport != null)
{
try
{
TaskManager.Write("Populate SharePoint Enterprise item ");
PopulateSharePointEnterpriseItem(org, report, topReseller);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
}
}
if (report.LyncReport != null)
{
try
@ -394,6 +436,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
string.Format("Could not get sharepoint server. PackageId: {0}", org.PackageId), ex);
}
foreach (SharePointSiteCollection siteCollection in siteCollections)
{
try
@ -419,6 +462,59 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
}
private static void PopulateSharePointEnterpriseItem(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
{
List<SharePointEnterpriseSiteCollection> siteCollections;
try
{
siteCollections = HostedSharePointServerEntController.GetSiteCollections(org.Id);
}
catch (Exception ex)
{
throw new ApplicationException(string.Format("Could not get site collections. OrgId: {0}", org.Id), ex);
}
if (siteCollections == null || siteCollections.Count == 0)
return;
HostedSharePointServerEnt srvEnt;
try
{
int serviceId = GetHostedSharePointEntServiceId(org.PackageId);
srvEnt = GetHostedSharePointServerEnt(serviceId);
}
catch (Exception ex)
{
throw new ApplicationException(
string.Format("Could not get sharepoint enterprise server. PackageId: {0}", org.PackageId), ex);
}
foreach (SharePointEnterpriseSiteCollection siteCollection in siteCollections)
{
try
{
SharePointEnterpriseStatistics stats = new SharePointEnterpriseStatistics();
PopulateBaseItem(stats, org, topReseller);
stats.SiteCollectionUrl = siteCollection.PhysicalAddress;
stats.SiteCollectionOwner = siteCollection.OwnerName;
stats.SiteCollectionQuota = siteCollection.MaxSiteStorage;
stats.SiteCollectionCreated = siteCollection.CreatedDate;
stats.SiteCollectionSize = srvEnt.Enterprise_GetSiteCollectionSize(siteCollection.PhysicalAddress);
report.SharePointEnterpriseReport.Items.Add(stats);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
}
}
}
private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
{
TaskManager.Write("Exchange Report Items " + org.Name);

View file

@ -488,6 +488,7 @@ namespace WebsitePanel.EnterpriseServer
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql5, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Statistics, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS2012, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
}
}
@ -711,6 +712,11 @@ namespace WebsitePanel.EnterpriseServer
if (Utils.ParseBool(vpsSettings["AutoAssignExternalIP"], true))
ServerController.AllocateMaximumPackageIPAddresses(packageId, ResourceGroups.VPS, IPAddressPool.VpsExternalNetwork);
// allocate "VPS" IP addresses
int vps2012ServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.VPS2012);
StringDictionary vps2012Settings = ServerController.GetServiceSettings(vps2012ServiceId);
if (Utils.ParseBool(vps2012Settings["AutoAssignExternalIP"], true))
ServerController.AllocateMaximumPackageIPAddresses(packageId, ResourceGroups.VPS2012, IPAddressPool.VpsExternalNetwork);
// allocate "VPSForPC" IP addresses
int vpsfcpServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.VPSForPC);
@ -1681,6 +1687,18 @@ namespace WebsitePanel.EnterpriseServer
}
}
// VPS2012
else if (String.Compare(PackageSettings.VIRTUAL_PRIVATE_SERVERS_2012, settingsName, true) == 0)
{
// load Exchange service settings
int vpsServiceId = GetPackageServiceId(packageId, ResourceGroups.VPS2012);
if (vpsServiceId > 0)
{
StringDictionary vpsSettings = ServerController.GetServiceSettings(vpsServiceId);
settings["HostnamePattern"] = vpsSettings["HostnamePattern"];
}
}
//vpforCP
else if (String.Compare(PackageSettings.VIRTUAL_PRIVATE_SERVERS_FOR_PRIVATE_CLOUD, settingsName, true) == 0)
{

View file

@ -331,6 +331,49 @@ namespace WebsitePanel.EnterpriseServer
return UpdateRdsServerSettingsInternal(serverId, settingsName, settings);
}
public static ResultObject ShadowSession(int itemId, string sessionId, bool control)
{
return ShadowSessionInternal(itemId, sessionId, control);
}
private static ResultObject ShadowSessionInternal(int itemId, string sessionId, bool control)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SHADOW_RDS_SESSION");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("SHADOW_RDS_SESSION", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.ShadowSession(sessionId, control);
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_SHADOW_RDS_SESSION", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static RdsServerSettings GetRdsServerSettingsInternal(int serverId, string settingsName)
{
IDataReader reader = DataProvider.GetRdsServerSettings(serverId, settingsName);
@ -363,25 +406,9 @@ namespace WebsitePanel.EnterpriseServer
{
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(serverId));
var rds = GetRemoteDesktopServices(GetRdsServiceId(collection.ItemId));
rds.ApplyGPO(collection.Name, settings);
XmlDocument doc = new XmlDocument();
XmlElement nodeProps = doc.CreateElement("properties");
if (settings != null)
{
foreach (var setting in settings.Settings)
{
XmlElement nodeProp = doc.CreateElement("property");
nodeProp.SetAttribute("name", setting.PropertyName);
nodeProp.SetAttribute("value", setting.PropertyValue);
nodeProp.SetAttribute("applyUsers", setting.ApplyUsers ? "1" : "0");
nodeProp.SetAttribute("applyAdministrators", setting.ApplyAdministrators ? "1" : "0");
nodeProps.AppendChild(nodeProp);
}
}
string xml = nodeProps.OuterXml;
Organization org = OrganizationController.GetOrganization(collection.ItemId);
rds.ApplyGPO(org.OrganizationId, collection.Name, settings);
string xml = GetSettingsXml(settings);
DataProvider.UpdateRdsServerSettings(serverId, settingsName, xml);
@ -748,8 +775,11 @@ namespace WebsitePanel.EnterpriseServer
};
rds.CreateCollection(org.OrganizationId, collection);
rds.ApplyGPO(collection.Name, GetDefaultGpoSettings());
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName);
var defaultGpoSettings = GetDefaultGpoSettings();
rds.ApplyGPO(org.OrganizationId, collection.Name, defaultGpoSettings);
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName);
string xml = GetSettingsXml(defaultGpoSettings);
DataProvider.UpdateRdsServerSettings(collection.Id, string.Format("Collection-{0}-Settings", collection.Id), xml);
collection.Settings.RdsCollectionId = collection.Id;
int settingsId = DataProvider.AddRdsCollectionSettings(collection.Settings);
@ -806,6 +836,7 @@ namespace WebsitePanel.EnterpriseServer
}
rds.AddSessionHostServersToCollection(org.OrganizationId, collection.Name, newServers.ToArray());
rds.MoveSessionHostsToCollectionOU(collection.Servers.ToArray(), collection.Name, org.OrganizationId);
foreach (var server in newServers)
{
@ -2098,7 +2129,52 @@ namespace WebsitePanel.EnterpriseServer
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.RDS_VIEW_WITHOUT_PERMISSION,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.RDS_VIEW_WITHOUT_PERMISSION_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.RDS_VIEW_WITHOUT_PERMISSION_Users])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_Users])
});
settings.Settings.Add(new RdsServerSetting
{
PropertyName = RdsServerSettings.DISABLE_CMD,
PropertyValue = "",
ApplyAdministrators = Convert.ToBoolean(defaultSettings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS]),
ApplyUsers = Convert.ToBoolean(defaultSettings[RdsServerSettings.DISABLE_CMD_USERS])
});
return settings;
}
private static string GetSettingsXml(RdsServerSettings settings)
{
XmlDocument doc = new XmlDocument();
XmlElement nodeProps = doc.CreateElement("properties");
if (settings != null)
{
foreach (var setting in settings.Settings)
{
XmlElement nodeProp = doc.CreateElement("property");
nodeProp.SetAttribute("name", setting.PropertyName);
nodeProp.SetAttribute("value", setting.PropertyValue);
nodeProp.SetAttribute("applyUsers", setting.ApplyUsers ? "1" : "0");
nodeProp.SetAttribute("applyAdministrators", setting.ApplyAdministrators ? "1" : "0");
nodeProps.AppendChild(nodeProp);
}
}
return nodeProps.OuterXml;
}
}
}

View file

@ -179,6 +179,20 @@ namespace WebsitePanel.EnterpriseServer
}
}
}
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointSiteDiskSpace[] sharePointSiteDiskSpaces =
HostedSharePointServerEntController.CalculateSharePointSitesDiskSpace(org.Id, out res);
if (res == 0)
{
foreach (SharePointSiteDiskSpace currecnt in sharePointSiteDiskSpaces)
{
size += currecnt.DiskSpace;
}
}
}
ServiceProviderItemDiskSpace tmp = new ServiceProviderItemDiskSpace();
tmp.ItemId = item.Id;
tmp.DiskSpace = size;

View file

@ -1481,6 +1481,10 @@ namespace WebsitePanel.EnterpriseServer
{
return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER;
}
else if (String.Compare(groupName, ResourceGroups.VPS2012, true) == 0)
{
return Quotas.VPS2012_EXTERNAL_IP_ADDRESSES_NUMBER;
}
else if (String.Compare(groupName, ResourceGroups.VPSForPC, true) == 0)
{
return Quotas.VPSForPC_EXTERNAL_IP_ADDRESSES_NUMBER;
@ -1840,6 +1844,7 @@ namespace WebsitePanel.EnterpriseServer
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql5, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Statistics, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS2012, domain, "");
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
}
@ -2403,6 +2408,7 @@ namespace WebsitePanel.EnterpriseServer
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MySql5, domain, "");
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Statistics, domain, "");
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.VPS, domain, "");
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.VPS2012, domain, "");
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.VPSForPC, domain, "");
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Dns, domain, "");
break;

View file

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

View file

@ -612,6 +612,7 @@ namespace WebsitePanel.EnterpriseServer
#region Setup External network
TaskManager.Write("VPS_CREATE_SETUP_EXTERNAL_NETWORK");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
try
{
@ -644,6 +645,7 @@ namespace WebsitePanel.EnterpriseServer
#region Setup Management network
TaskManager.Write("VPS_CREATE_SETUP_MANAGEMENT_NETWORK");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
try
{
@ -704,6 +706,7 @@ namespace WebsitePanel.EnterpriseServer
#region Setup Private network
TaskManager.Write("VPS_CREATE_SETUP_PRIVATE_NETWORK");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
try
{
@ -759,6 +762,7 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.Write("VPS_CREATE_CONVERT_VHD");
TaskManager.Write("VPS_CREATE_CONVERT_SOURCE_VHD", vm.OperatingSystemTemplatePath);
TaskManager.Write("VPS_CREATE_CONVERT_DEST_VHD", vm.VirtualHardDrivePath);
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
try
{
// convert VHD
@ -817,6 +821,7 @@ namespace WebsitePanel.EnterpriseServer
if (vm.HddSize > hddSizeGB)
{
TaskManager.Write("VPS_CREATE_EXPAND_VHD");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
// expand VHD
try
@ -958,6 +963,7 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.Write("VPS_CREATE_CPU_CORES", vm.CpuCores.ToString());
TaskManager.Write("VPS_CREATE_RAM_SIZE", vm.RamSize.ToString());
TaskManager.Write("VPS_CREATE_CREATE_VM");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
// create virtual machine
try
{
@ -1031,6 +1037,7 @@ namespace WebsitePanel.EnterpriseServer
#region Start VPS
TaskManager.Write("VPS_CREATE_START_VPS");
TaskManager.IndicatorCurrent = -1; // Some providers (for example HyperV2012R2) could not provide progress
try
{

View file

@ -0,0 +1,85 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Web;
using System.Threading;
using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.EnterpriseServer
{
public class CreateServerAsyncWorker2012
{
#region Properties
public int ThreadUserId { get; set; }
public string TaskId { get; set; }
public VirtualMachine Item { get; set; }
public LibraryItem OsTemplate { get; set; }
public int ExternalAddressesNumber { get; set; }
public bool RandomExternalAddresses { get; set; }
public int[] ExternalAddresses { get; set; }
public int PrivateAddressesNumber { get; set; }
public bool RandomPrivateAddresses { get; set; }
public string[] PrivateAddresses { get; set; }
public string SummaryLetterEmail { get; set; }
#endregion
public CreateServerAsyncWorker2012()
{
ThreadUserId = -1; // admin
}
#region Create
public void CreateAsync()
{
// start asynchronously
Thread t = new Thread(new ThreadStart(Create));
t.Start();
}
private void Create()
{
// impersonate thread
if (ThreadUserId != -1)
SecurityContext.SetThreadPrincipal(ThreadUserId);
// perform backup
VirtualizationServerController2012.CreateVirtualMachineInternal(TaskId, Item, OsTemplate,
ExternalAddressesNumber, RandomExternalAddresses, ExternalAddresses,
PrivateAddressesNumber, RandomPrivateAddresses, PrivateAddresses,
SummaryLetterEmail);
}
#endregion
}
}

View file

@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\</OutputPath>
<OutputPath>..\WebsitePanel.EnterpriseServer\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -26,7 +26,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Bin\</OutputPath>
<OutputPath>..\WebsitePanel.EnterpriseServer\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -165,6 +165,7 @@
<Compile Include="Scheduling\SchedulerController.cs" />
<Compile Include="Scheduling\SchedulerJob.cs" />
<Compile Include="Servers\ServerController.cs" />
<Compile Include="SharePoint\HostedSharePointServerEntController.cs" />
<Compile Include="SharePoint\HostedSharePointServerController.cs" />
<Compile Include="SharePoint\SharePointServerController.cs" />
<Compile Include="StatisticsServers\StatisticsServerController.cs" />
@ -175,6 +176,8 @@
<Compile Include="Tasks\TaskManager.cs" />
<Compile Include="Users\UserAsyncWorker.cs" />
<Compile Include="Users\UserController.cs" />
<Compile Include="Virtualization2012\CreateServerAsyncWorker2012.cs" />
<Compile Include="Virtualization2012\VirtualizationServerController2012.cs" />
<Compile Include="VirtualizationForPrivateCloud\CreateAsyncVMfromVM.cs" />
<Compile Include="VirtualizationForPrivateCloud\CreateServerAsyncWorkerForPrivateCloud.cs" />
<Compile Include="VirtualizationForPrivateCloud\VirtualizationServerControllerForPrivateCloud.cs" />

View file

@ -68,25 +68,66 @@
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WebsitePanel.EnterpriseServer.Base">
<Reference Include="WebsitePanel.EnterpriseServer.Base, Version=2.1.0.1, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.EnterpriseServer.Code">
<Reference Include="WebsitePanel.EnterpriseServer.Code, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\WebsitePanel.EnterpriseServer.Code.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.Providers.Base">
<Reference Include="WebsitePanel.Providers.Base, Version=2.1.0.1, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\WebsitePanel.Providers.Base.dll</HintPath>
</Reference>
<Reference Include="WebsitePanel.Server.Client, Version=1.2.2.0, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
<Reference Include="WebsitePanel.Server.Client, Version=2.1.0.1, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Bin\WebsitePanel.Server.Client.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="bin\Ionic.Zip.Reduced.dll" />
<Content Include="bin\IPAddressRange.dll" />
<Content Include="bin\Microsoft.Web.Services3.dll" />
<Content Include="bin\WebsitePanel.Common.Utils.dll" />
<Content Include="bin\WebsitePanel.Common.Utils.pdb" />
<Content Include="bin\WebsitePanel.EnterpriseServer.Base.dll" />
<Content Include="bin\WebsitePanel.EnterpriseServer.Base.pdb" />
<Content Include="bin\WebsitePanel.EnterpriseServer.Code.dll" />
<Content Include="bin\WebsitePanel.EnterpriseServer.Code.pdb" />
<Content Include="bin\WebsitePanel.EnterpriseServer.dll" />
<Content Include="bin\WebsitePanel.EnterpriseServer.pdb" />
<Content Include="bin\WebsitePanel.Plugins.2Checkout.dll" />
<Content Include="bin\WebsitePanel.Plugins.2Checkout.pdb" />
<Content Include="bin\WebsitePanel.Plugins.AuthorizeNet.dll" />
<Content Include="bin\WebsitePanel.Plugins.AuthorizeNet.pdb" />
<Content Include="bin\WebsitePanel.Plugins.Enom.dll" />
<Content Include="bin\WebsitePanel.Plugins.Enom.pdb" />
<Content Include="bin\WebsitePanel.Plugins.OfflinePayment.dll" />
<Content Include="bin\WebsitePanel.Plugins.OfflinePayment.pdb" />
<Content Include="bin\WebsitePanel.Plugins.OfflineRegistrar.dll" />
<Content Include="bin\WebsitePanel.Plugins.OfflineRegistrar.pdb" />
<Content Include="bin\WebsitePanel.Plugins.PayPalPro.dll" />
<Content Include="bin\WebsitePanel.Plugins.PayPalPro.pdb" />
<Content Include="bin\WebsitePanel.Plugins.PayPalStandard.dll" />
<Content Include="bin\WebsitePanel.Plugins.PayPalStandard.pdb" />
<Content Include="bin\WebsitePanel.Providers.Base.dll" />
<Content Include="bin\WebsitePanel.Providers.Base.pdb" />
<Content Include="bin\WebsitePanel.SchedulerService.exe" />
<Content Include="bin\WebsitePanel.SchedulerService.pdb" />
<Content Include="bin\WebsitePanel.Server.Client.dll" />
<Content Include="bin\WebsitePanel.Server.Client.pdb" />
<Content Include="bin\WebsitePanel.Templates.dll" />
<Content Include="bin\WebsitePanel.Templates.pdb" />
<Content Include="bin\WebsitePanel.Whois.dll" />
<Content Include="bin\WebsitePanel.Whois.pdb" />
<Content Include="bin\WhoisClient.dll" />
<Content Include="esEnterpriseStorage.asmx" />
<Content Include="esHostedSharePointServersEnt.asmx" />
<Content Include="esRemoteDesktopServices.asmx" />
<Content Include="esHeliconZoo.asmx" />
<Content Include="esLync.asmx" />
<Content Include="esVirtualizationServer2012.asmx" />
<Content Include="esVirtualizationServerForPrivateCloud.asmx" />
<Content Include="Default.aspx" />
<Content Include="ecStorefront.asmx" />
@ -116,9 +157,9 @@
<Content Include="esUsers.asmx" />
<Content Include="esWebServers.asmx" />
<Content Include="Global.asax" />
<Content Include="Web.config">
<None Include="Web.config">
<SubType>Designer</SubType>
</Content>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="..\VersionInfo.cs">
@ -128,6 +169,10 @@
<DependentUpon>esEnterpriseStorage.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="esHostedSharePointServersEnt.asmx.cs">
<DependentUpon>esHostedSharePointServersEnt.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="esRemoteDesktopServices.asmx.cs">
<DependentUpon>esRemoteDesktopServices.asmx</DependentUpon>
<SubType>Component</SubType>
@ -140,6 +185,10 @@
<DependentUpon>esLync.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="esVirtualizationServer2012.asmx.cs">
<DependentUpon>esVirtualizationServer2012.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="esVirtualizationServerForPrivateCloud.asmx.cs">
<DependentUpon>esVirtualizationServerForPrivateCloud.asmx</DependentUpon>
<SubType>Component</SubType>
@ -288,6 +337,12 @@
<Content Include="esWebApplicationGallery.asmx" />
<EmbeddedResource Include="Images\logo.png" />
<Content Include="SystemEventHandlers.config" />
<Content Include="bin\WebsitePanel.EnterpriseServer.dll.config" />
<Content Include="bin\WebsitePanel.SchedulerService.exe.config" />
<None Include="Properties\PublishProfiles\Default Settings %282%29.pubxml" />
<None Include="Properties\PublishProfiles\Default Settings %283%29.pubxml" />
<None Include="Properties\PublishProfiles\Default Settings.pubxml" />
<None Include="Properties\PublishProfiles\Enterprise Server.pubxml" />
<None Include="TaskEventHandlers.config" />
<None Include="WsePolicyCache.Config" />
</ItemGroup>

View file

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

View file

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

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="esHostedSharePointServersEnt.asmx.cs" Class="WebsitePanel.EnterpriseServer.esHostedSharePointServersEnt" %>

View file

@ -0,0 +1,236 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Web.Services;
using WebsitePanel.EnterpriseServer.Code.SharePoint;
using WebsitePanel.Providers.SharePoint;
using Microsoft.Web.Services3;
namespace WebsitePanel.EnterpriseServer
{
/// <summary>
/// Summary description for esHostedSharePointServers
/// </summary>
[WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Policy("ServerPolicy")]
[ToolboxItem(false)]
public class esHostedSharePointServersEnt : WebService
{
/// <summary>
/// Gets site collections in raw form.
/// </summary>
/// <param name="packageId">Package to which desired site collections belong.</param>
/// <param name="organizationId">Organization to which desired site collections belong.</param>
/// <param name="filterColumn">Filter column name.</param>
/// <param name="filterValue">Filter value.</param>
/// <param name="sortColumn">Sort column name.</param>
/// <param name="startRow">Row index to start from.</param>
/// <param name="maximumRows">Maximum number of rows to retrieve.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>Site collections in raw format.</returns>
[WebMethod]
public SharePointEnterpriseSiteCollectionListPaged Enterprise_GetSiteCollectionsPaged(int packageId, int organizationId,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
return HostedSharePointServerEntController.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue,
sortColumn, startRow, maximumRows);
}
/// <summary>
/// Gets list of supported languages by this installation of SharePoint.
/// </summary>
/// <returns>List of supported languages</returns>
[WebMethod]
public int[] Enterprise_GetSupportedLanguages(int packageId)
{
return HostedSharePointServerEntController.GetSupportedLanguages(packageId);
}
/// <summary>
/// Gets list of SharePoint site collections that belong to the package.
/// </summary>
/// <param name="packageId">Package that owns site collections.</param>
/// <param name="recursive">A value which shows whether nested spaces must be searched as well.</param>
/// <param name="groupName">Resource group name.</param>
/// <returns>List of found site collections.</returns>
[WebMethod]
public List<SharePointEnterpriseSiteCollection> Enterprise_GetSiteCollections(int packageId, bool recursive)
{
return HostedSharePointServerEntController.GetSiteCollections(packageId, recursive);
}
[WebMethod]
public int Enterprise_SetStorageSettings(int itemId, int maxStorage, int warningStorage, bool applyToSiteCollections)
{
return HostedSharePointServerEntController.SetStorageSettings(itemId, maxStorage, warningStorage, applyToSiteCollections );
}
/// <summary>
/// Gets SharePoint site collection with given id.
/// </summary>
/// <param name="itemId">Site collection id within metabase.</param>
/// <returns>Site collection.</returns>
[WebMethod]
public SharePointEnterpriseSiteCollection Enterprise_GetSiteCollection(int itemId)
{
return HostedSharePointServerEntController.GetSiteCollection(itemId);
}
/// <summary>
/// Gets SharePoint site collection from package under organization with given domain.
/// </summary>
/// <param name="packageId">Package id.</param>
/// <param name="organizationId">Organization id.</param>
/// <param name="domain">Domain name.</param>
/// <returns>SharePoint site collection or null.</returns>
[WebMethod]
public SharePointEnterpriseSiteCollection Enterprise_GetSiteCollectionByDomain(int organizationId, string domain)
{
DomainInfo domainInfo = ServerController.GetDomain(domain);
SharePointEnterpriseSiteCollectionListPaged existentSiteCollections = this.Enterprise_GetSiteCollectionsPaged(domainInfo.PackageId, organizationId, "ItemName", String.Format("%{0}", domain), String.Empty, 0, Int32.MaxValue);
foreach (SharePointEnterpriseSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
if (existentSiteCollection.Name == String.Format("{0}://{1}", existentSiteCollectionUri.Scheme, domain))
{
return existentSiteCollection;
}
}
return null;
}
/// <summary>
/// Adds SharePoint site collection.
/// </summary>
/// <param name="item">Site collection description.</param>
/// <returns>Created site collection id within metabase.</returns>
[WebMethod]
public int Enterprise_AddSiteCollection(SharePointEnterpriseSiteCollection item)
{
return HostedSharePointServerEntController.AddSiteCollection(item);
}
/// <summary>
/// Deletes SharePoint site collection with given id.
/// </summary>
/// <param name="itemId">Site collection id within metabase.</param>
/// <returns>?</returns>
[WebMethod]
public int Enterprise_DeleteSiteCollection(int itemId)
{
return HostedSharePointServerEntController.DeleteSiteCollection(itemId);
}
/// <summary>
/// Deletes SharePoint site collections which belong to organization.
/// </summary>
/// <param name="organizationId">Site collection id within metabase.</param>
/// <returns>?</returns>
[WebMethod]
public int Enterprise_DeleteSiteCollections(int organizationId)
{
HostedSharePointServerEntController.DeleteSiteCollections(organizationId);
return 0;
}
/// <summary>
/// Backups SharePoint site collection.
/// </summary>
/// <param name="itemId">Site collection id within metabase.</param>
/// <param name="fileName">Backed up site collection file name.</param>
/// <param name="zipBackup">A value which shows whether back up must be archived.</param>
/// <param name="download">A value which shows whether created back up must be downloaded.</param>
/// <param name="folderName">Local folder to store downloaded backup.</param>
/// <returns>Created backup file name. </returns>
[WebMethod]
public string Enterprise_BackupSiteCollection(int itemId, string fileName, bool zipBackup, bool download, string folderName)
{
return HostedSharePointServerEntController.BackupSiteCollection(itemId, fileName, zipBackup, download, folderName);
}
/// <summary>
/// Restores SharePoint site collection.
/// </summary>
/// <param name="itemId">Site collection id within metabase.</param>
/// <param name="uploadedFile"></param>
/// <param name="packageFile"></param>
/// <returns></returns>
[WebMethod]
public int Enterprise_RestoreSiteCollection(int itemId, string uploadedFile, string packageFile)
{
return HostedSharePointServerEntController.RestoreSiteCollection(itemId, uploadedFile, packageFile);
}
/// <summary>
/// Gets binary data chunk of specified size from specified offset.
/// </summary>
/// <param name="itemId">Item id to obtain realted service id.</param>
/// <param name="path">Path to file to get bunary data chunk from.</param>
/// <param name="offset">Offset from which to start data reading.</param>
/// <param name="length">Binary data chunk length.</param>
/// <returns>Binary data chunk read from file.</returns>
[WebMethod]
public byte[] Enterprise_GetBackupBinaryChunk(int itemId, string path, int offset, int length)
{
return HostedSharePointServerEntController.GetBackupBinaryChunk(itemId, path, offset, length);
}
/// <summary>
/// Appends supplied binary data chunk to file.
/// </summary>
/// <param name="itemId">Item id to obtain realted service id.</param>
/// <param name="fileName">Non existent file name to append to.</param>
/// <param name="path">Full path to existent file to append to.</param>
/// <param name="chunk">Binary data chunk to append to.</param>
/// <returns>Path to file that was appended with chunk.</returns>
[WebMethod]
public string Enterprise_AppendBackupBinaryChunk(int itemId, string fileName, string path, byte[] chunk)
{
return HostedSharePointServerEntController.AppendBackupBinaryChunk(itemId, fileName, path, chunk);
}
[WebMethod]
public SharePointSiteDiskSpace[] Enterprise_CalculateSharePointSitesDiskSpace(int itemId, out int errorCode)
{
return HostedSharePointServerEntController.CalculateSharePointSitesDiskSpace(itemId, out errorCode);
}
[WebMethod]
public void Enterprise_UpdateQuota(int itemId, int siteCollectionId, int maxSize, int warningSize)
{
HostedSharePointServerEntController.UpdateQuota(itemId, siteCollectionId, maxSize, warningSize);
}
}
}

View file

@ -380,5 +380,11 @@ namespace WebsitePanel.EnterpriseServer
{
return RemoteDesktopServicesController.UpdateRdsServerSettings(serverId, settingsName, settings);
}
[WebMethod]
public ResultObject ShadowSession(int itemId, string sessionId, bool control)
{
return RemoteDesktopServicesController.ShadowSession(itemId, sessionId, control);
}
}
}

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="esVirtualizationServer2012.asmx.cs" Class="WebsitePanel.EnterpriseServer.esVirtualizationServer2012" %>

View file

@ -0,0 +1,476 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Collections.Generic;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
using Microsoft.Web.Services3;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.EnterpriseServer
{
/// <summary>
/// Summary description for esVirtualizationServer
/// </summary>
[WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Policy("ServerPolicy")]
[ToolboxItem(false)]
public class esVirtualizationServer2012 : System.Web.Services.WebService
{
#region Virtual Machines
[WebMethod]
public VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive)
{
return VirtualizationServerController2012.GetVirtualMachines(packageId,
filterColumn, filterValue, sortColumn, startRow, maximumRows, recursive);
}
[WebMethod]
public VirtualMachine[] GetVirtualMachinesByServiceId(int serviceId)
{
return VirtualizationServerController2012.GetVirtualMachinesByServiceId(serviceId);
}
[WebMethod]
public VirtualMachine GetVirtualMachineItem(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachineByItemId(itemId);
}
[WebMethod]
public string EvaluateVirtualMachineTemplate(int itemId, string template)
{
if (SecurityContext.CheckAccount(DemandAccount.IsActive | DemandAccount.IsAdmin | DemandAccount.NotDemo) != 0)
throw new Exception("This method could be called by serveradmin only.");
return VirtualizationServerController2012.EvaluateVirtualMachineTemplate(itemId, false, false, template);
}
#endregion
#region External Network
[WebMethod]
public NetworkAdapterDetails GetExternalNetworkDetails(int packageId)
{
return VirtualizationServerController2012.GetExternalNetworkDetails(packageId);
}
#endregion
#region Private Network
[WebMethod]
public PrivateIPAddressesPaged GetPackagePrivateIPAddressesPaged(int packageId,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
return VirtualizationServerController2012.GetPackagePrivateIPAddressesPaged(packageId,
filterColumn, filterValue, sortColumn, startRow, maximumRows);
}
[WebMethod]
public List<PrivateIPAddress> GetPackagePrivateIPAddresses(int packageId)
{
return VirtualizationServerController2012.GetPackagePrivateIPAddresses(packageId);
}
[WebMethod]
public NetworkAdapterDetails GetPrivateNetworkDetails(int packageId)
{
return VirtualizationServerController2012.GetPrivateNetworkDetails(packageId);
}
#endregion
#region User Permissions
[WebMethod]
public List<VirtualMachinePermission> GetSpaceUserPermissions(int packageId)
{
return VirtualizationServerController2012.GetSpaceUserPermissions(packageId);
}
[WebMethod]
public int UpdateSpaceUserPermissions(int packageId, VirtualMachinePermission[] permissions)
{
return VirtualizationServerController2012.UpdateSpaceUserPermissions(packageId, permissions);
}
#endregion
#region Audit Log
[WebMethod]
public List<LogRecord> GetSpaceAuditLog(int packageId, DateTime startPeriod, DateTime endPeriod,
int severity, string sortColumn, int startRow, int maximumRows)
{
return VirtualizationServerController2012.GetSpaceAuditLog(packageId, startPeriod, endPeriod,
severity, sortColumn, startRow, maximumRows);
}
[WebMethod]
public List<LogRecord> GetVirtualMachineAuditLog(int itemId, DateTime startPeriod, DateTime endPeriod,
int severity, string sortColumn, int startRow, int maximumRows)
{
return VirtualizationServerController2012.GetVirtualMachineAuditLog(itemId, startPeriod, endPeriod,
severity, sortColumn, startRow, maximumRows);
}
#endregion
#region VPS Create Name & OS
[WebMethod]
public LibraryItem[] GetOperatingSystemTemplates(int packageId)
{
return VirtualizationServerController2012.GetOperatingSystemTemplates(packageId);
}
[WebMethod]
public LibraryItem[] GetOperatingSystemTemplatesByServiceId(int serviceId)
{
return VirtualizationServerController2012.GetOperatingSystemTemplatesByServiceId(serviceId);
}
#endregion
#region VPS Create - Configuration
[WebMethod]
public int GetMaximumCpuCoresNumber(int packageId)
{
return VirtualizationServerController2012.GetMaximumCpuCoresNumber(packageId);
}
[WebMethod]
public string GetDefaultExportPath(int itemId)
{
return VirtualizationServerController2012.GetDefaultExportPath(itemId);
}
#endregion
#region VPS Create
[WebMethod]
public IntResult CreateDefaultVirtualMachine(int packageId,
string hostname, string osTemplate, string password, string summaryLetterEmail)
{
return VirtualizationServerController2012.CreateDefaultVirtualMachine(packageId, hostname, osTemplate, password, summaryLetterEmail);
}
[WebMethod]
public IntResult CreateVirtualMachine(int packageId,
string hostname, string osTemplateFile, string password, string summaryLetterEmail,
int cpuCores, int ramMB, int hddGB, int snapshots, bool dvdInstalled, bool bootFromCD, bool numLock,
bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed,
bool externalNetworkEnabled, int externalAddressesNumber, bool randomExternalAddresses, int[] externalAddresses,
bool privateNetworkEnabled, int privateAddressesNumber, bool randomPrivateAddresses, string[] privateAddresses, VirtualMachine otherSettings)
{
return VirtualizationServerController2012.CreateVirtualMachine(packageId,
hostname, osTemplateFile, password, summaryLetterEmail,
cpuCores, ramMB, hddGB, snapshots, dvdInstalled, bootFromCD, numLock,
startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed,
externalNetworkEnabled, externalAddressesNumber, randomExternalAddresses, externalAddresses,
privateNetworkEnabled, privateAddressesNumber, randomPrivateAddresses, privateAddresses, otherSettings);
}
#endregion
#region VPS - Import
[WebMethod]
public IntResult ImportVirtualMachine(int packageId,
int serviceId, string vmId,
string osTemplateFile, string adminPassword,
bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed,
string externalNicMacAddress, int[] externalAddresses,
string managementNicMacAddress, int managementAddress)
{
return VirtualizationServerController2012.ImportVirtualMachine(packageId,
serviceId, vmId,
osTemplateFile, adminPassword,
startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed,
externalNicMacAddress, externalAddresses,
managementNicMacAddress, managementAddress);
}
#endregion
#region VPS General
[WebMethod]
public byte[] GetVirtualMachineThumbnail(int itemId, ThumbnailSize size)
{
return VirtualizationServerController2012.GetVirtualMachineThumbnail(itemId, size);
}
[WebMethod]
public VirtualMachine GetVirtualMachineGeneralDetails(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachineGeneralDetails(itemId);
}
[WebMethod]
public VirtualMachine GetVirtualMachineExtendedInfo(int serviceId, string vmId)
{
return VirtualizationServerController2012.GetVirtualMachineExtendedInfo(serviceId, vmId);
}
[WebMethod]
public int CancelVirtualMachineJob(string jobId)
{
return VirtualizationServerController2012.CancelVirtualMachineJob(jobId);
}
[WebMethod]
public ResultObject UpdateVirtualMachineHostName(int itemId, string hostname, bool updateNetBIOS)
{
return VirtualizationServerController2012.UpdateVirtualMachineHostName(itemId, hostname, updateNetBIOS);
}
[WebMethod]
public ResultObject ChangeVirtualMachineState(int itemId, VirtualMachineRequestedState state)
{
return VirtualizationServerController2012.ChangeVirtualMachineStateExternal(itemId, state);
}
[WebMethod]
public List<ConcreteJob> GetVirtualMachineJobs(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachineJobs(itemId);
}
#endregion
#region VPS - Configuration
[WebMethod]
public ResultObject ChangeAdministratorPassword(int itemId, string password)
{
return VirtualizationServerController2012.ChangeAdministratorPassword(itemId, password);
}
#endregion
#region VPS Edit Configuration
[WebMethod]
public ResultObject UpdateVirtualMachineConfiguration(int itemId, int cpuCores, int ramMB, int hddGB, int snapshots,
bool dvdInstalled, bool bootFromCD, bool numLock,
bool startShutdownAllowed, bool pauseResumeAllowed, bool rebootAllowed, bool resetAllowed, bool reinstallAllowed,
bool externalNetworkEnabled,
bool privateNetworkEnabled, VirtualMachine otherSettings)
{
return VirtualizationServerController2012.UpdateVirtualMachineConfiguration(
itemId, cpuCores, ramMB, hddGB, snapshots,
dvdInstalled, bootFromCD, numLock,
startShutdownAllowed, pauseResumeAllowed, rebootAllowed, resetAllowed, reinstallAllowed,
externalNetworkEnabled, privateNetworkEnabled,
otherSettings);
}
#endregion
#region DVD
[WebMethod]
public LibraryItem GetInsertedDvdDisk(int itemId)
{
return VirtualizationServerController2012.GetInsertedDvdDisk(itemId);
}
[WebMethod]
public LibraryItem[] GetLibraryDisks(int itemId)
{
return VirtualizationServerController2012.GetLibraryDisks(itemId);
}
[WebMethod]
public ResultObject InsertDvdDisk(int itemId, string isoPath)
{
return VirtualizationServerController2012.InsertDvdDisk(itemId, isoPath);
}
[WebMethod]
public ResultObject EjectDvdDisk(int itemId)
{
return VirtualizationServerController2012.EjectDvdDisk(itemId);
}
#endregion
#region Snaphosts
[WebMethod]
public VirtualMachineSnapshot[] GetVirtualMachineSnapshots(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachineSnapshots(itemId);
}
[WebMethod]
public VirtualMachineSnapshot GetSnapshot(int itemId, string snaphostId)
{
return VirtualizationServerController2012.GetSnapshot(itemId, snaphostId);
}
[WebMethod]
public ResultObject CreateSnapshot(int itemId)
{
return VirtualizationServerController2012.CreateSnapshot(itemId);
}
[WebMethod]
public ResultObject ApplySnapshot(int itemId, string snapshotId)
{
return VirtualizationServerController2012.ApplySnapshot(itemId, snapshotId);
}
[WebMethod]
public ResultObject RenameSnapshot(int itemId, string snapshotId, string newName)
{
return VirtualizationServerController2012.RenameSnapshot(itemId, snapshotId, newName);
}
[WebMethod]
public ResultObject DeleteSnapshot(int itemId, string snapshotId)
{
return VirtualizationServerController2012.DeleteSnapshot(itemId, snapshotId);
}
[WebMethod]
public ResultObject DeleteSnapshotSubtree(int itemId, string snapshotId)
{
return VirtualizationServerController2012.DeleteSnapshotSubtree(itemId, snapshotId);
}
[WebMethod]
public byte[] GetSnapshotThumbnail(int itemId, string snapshotId, ThumbnailSize size)
{
return VirtualizationServerController2012.GetSnapshotThumbnail(itemId, snapshotId, size);
}
#endregion
#region VPS - External Network
[WebMethod]
public NetworkAdapterDetails GetExternalNetworkAdapterDetails(int itemId)
{
return VirtualizationServerController2012.GetExternalNetworkAdapterDetails(itemId);
}
[WebMethod]
public ResultObject AddVirtualMachineExternalIPAddresses(int itemId, bool selectRandom,
int addressesNumber, int[] addressId)
{
return VirtualizationServerController2012.AddVirtualMachineExternalIPAddresses(itemId, selectRandom,
addressesNumber, addressId, true);
}
[WebMethod]
public ResultObject SetVirtualMachinePrimaryExternalIPAddress(int itemId, int addressId)
{
return VirtualizationServerController2012.SetVirtualMachinePrimaryExternalIPAddress(itemId, addressId, true);
}
[WebMethod]
public ResultObject DeleteVirtualMachineExternalIPAddresses(int itemId, int[] addressId)
{
return VirtualizationServerController2012.DeleteVirtualMachineExternalIPAddresses(itemId, addressId, true);
}
#endregion
#region VPS Private Network
[WebMethod]
public NetworkAdapterDetails GetPrivateNetworkAdapterDetails(int itemId)
{
return VirtualizationServerController2012.GetPrivateNetworkAdapterDetails(itemId);
}
[WebMethod]
public ResultObject AddVirtualMachinePrivateIPAddresses(int itemId, bool selectRandom,
int addressesNumber, string[] addresses)
{
return VirtualizationServerController2012.AddVirtualMachinePrivateIPAddresses(itemId, selectRandom,
addressesNumber, addresses, true);
}
[WebMethod]
public ResultObject SetVirtualMachinePrimaryPrivateIPAddress(int itemId, int addressId)
{
return VirtualizationServerController2012.SetVirtualMachinePrimaryPrivateIPAddress(itemId, addressId, true);
}
[WebMethod]
public ResultObject DeleteVirtualMachinePrivateIPAddresses(int itemId, int[] addressId)
{
return VirtualizationServerController2012.DeleteVirtualMachinePrivateIPAddresses(itemId, addressId, true);
}
#endregion
#region Virtual Machine Permissions
[WebMethod]
public List<VirtualMachinePermission> GetVirtualMachinePermissions(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachinePermissions(itemId);
}
[WebMethod]
public int UpdateVirtualMachineUserPermissions(int itemId, VirtualMachinePermission[] permissions)
{
return VirtualizationServerController2012.UpdateVirtualMachineUserPermissions(itemId, permissions);
}
#endregion
#region Virtual Switches
[WebMethod]
public VirtualSwitch[] GetExternalSwitches(int serviceId, string computerName)
{
return VirtualizationServerController2012.GetExternalSwitches(serviceId, computerName);
}
#endregion
#region Tools
[WebMethod]
public ResultObject DeleteVirtualMachine(int itemId, bool saveFiles, bool exportVps, string exportPath)
{
return VirtualizationServerController2012.DeleteVirtualMachine(itemId, saveFiles, exportVps, exportPath);
}
[WebMethod]
public int ReinstallVirtualMachine(int itemId, string adminPassword, bool preserveVirtualDiskFiles,
bool saveVirtualDisk, bool exportVps, string exportPath)
{
return VirtualizationServerController2012.ReinstallVirtualMachine(itemId, adminPassword, preserveVirtualDiskFiles,
saveVirtualDisk, exportVps, exportPath);
}
#endregion
#region Help
[WebMethod]
public string GetVirtualMachineSummaryText(int itemId)
{
return VirtualizationServerController2012.GetVirtualMachineSummaryText(itemId, false, false);
}
[WebMethod]
public ResultObject SendVirtualMachineSummaryLetter(int itemId, string to, string bcc)
{
return VirtualizationServerController2012.SendVirtualMachineSummaryLetter(itemId, to, bcc, false);
}
#endregion
}
}

View file

@ -30,7 +30,7 @@ using System;
namespace WebsitePanel.Providers
{
[AttributeUsage(AttributeTargets.Property)]
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
public class PersistentAttribute : Attribute
{
public PersistentAttribute()

View file

@ -39,6 +39,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
public interface IEnterpriseStorage
{
SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings);
SystemFile[] GetFoldersWithoutFrsm(string organizationId, WebDavSetting[] settings);
SystemFile GetFolder(string organizationId, string folderName, WebDavSetting setting);
void CreateFolder(string organizationId, string folder, WebDavSetting setting);
SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting);

View file

@ -32,6 +32,7 @@
{
public ExchangeStatisticsReport ExchangeReport { get; set; }
public SharePointStatisticsReport SharePointReport { get; set; }
public SharePointEnterpriseStatisticsReport SharePointEnterpriseReport { get; set; }
public CRMStatisticsReport CRMReport { get; set; }
public OrganizationStatisticsReport OrganizationReport { get; set; }
public LyncStatisticsReport LyncReport { get; set; }

View file

@ -61,6 +61,9 @@ namespace WebsitePanel.Providers.HostedSolution
private int maxSharePointStorage;
private int warningSharePointStorage;
private int maxSharePointEnterpriseStorage;
private int warningSharePointEnterpriseStorage;
#endregion
[Persistent]
@ -80,6 +83,20 @@ namespace WebsitePanel.Providers.HostedSolution
set { warningSharePointStorage = value; }
}
[Persistent]
public int MaxSharePointEnterpriseStorage
{
get { return maxSharePointEnterpriseStorage; }
set { maxSharePointEnterpriseStorage = value; }
}
[Persistent]
public int WarningSharePointEnterpriseStorage
{
get { return warningSharePointEnterpriseStorage; }
set { warningSharePointEnterpriseStorage = value; }
}
[Persistent]
public string CrmUrl
{

View file

@ -61,6 +61,9 @@ namespace WebsitePanel.Providers.HostedSolution
private int allocatedSharePointSiteCollections;
private int createdSharePointSiteCollections;
private int allocatedSharePointEnterpriseSiteCollections;
private int createdSharePointEnterpriseSiteCollections;
private int createdCRMUsers;
private int allocatedCRMUsers;
@ -288,6 +291,18 @@ namespace WebsitePanel.Providers.HostedSolution
set { createdSharePointSiteCollections = value; }
}
public int AllocatedSharePointEnterpriseSiteCollections
{
get { return allocatedSharePointEnterpriseSiteCollections; }
set { allocatedSharePointEnterpriseSiteCollections = value; }
}
public int CreatedSharePointEnterpriseSiteCollections
{
get { return createdSharePointEnterpriseSiteCollections; }
set { createdSharePointEnterpriseSiteCollections = value; }
}
public int CreatedBlackBerryUsers { get; set; }
public int AllocatedBlackBerryUsers { get; set; }

View file

@ -60,6 +60,19 @@
set;
}
public int TotalSharePointEnterpriseSiteCollections
{
get;
set;
}
public long TotalSharePointEnterpriseSiteCollectionsSize
{
get;
set;
}
public int TotalCRMUsers
{
get;

View file

@ -0,0 +1,71 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class SharePointEnterpriseStatisticsReport : BaseReport<SharePointEnterpriseStatistics>
{
public override string ToCSV()
{
StringBuilder mainBuilder = new StringBuilder();
AddCSVHeader(mainBuilder);
foreach (SharePointEnterpriseStatistics item in Items)
{
StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionUrl));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionOwner));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionCreated));
sb.AppendFormat("{0},", item.SiteCollectionQuota != 0 && item.SiteCollectionQuota != -1 ? ToCsvString(item.SiteCollectionQuota): "Unlimited");
sb.AppendFormat("{0}", ToCsvString(item.SiteCollectionSize / 1024.0 / 1024.0));
mainBuilder.Append(sb.ToString());
}
return mainBuilder.ToString();
}
private static void AddCSVHeader(StringBuilder sb)
{
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Site Collection URL,Site collection owner,Site collection created,Site collection quota(Mb),Site collection size(Mb)");
}
}
}

View file

@ -0,0 +1,67 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class SharePointEnterpriseStatistics : BaseStatistics
{
public string SiteCollectionUrl
{
get;
set;
}
public string SiteCollectionOwner
{
get;
set;
}
public DateTime SiteCollectionCreated
{
get;
set;
}
public long SiteCollectionQuota
{
get;
set;
}
public long SiteCollectionSize
{
get;
set;
}
}
}

View file

@ -81,6 +81,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
void RemoveRdsServerFromTenantOU(string hostName, string organizationId);
void InstallCertificate(byte[] certificate, string password, List<string> hostNames);
void MoveSessionHostToRdsOU(string hostName);
void ApplyGPO(string collectionName, RdsServerSettings serverSettings);
void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings);
void ShadowSession(string sessionId, bool control);
void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId);
}
}

View file

@ -39,6 +39,15 @@ namespace WebsitePanel.EnterpriseServer.Base.RDS
public const string SCREEN_SAVER_DISABLED_ADMINISTRATORS = "ScreenSaverDisabledAdministrators";
public const string SCREEN_SAVER_DISABLED_USERS = "ScreenSaverDisabledUsers";
public const string DRIVE_SPACE_THRESHOLD_VALUE = "DriveSpaceThresholdValue";
public const string RDS_VIEW_WITHOUT_PERMISSION = "RDSViewWithoutPermission";
public const string RDS_VIEW_WITHOUT_PERMISSION_ADMINISTRATORS = "RDSViewWithoutPermissionAdministrators";
public const string RDS_VIEW_WITHOUT_PERMISSION_Users = "RDSViewWithoutPermissionUsers";
public const string RDS_CONTROL_WITHOUT_PERMISSION = "RDSControlWithoutPermission";
public const string RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS = "RDSControlWithoutPermissionAdministrators";
public const string RDS_CONTROL_WITHOUT_PERMISSION_Users = "RDSControlWithoutPermissionUsers";
public const string DISABLE_CMD = "DisableCMD";
public const string DISABLE_CMD_ADMINISTRATORS = "DisableCMDAdministrators";
public const string DISABLE_CMD_USERS = "DisableCMDUsers";
public string SettingsName { get; set; }
public int ServerId { get; set; }
@ -58,5 +67,21 @@ namespace WebsitePanel.EnterpriseServer.Base.RDS
settings = value;
}
}
public static List<KeyValuePair<string, string>> ScreenSaverTimeOuts
{
get
{
return new List<KeyValuePair<string, string>> {
new KeyValuePair<string, string>("", "None"),
new KeyValuePair<string, string>("10", "10"),
new KeyValuePair<string, string>("20", "20"),
new KeyValuePair<string, string>("30", "30"),
new KeyValuePair<string, string>("40", "40"),
new KeyValuePair<string, string>("50", "50"),
new KeyValuePair<string, string>("60", "60")
};
}
}
}
}

View file

@ -0,0 +1,120 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.SharePoint
{
/// <summary>
/// Exposes functionality for share point server provider hosted in conjunction with organization management provider and
/// exchange server.
/// </summary>
public interface IHostedSharePointServerEnt
{
/// <summary>
/// When implemented gets root web application uri.
/// </summary>
Uri Enterprise_RootWebApplicationUri
{
get;
}
/// <summary>
/// When implemented gets list of supported languages by this installation of SharePoint.
/// </summary>
/// <returns>List of supported languages</returns>
int[] Enterprise_GetSupportedLanguages();
/// <summary>
/// When implemented gets list of SharePoint collections within root web application.
/// </summary>
/// <returns>List of SharePoint collections within root web application.</returns>
SharePointEnterpriseSiteCollection[] Enterprise_GetSiteCollections();
/// <summary>
/// When implemented gets SharePoint collection within root web application with given name.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be loaded.</param>
/// <returns>SharePoint collection within root web application with given name.</returns>
SharePointEnterpriseSiteCollection Enterprise_GetSiteCollection(string url);
/// <summary>
/// When implemented creates site collection within predefined root web application.
/// </summary>
/// <param name="siteCollection">Information about site coolection to be created.</param>
void Enterprise_CreateSiteCollection(SharePointEnterpriseSiteCollection siteCollection);
/// <summary>
/// When implemented deletes site collection under given url.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
void Enterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection siteCollection);
/// <summary>
/// When implemeneted backups site collection under give url.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
/// <param name="filename">Resulting backup file name.</param>
/// <param name="zip">A value which shows whether created backup must be archived.</param>
/// <returns>Created backup full path.</returns>
string Enterprise_BackupSiteCollection(string url, string filename, bool zip);
/// <summary>
/// When implemented restores site collection under given url from backup.
/// </summary>
/// <param name="siteCollection">Site collection to be restored.</param>
/// <param name="filename">Backup file name to restore from.</param>
void Enterprise_RestoreSiteCollection(SharePointEnterpriseSiteCollection siteCollection, string filename);
/// <summary>
/// When implemented gets binary data chunk of specified size from specified offset.
/// </summary>
/// <param name="path">Path to file to get bunary data chunk from.</param>
/// <param name="offset">Offset from which to start data reading.</param>
/// <param name="length">Binary data chunk length.</param>
/// <returns>Binary data chunk read from file.</returns>
byte[] Enterprise_GetTempFileBinaryChunk(string path, int offset, int length);
/// <summary>
/// When implemented appends supplied binary data chunk to file.
/// </summary>
/// <param name="fileName">Non existent file name to append to.</param>
/// <param name="path">Full path to existent file to append to.</param>
/// <param name="chunk">Binary data chunk to append to.</param>
/// <returns>Path to file that was appended with chunk.</returns>
string Enterprise_AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk);
void Enterprise_UpdateQuotas(string url, long maxStorage, long warningStorage);
SharePointSiteDiskSpace[] Enterprise_CalculateSiteCollectionsDiskSpace(string[] urls);
long Enterprise_GetSiteCollectionSize(string url);
void Enterprise_SetPeoplePickerOu(string site, string ou);
}
}

View file

@ -0,0 +1,298 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.SharePoint
{
/// <summary>
/// Represents SharePoint site collection information.
/// </summary>
[Serializable]
public class SharePointEnterpriseSiteCollection : ServiceProviderItem
{
private int organizationId;
private string url;
private string physicalAddress;
private string ownerLogin;
private string ownerName;
private string ownerEmail;
private int localeId;
private string title;
private string description;
private long bandwidth;
private long diskspace;
private long maxSiteStorage;
private long warningStorage;
private string rootWebApplicationInteralIpAddress;
private string rootWebApplicationFQDN;
[Persistent]
public long MaxSiteStorage
{
get { return maxSiteStorage; }
set { maxSiteStorage = value; }
}
[Persistent]
public long WarningStorage
{
get { return warningStorage; }
set { warningStorage = value; }
}
/// <summary>
/// Gets or sets service item name.
/// </summary>
public override string Name
{
get
{
return this.Url;
}
set
{
this.Url = value;
}
}
/// <summary>
/// Gets or sets id of organization which owns this site collection.
/// </summary>
[Persistent]
public int OrganizationId
{
get
{
return this.organizationId;
}
set
{
this.organizationId = value;
}
}
/// <summary>
/// Gets or sets url of the host named site collection to be created. It must not contain port number.
/// </summary>
[Persistent]
public string Url
{
get
{
return this.url;
}
set
{
this.url = value;
}
}
/// <summary>
/// Gets or sets physical address of the host named site collection. It contains scheme and port number.
/// </summary>
[Persistent]
public string PhysicalAddress
{
get
{
return this.physicalAddress;
}
set
{
this.physicalAddress = value;
}
}
/// <summary>
/// Gets or sets login name of the site collection's owner/primary site administrator.
/// </summary>
[Persistent]
public string OwnerLogin
{
get
{
return this.ownerLogin;
}
set
{
this.ownerLogin = value;
}
}
/// <summary>
/// Gets or sets display name of the site collection's owner/primary site administrator.
/// </summary>
[Persistent]
public string OwnerName
{
get
{
return this.ownerName;
}
set
{
this.ownerName = value;
}
}
/// <summary>
/// Gets or sets display email of the site collection's owner/primary site administrator.
/// </summary>
[Persistent]
public string OwnerEmail
{
get
{
return this.ownerEmail;
}
set
{
this.ownerEmail = value;
}
}
/// <summary>
/// Gets or sets the internal ip address
/// </summary>
[Persistent]
public string RootWebApplicationInteralIpAddress
{
get
{
return this.rootWebApplicationInteralIpAddress;
}
set
{
this.rootWebApplicationInteralIpAddress = value;
}
}
/// <summary>
/// Gets or sets the internal ip address
/// </summary>
[Persistent]
public string RootWebApplicationFQDN
{
get
{
return this.rootWebApplicationFQDN;
}
set
{
this.rootWebApplicationFQDN = value;
}
}
/// <summary>
/// Gets or sets locale id of the site collection to be created.
/// </summary>
[Persistent]
public int LocaleId
{
get
{
return this.localeId;
}
set
{
this.localeId = value;
}
}
/// <summary>
/// Gets or sets title of the the site collection to be created.
/// </summary>
[Persistent]
public string Title
{
get
{
return this.title;
}
set
{
this.title = value;
}
}
/// <summary>
/// Gets or sets description of the the site collection to be created.
/// </summary>
[Persistent]
public string Description
{
get
{
return this.description;
}
set
{
this.description = value;
}
}
/// <summary>
/// Gets or sets bandwidth of the the site collection.
/// </summary>
[Persistent]
public long Bandwidth
{
get
{
return this.bandwidth;
}
set
{
this.bandwidth = value;
}
}
/// <summary>
/// Gets or sets diskspace of the the site collection.
/// </summary>
[Persistent]
public long Diskspace
{
get
{
return this.diskspace;
}
set
{
this.diskspace = value;
}
}
}
}

View file

@ -0,0 +1,71 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.SharePoint
{
[Serializable]
public class SharePointEnterpriseSiteCollectionListPaged
{
private int totalRowCount;
private List<SharePointEnterpriseSiteCollection> siteCollections;
/// <summary>
/// Gets or sets total row count in persistent storage.
/// </summary>
public int TotalRowCount
{
get
{
return this.totalRowCount;
}
set
{
this.totalRowCount = value;
}
}
/// <summary>
/// Gets or sets list of site collections on a single page.
/// </summary>
public List<SharePointEnterpriseSiteCollection> SiteCollections
{
get
{
return this.siteCollections;
}
set
{
this.siteCollections = value;
}
}
}
}

View file

@ -0,0 +1,52 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.SharePoint
{
[Serializable]
public class SharePointEnterpriseSiteDiskSpace
{
private string url;
private long diskSpace;
public string Url
{
get { return url; }
set { url = value; }
}
public long DiskSpace
{
get { return diskSpace; }
set { diskSpace = value; }
}
}
}

View file

@ -0,0 +1,52 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Virtualization
{
[Persistent]
public class DynamicMemory
{
[Persistent]
public bool Enabled { get; set; }
[Persistent]
public int Minimum { get; set; }
[Persistent]
public int Maximum { get; set; }
[Persistent]
public int Buffer { get; set; }
[Persistent]
public int Priority { get; set; } // Weight
}
}

View file

@ -71,6 +71,10 @@ namespace WebsitePanel.Providers.Virtualization
[Persistent]
public int RamSize { get; set; }
public int RamUsage { get; set; }
[Persistent]
public DynamicMemory DynamicMemory { get; set; }
[Persistent]
public int HddSize { get; set; }
public LogicalDisk[] HddLogicalDisks { get; set; }

View file

@ -126,6 +126,8 @@
<Compile Include="HostedSolution\OrganizationDeletedUsersPaged.cs" />
<Compile Include="HostedSolution\OrganizationSettings.cs" />
<Compile Include="HostedSolution\OrganizationSettingsEntity.cs" />
<Compile Include="HostedSolution\SharePointEnterpriseStatisticsReport.cs" />
<Compile Include="HostedSolution\SharePointEntetpriseStatistics.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="OS\MappedDrivesPaged.cs" />
<Compile Include="OS\MappedDrive.cs" />
@ -284,11 +286,15 @@
<Compile Include="ResultObjects\ValueResultObject.cs" />
<Compile Include="ResultObjects\VirtualMachineResult.cs" />
<Compile Include="ResultObjects\WebAppGallery.cs" />
<Compile Include="SharePoint\IHostedSharePointServerEnt.cs" />
<Compile Include="SharePoint\IHostedSharePointServer.cs" />
<Compile Include="SharePoint\ISharePointServer.cs" />
<Compile Include="SharePoint\SharePointSite.cs" />
<Compile Include="SharePoint\SharePointEnterpriseSiteCollection.cs" />
<Compile Include="SharePoint\SharePointSiteCollection.cs" />
<Compile Include="SharePoint\SharePointEnterpriseSiteCollectionListPaged.cs" />
<Compile Include="SharePoint\SharePointSiteCollectionListPaged.cs" />
<Compile Include="SharePoint\SharePointEnterpriseSiteDiskSpace.cs" />
<Compile Include="SharePoint\SharePointSiteDiskSpace.cs" />
<Compile Include="Statistics\IStatisticsServer.cs" />
<Compile Include="Statistics\StatsServer.cs" />
@ -319,7 +325,6 @@
<Compile Include="Virtualization\LibraryItem.cs" />
<Compile Include="Virtualization\LogicalDisk.cs" />
<Compile Include="Virtualization\DvdDriveInfo.cs" />
<Compile Include="Virtualization\MemoryInfo.cs" />
<Compile Include="Virtualization\MonitoredObjectAlert.cs" />
<Compile Include="Virtualization\MonitoredObjectEvent.cs" />
<Compile Include="Virtualization\MountedDiskInfo.cs" />
@ -337,6 +342,7 @@
<Compile Include="Virtualization\VirtualHardDiskFormat.cs" />
<Compile Include="Virtualization\VirtualHardDiskInfo.cs" />
<Compile Include="Virtualization\VirtualHardDiskType.cs" />
<Compile Include="Virtualization\DynamicMemory.cs" />
<Compile Include="Virtualization\VirtualMachine.cs">
<SubType>Code</SubType>
</Compile>

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.DNS.MsDNS2012</RootNamespace>
<AssemblyName>WebsitePanel.Providers.DNS.MsDNS2012</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.EnterpriseStorage.Windows2012</RootNamespace>
<AssemblyName>WebsitePanel.Providers.EnterpriseStorage.Windows2012</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>

View file

@ -122,6 +122,49 @@ namespace WebsitePanel.Providers.EnterpriseStorage
return (SystemFile[]) items.ToArray(typeof (SystemFile));
}
public SystemFile[] GetFoldersWithoutFrsm(string organizationId, WebDavSetting[] settings)
{
ArrayList items = new ArrayList();
var webDavSettings = GetWebDavSettings(settings);
foreach (var setting in webDavSettings)
{
string rootPath = string.Format("{0}:\\{1}\\{2}", setting.LocationDrive, setting.HomeFolder,
organizationId);
if (Directory.Exists(rootPath))
{
DirectoryInfo root = new DirectoryInfo(rootPath);
IWebDav webdav = new Web.WebDav(setting);
// get directories
DirectoryInfo[] dirs = root.GetDirectories();
foreach (DirectoryInfo dir in dirs)
{
SystemFile folder = new SystemFile();
folder.Name = dir.Name;
folder.FullName = dir.FullName;
folder.IsDirectory = true;
if (folder.Size == -1)
{
folder.Size = FileUtils.BytesToMb(FileUtils.CalculateFolderSize(dir.FullName));
}
folder.Url = string.Format("https://{0}/{1}/{2}", setting.Domain, organizationId, dir.Name);
folder.Rules = webdav.GetFolderWebDavRules(organizationId, dir.Name);
items.Add(folder);
}
}
}
return (SystemFile[])items.ToArray(typeof(SystemFile));
}
public SystemFile GetFolder(string organizationId, string folderName, WebDavSetting setting)
{
var webDavSetting = GetWebDavSetting(setting);

View file

@ -4995,12 +4995,18 @@ namespace WebsitePanel.Providers.HostedSolution
//general settings
Command cmd = new Command("Set-MailPublicFolder");
cmd.Parameters.Add("Identity", folder);
if (!folderName.Equals(newFolderName, StringComparison.OrdinalIgnoreCase))
{
cmd.Parameters.Add("Name", newFolderName);
}
cmd.Parameters.Add("HiddenFromAddressListsEnabled", hideFromAddressBook);
ExecuteShellCommand(runSpace, cmd);
// rename
if (!folderName.Equals(newFolderName, StringComparison.OrdinalIgnoreCase))
{
cmd = new Command("Set-PublicFolder");
cmd.Parameters.Add("Identity", folder);
cmd.Parameters.Add("Name", newFolderName);
ExecuteShellCommand(runSpace, cmd);
}
}
finally
{

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.HostedSolution.Exchange2013</RootNamespace>
<AssemblyName>WebsitePanel.Providers.HostedSolution.Exchange2013</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@ -22,6 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -30,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Exchange.Common">
@ -70,7 +72,6 @@
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\Windows2012\System.Management.Automation.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.HostedSolution.Lync2013HP</RootNamespace>
<AssemblyName>WebsitePanel.Providers.HostedSolution.Lync2013HP</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Rtc.Management.Core">

View file

@ -0,0 +1,352 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml;
using Microsoft.Win32;
using WebsitePanel.Providers.SharePoint;
using WebsitePanel.Providers.Utils;
using WebsitePanel.Server.Utils;
namespace WebsitePanel.Providers.HostedSolution
{
/// <summary>
/// Provides hosted SharePoint server functionality implementation.
/// </summary>
public class HostedSharePointServer2013Ent : HostingServiceProviderBase, IHostedSharePointServerEnt
{
#region Delegate
private delegate TReturn SharePointAction<TReturn>(HostedSharePointServer2013EntImpl impl);
#endregion
#region Fields
protected string LanguagePacksPath;
protected string Wss3Registry32Key;
protected string Wss3RegistryKey;
#endregion
#region Properties
public string BackupTemporaryFolder
{
get { return ProviderSettings["BackupTemporaryFolder"]; }
}
public Uri Enterprise_RootWebApplicationUri
{
get { return new Uri(ProviderSettings["RootWebApplicationUri"]); }
}
#endregion
#region Constructor
public HostedSharePointServer2013Ent()
{
Wss3RegistryKey = @"SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0";
Wss3Registry32Key = @"SOFTWARE\Wow6432Node\Microsoft\Shared Tools\Web Server Extensions\15.0";
LanguagePacksPath = @"%commonprogramfiles%\microsoft shared\Web Server Extensions\15\HCCab\";
}
#endregion
#region Methods
/// <summary>Gets list of supported languages by this installation of SharePoint.</summary>
/// <returns>List of supported languages</returns>
public int[] Enterprise_GetSupportedLanguages()
{
var impl = new HostedSharePointServer2013EntImpl();
return impl.GetSupportedLanguages(Enterprise_RootWebApplicationUri);
}
/// <summary>Gets list of SharePoint collections within root web application.</summary>
/// <returns>List of SharePoint collections within root web application.</returns>
public SharePointEnterpriseSiteCollection[] Enterprise_GetSiteCollections()
{
return ExecuteSharePointAction(impl => impl.GetSiteCollections(Enterprise_RootWebApplicationUri));
}
/// <summary>Gets SharePoint collection within root web application with given name.</summary>
/// <param name="url">Url that uniquely identifies site collection to be loaded.</param>
/// <returns>SharePoint collection within root web application with given name.</returns>
public SharePointEnterpriseSiteCollection Enterprise_GetSiteCollection(string url)
{
return ExecuteSharePointAction(impl => impl.GetSiteCollection(Enterprise_RootWebApplicationUri, url));
}
/// <summary>Creates site collection within predefined root web application.</summary>
/// <param name="siteCollection">Information about site coolection to be created.</param>
public void Enterprise_CreateSiteCollection(SharePointEnterpriseSiteCollection siteCollection)
{
ExecuteSharePointAction<object>(delegate(HostedSharePointServer2013EntImpl impl)
{
impl.CreateSiteCollection(Enterprise_RootWebApplicationUri, siteCollection);
return null;
});
}
/// <summary>Deletes site collection under given url.</summary>
/// <param name="siteCollection">The site collection to be deleted.</param>
public void Enterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection siteCollection)
{
ExecuteSharePointAction<object>(delegate(HostedSharePointServer2013EntImpl impl)
{
impl.DeleteSiteCollection(Enterprise_RootWebApplicationUri, siteCollection);
return null;
});
}
/// <summary>Backups site collection under give url.</summary>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
/// <param name="filename">Resulting backup file name.</param>
/// <param name="zip">A value which shows whether created backup must be archived.</param>
/// <returns>Created backup full path.</returns>
public string Enterprise_BackupSiteCollection(string url, string filename, bool zip)
{
return ExecuteSharePointAction(impl => impl.BackupSiteCollection(Enterprise_RootWebApplicationUri, url, filename, zip, BackupTemporaryFolder));
}
/// <summary>Restores site collection under given url from backup.</summary>
/// <param name="siteCollection">Site collection to be restored.</param>
/// <param name="filename">Backup file name to restore from.</param>
public void Enterprise_RestoreSiteCollection(SharePointEnterpriseSiteCollection siteCollection, string filename)
{
ExecuteSharePointAction<object>(delegate(HostedSharePointServer2013EntImpl impl)
{
impl.RestoreSiteCollection(Enterprise_RootWebApplicationUri, siteCollection, filename);
return null;
});
}
/// <summary>Gets binary data chunk of specified size from specified offset.</summary>
/// <param name="path">Path to file to get bunary data chunk from.</param>
/// <param name="offset">Offset from which to start data reading.</param>
/// <param name="length">Binary data chunk length.</param>
/// <returns>Binary data chunk read from file.</returns>
public virtual byte[] Enterprise_GetTempFileBinaryChunk(string path, int offset, int length)
{
byte[] buffer = FileUtils.GetFileBinaryChunk(path, offset, length);
if (buffer.Length < length)
{
FileUtils.DeleteFile(path);
}
return buffer;
}
/// <summary>Appends supplied binary data chunk to file.</summary>
/// <param name="fileName">Non existent file name to append to.</param>
/// <param name="path">Full path to existent file to append to.</param>
/// <param name="chunk">Binary data chunk to append to.</param>
/// <returns>Path to file that was appended with chunk.</returns>
public virtual string Enterprise_AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk)
{
if (path == null)
{
path = Path.Combine(Path.GetTempPath(), fileName);
if (FileUtils.FileExists(path))
{
FileUtils.DeleteFile(path);
}
}
FileUtils.AppendFileBinaryContent(path, chunk);
return path;
}
public void Enterprise_UpdateQuotas(string url, long maxStorage, long warningStorage)
{
ExecuteSharePointAction<object>(delegate(HostedSharePointServer2013EntImpl impl)
{
impl.UpdateQuotas(Enterprise_RootWebApplicationUri, url, maxStorage, warningStorage);
return null;
});
}
public SharePointSiteDiskSpace[] Enterprise_CalculateSiteCollectionsDiskSpace(string[] urls)
{
return ExecuteSharePointAction(impl => impl.CalculateSiteCollectionDiskSpace(Enterprise_RootWebApplicationUri, urls));
}
public long Enterprise_GetSiteCollectionSize(string url)
{
return ExecuteSharePointAction(impl => impl.GetSiteCollectionSize(Enterprise_RootWebApplicationUri, url));
}
public void Enterprise_SetPeoplePickerOu(string site, string ou)
{
ExecuteSharePointAction<object>(delegate(HostedSharePointServer2013EntImpl impl)
{
impl.SetPeoplePickerOu(site, ou);
return null;
});
}
public override bool IsInstalled()
{
return IsSharePointInstalled();
}
/// <summary>Deletes service items that represent SharePoint site collection.</summary>
/// <param name="items">Items to be deleted.</param>
public override void DeleteServiceItems(ServiceProviderItem[] items)
{
foreach (ServiceProviderItem item in items)
{
var SharePointEnterpriseSiteCollection = item as SharePointEnterpriseSiteCollection;
if (SharePointEnterpriseSiteCollection != null)
{
try
{
Enterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection);
}
catch (Exception ex)
{
Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex);
}
}
}
}
/// <summary>Calculates diskspace used by supplied service items.</summary>
/// <param name="items">Service items to get diskspace usage for.</param>
/// <returns>Calculated disk space usage statistics.</returns>
public override ServiceProviderItemDiskSpace[] GetServiceItemsDiskSpace(ServiceProviderItem[] items)
{
var itemsDiskspace = new List<ServiceProviderItemDiskSpace>();
foreach (ServiceProviderItem item in items)
{
if (item is SharePointEnterpriseSiteCollection)
{
try
{
Log.WriteStart(String.Format("Calculating '{0}' site logs size", item.Name));
SharePointEnterpriseSiteCollection site = Enterprise_GetSiteCollection(item.Name);
var diskspace = new ServiceProviderItemDiskSpace { ItemId = item.Id, DiskSpace = site.Diskspace };
itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' site logs size", item.Name));
}
catch (Exception ex)
{
Log.WriteError(ex);
}
}
}
return itemsDiskspace.ToArray();
}
/// <summary>Checks whether SharePoint 2013 is installed.</summary>
/// <returns>true - if it is installed; false - otherwise.</returns>
private bool IsSharePointInstalled()
{
RegistryKey spKey = Registry.LocalMachine.OpenSubKey(Wss3RegistryKey);
RegistryKey spKey32 = Registry.LocalMachine.OpenSubKey(Wss3Registry32Key);
if (spKey == null && spKey32 == null)
{
return false;
}
var spVal = (string)spKey.GetValue("SharePoint");
return (String.Compare(spVal, "installed", true) == 0);
}
/// <summary>Executes supplied action within separate application domain.</summary>
/// <param name="action">Action to be executed.</param>
/// <returns>Any object that results from action execution or null if nothing is supposed to be returned.</returns>
/// <exception cref="ArgumentNullException">Is thrown in case supplied action is null.</exception>
private static TReturn ExecuteSharePointAction<TReturn>(SharePointAction<TReturn> action)
{
if (action == null)
{
throw new ArgumentNullException("action");
}
AppDomain domain = null;
try
{
Type type = typeof(HostedSharePointServer2013EntImpl);
var info = new AppDomainSetup { ApplicationBase = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory), PrivateBinPath = GetPrivateBinPath() };
domain = AppDomain.CreateDomain("WSS30", null, info);
var impl = (HostedSharePointServer2013EntImpl)domain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName);
return action(impl);
}
finally
{
if (domain != null)
{
AppDomain.Unload(domain);
}
}
throw new ArgumentNullException("action");
}
/// <summary> Getting PrivatePath from web.config. </summary>
/// <returns> The PrivateBinPath.</returns>
private static string GetPrivateBinPath()
{
var lines = new List<string> { "bin", "bin/debug" };
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "web.config");
if (File.Exists(path))
{
using (var reader = new StreamReader(path))
{
string content = reader.ReadToEnd();
var pattern = new Regex(@"(?<=probing .*?privatePath\s*=\s*"")[^""]+(?="".*?>)");
Match match = pattern.Match(content);
lines.AddRange(match.Value.Split(';'));
}
}
return string.Join(Path.PathSeparator.ToString(), lines.ToArray());
}
#endregion
}
}

View file

@ -0,0 +1,851 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Security.Principal;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using WebsitePanel.Providers.SharePoint;
using WebsitePanel.Providers.Utils;
namespace WebsitePanel.Providers.HostedSolution
{
public class HostedSharePointServer2013EntImpl : MarshalByRefObject
{
#region Fields
private static RunspaceConfiguration runspaceConfiguration;
#endregion
#region Properties
private string SharepointSnapInName
{
get { return "Microsoft.SharePoint.Powershell"; }
}
#endregion
#region Methods
/// <summary>Gets list of SharePoint collections within root web application.</summary>
/// <param name="rootWebApplicationUri"> The root web application Uri. </param>
/// <returns>List of SharePoint collections within root web application.</returns>
public SharePointEnterpriseSiteCollection[] GetSiteCollections(Uri rootWebApplicationUri)
{
return GetSPSiteCollections(rootWebApplicationUri).Select(pair => NewSiteCollection(pair.Value)).ToArray();
}
/// <summary>Gets list of supported languages by this installation of SharePoint.</summary>
/// <param name="rootWebApplicationUri"> The root web application Uri. </param>
/// <returns>List of supported languages</returns>
public int[] GetSupportedLanguages(Uri rootWebApplicationUri)
{
var languages = new List<int>();
try
{
WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate();
try
{
languages.AddRange(from SPLanguage lang in SPRegionalSettings.GlobalInstalledLanguages select lang.LCID);
}
finally
{
wic.Undo();
}
}
catch (Exception ex)
{
throw new InvalidOperationException("Failed to create site collection.", ex);
}
return languages.ToArray();
}
/// <summary>Gets site collection size in bytes.</summary>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
/// <param name="url">The site collection url.</param>
/// <returns>Size in bytes.</returns>
public long GetSiteCollectionSize(Uri rootWebApplicationUri, string url)
{
Dictionary<string, long> sizes = GetSitesCollectionSize(rootWebApplicationUri, new[] {url});
if (sizes.Count() == 1)
{
return sizes.First().Value;
}
throw new ApplicationException(string.Format("SiteCollection {0} does not exist", url));
}
/// <summary>Gets sites disk space.</summary>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
/// <param name="urls">The sites urls.</param>
/// <returns>The disk space.</returns>
public SharePointSiteDiskSpace[] CalculateSiteCollectionDiskSpace(Uri rootWebApplicationUri, string[] urls)
{
return GetSitesCollectionSize(rootWebApplicationUri, urls).Select(pair => new SharePointSiteDiskSpace {Url = pair.Key, DiskSpace = (long) Math.Round(pair.Value/1024.0/1024.0)}).ToArray();
}
/// <summary>Calculates size of the required seti collections.</summary>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
/// <param name="urls">The sites urls.</param>
/// <returns>Calculated sizes.</returns>
private Dictionary<string, long> GetSitesCollectionSize(Uri rootWebApplicationUri, IEnumerable<string> urls)
{
Runspace runspace = null;
var result = new Dictionary<string, long>();
try
{
runspace = OpenRunspace();
foreach (string url in urls)
{
string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port);
var scripts = new List<string> {string.Format("$site=Get-SPSite -Identity \"{0}\"", siteCollectionUrl), "$site.RecalculateStorageUsed()", "$site.Usage.Storage"};
Collection<PSObject> scriptResult = ExecuteShellCommand(runspace, scripts);
if (scriptResult != null && scriptResult.Any())
{
result.Add(url, Convert.ToInt64(scriptResult.First().BaseObject));
}
}
}
finally
{
CloseRunspace(runspace);
}
return result;
}
/// <summary>Sets people picker OU.</summary>
/// <param name="site">The site.</param>
/// <param name="ou">OU.</param>
public void SetPeoplePickerOu(string site, string ou)
{
HostedSolutionLog.LogStart("SetPeoplePickerOu");
HostedSolutionLog.LogInfo(" Site: {0}", site);
HostedSolutionLog.LogInfo(" OU: {0}", ou);
Runspace runspace = null;
try
{
runspace = OpenRunspace();
var cmd = new Command("Set-SPSite");
cmd.Parameters.Add("Identity", site);
cmd.Parameters.Add("UserAccountDirectoryPath", ou);
ExecuteShellCommand(runspace, cmd);
}
finally
{
CloseRunspace(runspace);
}
HostedSolutionLog.LogEnd("SetPeoplePickerOu");
}
/// <summary>Gets SharePoint collection within root web application with given name.</summary>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="url">Url that uniquely identifies site collection to be loaded.</param>
/// <returns>SharePoint collection within root web application with given name.</returns>
public SharePointEnterpriseSiteCollection GetSiteCollection(Uri rootWebApplicationUri, string url)
{
return NewSiteCollection(GetSPSiteCollection(rootWebApplicationUri, url));
}
/// <summary>Deletes quota.</summary>
/// <param name="name">The quota name.</param>
private static void DeleteQuotaTemplate(string name)
{
SPFarm farm = SPFarm.Local;
var webService = farm.Services.GetValue<SPWebService>("");
SPQuotaTemplateCollection quotaColl = webService.QuotaTemplates;
quotaColl.Delete(name);
}
/// <summary>Updates site collection quota.</summary>
/// <param name="root">The root uri.</param>
/// <param name="url">The site collection url.</param>
/// <param name="maxStorage">The max storage.</param>
/// <param name="warningStorage">The warning storage value.</param>
public void UpdateQuotas(Uri root, string url, long maxStorage, long warningStorage)
{
if (maxStorage != -1)
{
maxStorage = maxStorage*1024*1024;
}
else
{
maxStorage = 0;
}
if (warningStorage != -1 && maxStorage != -1)
{
warningStorage = Math.Min(warningStorage, maxStorage)*1024*1024;
}
else
{
warningStorage = 0;
}
Runspace runspace = null;
try
{
runspace = OpenRunspace();
GrantAccess(runspace, root);
string siteCollectionUrl = String.Format("{0}:{1}", url, root.Port);
var command = new Command("Set-SPSite");
command.Parameters.Add("Identity", siteCollectionUrl);
command.Parameters.Add("MaxSize", maxStorage);
command.Parameters.Add("WarningSize", warningStorage);
ExecuteShellCommand(runspace, command);
}
finally
{
CloseRunspace(runspace);
}
}
/// <summary>Grants acces to current user.</summary>
/// <param name="runspace">The runspace.</param>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
private void GrantAccess(Runspace runspace, Uri rootWebApplicationUri)
{
ExecuteShellCommand(runspace, new List<string> {string.Format("$webApp=Get-SPWebApplication {0}", rootWebApplicationUri.AbsoluteUri), string.Format("$webApp.GrantAccessToProcessIdentity(\"{0}\")", WindowsIdentity.GetCurrent().Name)});
}
/// <summary>Deletes site collection.</summary>
/// <param name="runspace">The runspace.</param>
/// <param name="url">The site collection url.</param>
/// <param name="deleteADAccounts">True - if active directory accounts should be deleted.</param>
private void DeleteSiteCollection(Runspace runspace, string url, bool deleteADAccounts)
{
var command = new Command("Remove-SPSite");
command.Parameters.Add("Identity", url);
command.Parameters.Add("DeleteADAccounts", deleteADAccounts);
ExecuteShellCommand(runspace, command);
}
/// <summary> Creates site collection within predefined root web application.</summary>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="siteCollection">Information about site coolection to be created.</param>
/// <exception cref="InvalidOperationException">Is thrown in case requested operation fails for any reason.</exception>
public void CreateSiteCollection(Uri rootWebApplicationUri, SharePointEnterpriseSiteCollection siteCollection)
{
HostedSolutionLog.LogStart("CreateSiteCollection");
WindowsImpersonationContext wic = null;
Runspace runspace = null;
try
{
wic = WindowsIdentity.GetCurrent().Impersonate();
runspace = OpenRunspace();
CreateCollection(runspace, rootWebApplicationUri, siteCollection);
}
finally
{
CloseRunspace(runspace);
HostedSolutionLog.LogEnd("CreateSiteCollection");
if (wic != null)
{
wic.Undo();
}
}
}
/// <summary> Creates site collection within predefined root web application.</summary>
/// <param name="runspace"> The runspace.</param>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="siteCollection">Information about site coolection to be created.</param>
/// <exception cref="InvalidOperationException">Is thrown in case requested operation fails for any reason.</exception>
private void CreateCollection(Runspace runspace, Uri rootWebApplicationUri, SharePointEnterpriseSiteCollection siteCollection)
{
string siteCollectionUrl = String.Format("{0}:{1}", siteCollection.Url, rootWebApplicationUri.Port);
HostedSolutionLog.DebugInfo("siteCollectionUrl: {0}", siteCollectionUrl);
try
{
SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri);
rootWebApplication.Sites.Add(siteCollectionUrl, siteCollection.Title, siteCollection.Description, (uint) siteCollection.LocaleId, String.Empty, siteCollection.OwnerLogin, siteCollection.OwnerName, siteCollection.OwnerEmail, null, null, null, true);
rootWebApplication.Update();
}
catch (Exception)
{
DeleteSiteCollection(runspace, siteCollectionUrl, true);
throw;
}
try
{
GrantAccess(runspace, rootWebApplicationUri);
var command = new Command("Set-SPSite");
command.Parameters.Add("Identity", siteCollectionUrl);
if (siteCollection.MaxSiteStorage != -1)
{
command.Parameters.Add("MaxSize", siteCollection.MaxSiteStorage*1024*1024);
}
if (siteCollection.WarningStorage != -1 && siteCollection.MaxSiteStorage != -1)
{
command.Parameters.Add("WarningSize", Math.Min(siteCollection.WarningStorage, siteCollection.MaxSiteStorage)*1024*1024);
}
ExecuteShellCommand(runspace, command);
}
catch (Exception)
{
DeleteQuotaTemplate(siteCollection.Title);
DeleteSiteCollection(runspace, siteCollectionUrl, true);
throw;
}
AddHostsRecord(siteCollection);
}
/// <summary>Deletes site collection under given url.</summary>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="siteCollection">The site collection to be deleted.</param>
/// <exception cref="InvalidOperationException">Is thrown in case requested operation fails for any reason.</exception>
public void DeleteSiteCollection(Uri rootWebApplicationUri, SharePointEnterpriseSiteCollection siteCollection)
{
HostedSolutionLog.LogStart("DeleteSiteCollection");
Runspace runspace = null;
try
{
string siteCollectionUrl = String.Format("{0}:{1}", siteCollection.Url, rootWebApplicationUri.Port);
HostedSolutionLog.DebugInfo("siteCollectionUrl: {0}", siteCollectionUrl);
runspace = OpenRunspace();
DeleteSiteCollection(runspace, siteCollectionUrl, false);
RemoveHostsRecord(siteCollection);
}
catch (Exception ex)
{
throw new InvalidOperationException("Failed to delete site collection.", ex);
}
finally
{
CloseRunspace(runspace);
HostedSolutionLog.LogEnd("DeleteSiteCollection");
}
}
/// <summary> Backups site collection under give url.</summary>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
/// <param name="filename">Resulting backup file name.</param>
/// <param name="zip">A value which shows whether created backup must be archived.</param>
/// <param name="tempPath">Custom temp path for backup</param>
/// <returns>Full path to created backup.</returns>
/// <exception cref="InvalidOperationException">Is thrown in case requested operation fails for any reason.</exception>
public string BackupSiteCollection(Uri rootWebApplicationUri, string url, string filename, bool zip, string tempPath)
{
try
{
string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port);
HostedSolutionLog.LogStart("BackupSiteCollection");
HostedSolutionLog.DebugInfo("siteCollectionUrl: {0}", siteCollectionUrl);
if (String.IsNullOrEmpty(tempPath))
{
tempPath = Path.GetTempPath();
}
string backupFileName = Path.Combine(tempPath, (zip ? StringUtils.CleanIdentifier(siteCollectionUrl) + ".bsh" : StringUtils.CleanIdentifier(filename)));
HostedSolutionLog.DebugInfo("backupFilePath: {0}", backupFileName);
Runspace runspace = null;
try
{
runspace = OpenRunspace();
var command = new Command("Backup-SPSite");
command.Parameters.Add("Identity", siteCollectionUrl);
command.Parameters.Add("Path", backupFileName);
ExecuteShellCommand(runspace, command);
if (zip)
{
string zipFile = Path.Combine(tempPath, filename);
string zipRoot = Path.GetDirectoryName(backupFileName);
FileUtils.ZipFiles(zipFile, zipRoot, new[] {Path.GetFileName(backupFileName)});
FileUtils.DeleteFile(backupFileName);
backupFileName = zipFile;
}
return backupFileName;
}
finally
{
CloseRunspace(runspace);
HostedSolutionLog.LogEnd("BackupSiteCollection");
}
}
catch (Exception ex)
{
throw new InvalidOperationException("Failed to backup site collection.", ex);
}
}
/// <summary>Restores site collection under given url from backup.</summary>
/// <param name="rootWebApplicationUri">Root web application uri.</param>
/// <param name="siteCollection">Site collection to be restored.</param>
/// <param name="filename">Backup file name to restore from.</param>
/// <exception cref="InvalidOperationException">Is thrown in case requested operation fails for any reason.</exception>
public void RestoreSiteCollection(Uri rootWebApplicationUri, SharePointEnterpriseSiteCollection siteCollection, string filename)
{
string url = siteCollection.Url;
try
{
string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port);
HostedSolutionLog.LogStart("RestoreSiteCollection");
HostedSolutionLog.DebugInfo("siteCollectionUrl: {0}", siteCollectionUrl);
HostedSolutionLog.DebugInfo("backupFilePath: {0}", filename);
Runspace runspace = null;
try
{
string tempPath = Path.GetTempPath();
string expandedFile = filename;
if (Path.GetExtension(filename).ToLower() == ".zip")
{
expandedFile = FileUtils.UnzipFiles(filename, tempPath)[0];
// Delete zip archive.
FileUtils.DeleteFile(filename);
}
runspace = OpenRunspace();
DeleteSiteCollection(runspace, siteCollectionUrl, false);
var command = new Command("Restore-SPSite");
command.Parameters.Add("Identity", siteCollectionUrl);
command.Parameters.Add("Path", filename);
ExecuteShellCommand(runspace, command);
command = new Command("Set-SPSite");
command.Parameters.Add("Identity", siteCollectionUrl);
command.Parameters.Add("OwnerAlias", siteCollection.OwnerLogin);
ExecuteShellCommand(runspace, command);
command = new Command("Set-SPUser");
command.Parameters.Add("Identity", siteCollection.OwnerLogin);
command.Parameters.Add("Email", siteCollection.OwnerEmail);
command.Parameters.Add("DisplayName", siteCollection.Name);
ExecuteShellCommand(runspace, command);
FileUtils.DeleteFile(expandedFile);
}
finally
{
CloseRunspace(runspace);
HostedSolutionLog.LogEnd("RestoreSiteCollection");
}
}
catch (Exception ex)
{
throw new InvalidOperationException("Failed to restore site collection.", ex);
}
}
/// <summary>Creates new site collection with information from administration object.</summary>
/// <param name="site">Administration object.</param>
private static SharePointEnterpriseSiteCollection NewSiteCollection(SPSite site)
{
var siteUri = new Uri(site.Url);
string url = (siteUri.Port > 0) ? site.Url.Replace(String.Format(":{0}", siteUri.Port), String.Empty) : site.Url;
return new SharePointEnterpriseSiteCollection {Url = url, OwnerLogin = site.Owner.LoginName, OwnerName = site.Owner.Name, OwnerEmail = site.Owner.Email, LocaleId = site.RootWeb.Locale.LCID, Title = site.RootWeb.Title, Description = site.RootWeb.Description, Bandwidth = site.Usage.Bandwidth, Diskspace = site.Usage.Storage, MaxSiteStorage = site.Quota.StorageMaximumLevel, WarningStorage = site.Quota.StorageWarningLevel};
}
/// <summary>Gets SharePoint sites collection.</summary>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
/// <returns>The SharePoint sites.</returns>
private Dictionary<string, SPSite> GetSPSiteCollections(Uri rootWebApplicationUri)
{
Runspace runspace = null;
var collections = new Dictionary<string, SPSite>();
try
{
runspace = OpenRunspace();
var cmd = new Command("Get-SPSite");
cmd.Parameters.Add("WebApplication", rootWebApplicationUri.AbsoluteUri);
Collection<PSObject> result = ExecuteShellCommand(runspace, cmd);
if (result != null)
{
foreach (PSObject psObject in result)
{
var spSite = psObject.BaseObject as SPSite;
if (spSite != null)
{
collections.Add(spSite.Url, spSite);
}
}
}
}
finally
{
CloseRunspace(runspace);
}
return collections;
}
/// <summary>Gets SharePoint site collection.</summary>
/// <param name="rootWebApplicationUri">The root web application uri.</param>
/// <param name="url">The required site url.</param>
/// <returns>The SharePoint sites.</returns>
private SPSite GetSPSiteCollection(Uri rootWebApplicationUri, string url)
{
Runspace runspace = null;
try
{
string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port);
runspace = OpenRunspace();
var cmd = new Command("Get-SPSite");
cmd.Parameters.Add("Identity", siteCollectionUrl);
Collection<PSObject> result = ExecuteShellCommand(runspace, cmd);
if (result != null && result.Count() == 1)
{
var spSite = result.First().BaseObject as SPSite;
if (spSite == null)
{
throw new ApplicationException(string.Format("SiteCollection {0} does not exist", url));
}
return result.First().BaseObject as SPSite;
}
else
{
throw new ApplicationException(string.Format("SiteCollection {0} does not exist", url));
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError(ex);
throw;
}
finally
{
CloseRunspace(runspace);
}
}
/// <summary>Opens PowerShell runspace.</summary>
/// <returns>The runspace.</returns>
private Runspace OpenRunspace()
{
HostedSolutionLog.LogStart("OpenRunspace");
if (runspaceConfiguration == null)
{
runspaceConfiguration = RunspaceConfiguration.Create();
PSSnapInException exception;
runspaceConfiguration.AddPSSnapIn(SharepointSnapInName, out exception);
HostedSolutionLog.LogInfo("Sharepoint snapin loaded");
if (exception != null)
{
HostedSolutionLog.LogWarning("SnapIn error", exception);
}
}
Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration);
runspace.Open();
runspace.SessionStateProxy.SetVariable("ConfirmPreference", "none");
HostedSolutionLog.LogEnd("OpenRunspace");
return runspace;
}
/// <summary>Closes runspace.</summary>
/// <param name="runspace">The runspace.</param>
private void CloseRunspace(Runspace runspace)
{
try
{
if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened)
{
runspace.Close();
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError("Runspace error", ex);
}
}
/// <summary>Executes shell command.</summary>
/// <param name="runspace">The runspace.</param>
/// <param name="cmd">The command to be executed.</param>
/// <returns>PSobjecs collection.</returns>
private Collection<PSObject> ExecuteShellCommand(Runspace runspace, object cmd)
{
object[] errors;
var command = cmd as Command;
if (command != null)
{
return ExecuteShellCommand(runspace, command, out errors);
}
return ExecuteShellCommand(runspace, cmd as List<string>, out errors);
}
/// <summary>Executes shell command.</summary>
/// <param name="runspace">The runspace.</param>
/// <param name="cmd">The command to be executed.</param>
/// <param name="errors">The errors.</param>
/// <returns>PSobjecs collection.</returns>
private Collection<PSObject> ExecuteShellCommand(Runspace runspace, Command cmd, out object[] errors)
{
HostedSolutionLog.LogStart("ExecuteShellCommand");
var errorList = new List<object>();
Collection<PSObject> results;
using (Pipeline pipeLine = runspace.CreatePipeline())
{
pipeLine.Commands.Add(cmd);
results = pipeLine.Invoke();
if (pipeLine.Error != null && pipeLine.Error.Count > 0)
{
foreach (object item in pipeLine.Error.ReadToEnd())
{
errorList.Add(item);
string errorMessage = string.Format("Invoke error: {0}", item);
HostedSolutionLog.LogWarning(errorMessage);
}
}
}
errors = errorList.ToArray();
HostedSolutionLog.LogEnd("ExecuteShellCommand");
return results;
}
/// <summary>Executes shell command.</summary>
/// <param name="runspace">The runspace.</param>
/// <param name="scripts">The scripts to be executed.</param>
/// <param name="errors">The errors.</param>
/// <returns>PSobjecs collection.</returns>
private Collection<PSObject> ExecuteShellCommand(Runspace runspace, List<string> scripts, out object[] errors)
{
HostedSolutionLog.LogStart("ExecuteShellCommand");
var errorList = new List<object>();
Collection<PSObject> results;
using (Pipeline pipeLine = runspace.CreatePipeline())
{
foreach (string script in scripts)
{
pipeLine.Commands.AddScript(script);
}
results = pipeLine.Invoke();
if (pipeLine.Error != null && pipeLine.Error.Count > 0)
{
foreach (object item in pipeLine.Error.ReadToEnd())
{
errorList.Add(item);
string errorMessage = string.Format("Invoke error: {0}", item);
HostedSolutionLog.LogWarning(errorMessage);
throw new ArgumentException(scripts.First());
}
}
}
errors = errorList.ToArray();
HostedSolutionLog.LogEnd("ExecuteShellCommand");
return results;
}
/// <summary>Adds record to hosts file.</summary>
/// <param name="siteCollection">The site collection object.</param>
public void AddHostsRecord(SharePointEnterpriseSiteCollection siteCollection)
{
try
{
if (siteCollection.RootWebApplicationInteralIpAddress != string.Empty)
{
string dirPath = FileUtils.EvaluateSystemVariables(@"%windir%\system32\drivers\etc");
string path = dirPath + "\\hosts";
if (FileUtils.FileExists(path))
{
string content = FileUtils.GetFileTextContent(path);
content = content.Replace("\r\n", "\n").Replace("\n\r", "\n");
string[] contentArr = content.Split(new[] {'\n'});
bool bRecordExist = false;
foreach (string s in contentArr)
{
if (s != string.Empty)
{
string hostName = string.Empty;
if (s[0] != '#')
{
bool bSeperator = false;
foreach (char c in s)
{
if ((c != ' ') & (c != '\t'))
{
if (bSeperator)
{
hostName += c;
}
}
else
{
bSeperator = true;
}
}
if (hostName.ToLower() == siteCollection.RootWebApplicationFQDN.ToLower())
{
bRecordExist = true;
break;
}
}
}
}
if (!bRecordExist)
{
string outPut = contentArr.Where(o => o != string.Empty).Aggregate(string.Empty, (current, o) => current + (o + "\r\n"));
outPut += siteCollection.RootWebApplicationInteralIpAddress + '\t' + siteCollection.RootWebApplicationFQDN + "\r\n";
FileUtils.UpdateFileTextContent(path, outPut);
}
}
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError(ex);
}
}
/// <summary>Removes record from hosts file.</summary>
/// <param name="siteCollection">The site collection object.</param>
private void RemoveHostsRecord(SharePointEnterpriseSiteCollection siteCollection)
{
try
{
if (siteCollection.RootWebApplicationInteralIpAddress != string.Empty)
{
string dirPath = FileUtils.EvaluateSystemVariables(@"%windir%\system32\drivers\etc");
string path = dirPath + "\\hosts";
if (FileUtils.FileExists(path))
{
string content = FileUtils.GetFileTextContent(path);
content = content.Replace("\r\n", "\n").Replace("\n\r", "\n");
string[] contentArr = content.Split(new[] {'\n'});
string outPut = string.Empty;
foreach (string s in contentArr)
{
if (s != string.Empty)
{
string hostName = string.Empty;
if (s[0] != '#')
{
bool bSeperator = false;
foreach (char c in s)
{
if ((c != ' ') & (c != '\t'))
{
if (bSeperator)
{
hostName += c;
}
}
else
{
bSeperator = true;
}
}
if (hostName.ToLower() != siteCollection.RootWebApplicationFQDN.ToLower())
{
outPut += s + "\r\n";
}
}
else
{
outPut += s + "\r\n";
}
}
}
FileUtils.UpdateFileTextContent(path, outPut);
}
}
}
catch (Exception ex)
{
HostedSolutionLog.LogError(ex);
}
}
#endregion
}
}

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WebsitePanel.Providers.HostedSolution.SharePoint2013Ent")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WebsitePanel.Providers.HostedSolution.SharePoint2013Ent")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("fd1db47e-461e-41ac-88cf-fb2925f48d52")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.HostedSolution.SharePoint2013Ent</RootNamespace>
<AssemblyName>WebsitePanel.Providers.HostedSolution.SharePoint2013Ent</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\Sharepoint2013\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\Sharepoint2013\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.SharePoint">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.HostedSolution\WebsitePanel.Providers.HostedSolution.csproj">
<Project>{A06DE5E4-4331-47E1-8F46-7B846146B559}</Project>
<Name>WebsitePanel.Providers.HostedSolution</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
<Name>WebsitePanel.Server.Utils</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="HostedSharePointServer2013Ent.cs" />
<Compile Include="HostedSharePointServer2013EntImpl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -2133,7 +2133,7 @@ namespace WebsitePanel.Providers.HostedSolution
uidAttr.Value = Guid.NewGuid().ToString("B");
bypassErrorsAttr.Value = (1).ToString();
actionPropAttr.Value = "R";
actionPropAttr.Value = "C";
thisDrivePropAttr.Value = "NOCHANGE";
allDrivesPropAttr.Value = "NOCHANGE";
userNamePropAttr.Value = string.Empty;

View file

@ -2034,8 +2034,9 @@ Public Class MailEnable
End If
If [String].IsNullOrEmpty(version) = False Then
Dim split As String() = version.Split(New [Char]() {"."c})
Return split(0).Equals("1") Or split(0).Equals("2") Or split(0).Equals("3") Or split(0).Equals("4") Or split(0).Equals("5") Or split(0).Equals("6") Or split(0).Equals("7")
'all versions of MailEnable will be compatible with this, so we are just checking to see if there is a version number
'future versions aim to retain compatibility
Return True
Else
Return False
End If

View file

@ -93,6 +93,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
private const string DisableTaskManagerGpoValueName = "DisableTaskMgr";
private const string HideCDriveGpoKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
private const string HideCDriveGpoValueName = "NoDrives";
private const string RDSSessionGpoKey = @"HKCU\Software\Policies\Microsoft\Windows NT\Terminal Services";
private const string RDSSessionGpoValueName = "Shadow";
private const string DisableCmdGpoKey = @"HKCU\Software\Policies\Microsoft\Windows\System";
private const string DisableCmdGpoValueName = "DisableCMD";
private const string DisallowRunParentKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";
private const string DisallowRunKey = @"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun";
private const string DisallowRunValueName = "DisallowRun";
#endregion
@ -369,8 +376,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer);
}
CreatePolicy(runSpace, organizationId, string.Format("{0}-administrators", collection.Name), new DirectoryEntry(GetGroupPath(organizationId, collection.Name, GetLocalAdminsGroupName(collection.Name))), collection.Name);
CreatePolicy(runSpace, organizationId, string.Format("{0}-users", collection.Name), new DirectoryEntry(GetUsersGroupPath(organizationId, collection.Name)), collection.Name);
string collectionComputersPath = GetComputerGroupPath(organizationId, collection.Name);
CreatePolicy(runSpace, organizationId, string.Format("{0}-administrators", collection.Name),
new DirectoryEntry(GetGroupPath(organizationId, collection.Name, GetLocalAdminsGroupName(collection.Name))), new DirectoryEntry(collectionComputersPath), collection.Name);
CreatePolicy(runSpace, organizationId, string.Format("{0}-users", collection.Name), new DirectoryEntry(GetUsersGroupPath(organizationId, collection.Name))
, new DirectoryEntry(collectionComputersPath), collection.Name);
CreateHelpDeskPolicy(runSpace, new DirectoryEntry(GetHelpDeskGroupPath(RDSHelpDeskGroup)), new DirectoryEntry(collectionComputersPath), organizationId, collection.Name);
}
finally
{
@ -516,6 +527,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
DeleteGpo(runSpace, string.Format("{0}-administrators", collectionName));
DeleteGpo(runSpace, string.Format("{0}-users", collectionName));
DeleteHelpDeskPolicy(runSpace, collectionName);
var capPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdCap);
var rapPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdRap);
@ -628,6 +640,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
}
public void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId)
{
foreach(var server in servers)
{
MoveSessionHostToCollectionOU(server.Name, collectionName, organizationId);
}
}
public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server)
{
Runspace runSpace = null;
@ -1116,7 +1136,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#region GPO
public void ApplyGPO(string collectionName, RdsServerSettings serverSettings)
public void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings)
{
string administratorsGpo = string.Format("{0}-administrators", collectionName);
string usersGpo = string.Format("{0}-users", collectionName);
@ -1124,43 +1144,135 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
try
{
runspace = OpenRunspace();
runspace = OpenRunspace();
string collectionComputersPath = GetComputerGroupPath(organizationId, collectionName);
CreatePolicy(runspace, organizationId, string.Format("{0}-administrators", collectionName),
new DirectoryEntry(GetGroupPath(organizationId, collectionName, GetLocalAdminsGroupName(collectionName))), new DirectoryEntry(collectionComputersPath), collectionName);
CreatePolicy(runspace, organizationId, string.Format("{0}-users", collectionName),
new DirectoryEntry(GetUsersGroupPath(organizationId, collectionName)), new DirectoryEntry(collectionComputersPath), collectionName);
CreateHelpDeskPolicy(runspace, new DirectoryEntry(GetHelpDeskGroupPath(RDSHelpDeskGroup)), new DirectoryEntry(collectionComputersPath), organizationId, collectionName);
RemoveRegistryValue(runspace, ScreenSaverGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, ScreenSaverGpoKey, usersGpo);
RemoveRegistryValue(runspace, RemoveRestartGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, RemoveRestartGpoKey, usersGpo);
RemoveRegistryValue(runspace, DisableTaskManagerGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, DisableTaskManagerGpoKey, usersGpo);
RemoveRegistryValue(runspace, DisableTaskManagerGpoKey, usersGpo);
RemoveRegistryValue(runspace, DisableCmdGpoKey, usersGpo);
RemoveRegistryValue(runspace, DisableCmdGpoKey, administratorsGpo);
RemoveRegistryValue(runspace, DisallowRunKey, usersGpo);
RemoveRegistryValue(runspace, DisallowRunParentKey, usersGpo);
RemoveRegistryValue(runspace, DisallowRunKey, administratorsGpo);
RemoveRegistryValue(runspace, DisallowRunParentKey, administratorsGpo);
var setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.SCREEN_SAVER_DISABLED));
SetRegistryValue(setting, runspace, ScreenSaverGpoKey, administratorsGpo, usersGpo, ScreenSaverValueName, "0", "string");
var setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.SCREEN_SAVER_DISABLED));
SetRegistryValue(setting, runspace, ScreenSaverGpoKey, administratorsGpo, usersGpo, ScreenSaverValueName, "0", "string");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_SHUTDOWN_RESTART));
SetRegistryValue(setting, runspace, RemoveRestartGpoKey, administratorsGpo, usersGpo, RemoveRestartGpoValueName, "1", "DWord");
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_SHUTDOWN_RESTART));
SetRegistryValue(setting, runspace, RemoveRestartGpoKey, administratorsGpo, usersGpo, RemoveRestartGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_RUN_COMMAND));
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_RUN_COMMAND));
SetRegistryValue(setting, runspace, RemoveRunGpoKey, administratorsGpo, usersGpo, RemoveRunGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.DISABLE_TASK_MANAGER));
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.DISABLE_TASK_MANAGER));
SetRegistryValue(setting, runspace, DisableTaskManagerGpoKey, administratorsGpo, usersGpo, DisableTaskManagerGpoValueName, "1", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.HIDE_C_DRIVE));
SetRegistryValue(setting, runspace, HideCDriveGpoKey, administratorsGpo, usersGpo, HideCDriveGpoValueName, "4", "DWord");
setting = serverSettings.Settings.First(s => s.PropertyName.Equals(RdsServerSettings.LOCK_SCREEN_TIMEOUT));
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.HIDE_C_DRIVE));
SetRegistryValue(setting, runspace, HideCDriveGpoKey, administratorsGpo, usersGpo, HideCDriveGpoValueName, "4", "DWord");
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.DISABLE_CMD));
SetRegistryValue(setting, runspace, DisableCmdGpoKey, administratorsGpo, usersGpo, DisableCmdGpoValueName, "1", "DWord");
setting = serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.LOCK_SCREEN_TIMEOUT));
double result;
if (!string.IsNullOrEmpty(setting.PropertyValue) && double.TryParse(setting.PropertyValue, out result))
if (setting != null && !string.IsNullOrEmpty(setting.PropertyValue) && double.TryParse(setting.PropertyValue, out result))
{
SetRegistryValue(setting, runspace, ScreenSaverTimeoutGpoKey, administratorsGpo, usersGpo, ScreenSaverTimeoutValueName, setting.PropertyValue, "string");
}
SetRdsSessionHostPermissions(runspace, serverSettings, usersGpo, administratorsGpo);
SetPowershellPermissions(runspace, serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_POWERSHELL_COMMAND)), usersGpo, administratorsGpo);
}
finally
{
CloseRunspace(runspace);
}
}
}
private void CheckPolicySecurityFiltering(Runspace runspace, string gpoName, DirectoryEntry collectionComputersEntry)
{
var scripts = new List<string>{
string.Format("Get-GPPermissions -Name {0} -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(collectionComputersEntry, "sAMAccountName").ToString()))
};
object[] errors = null;
ExecuteRemoteShellCommand(runspace, PrimaryDomainController, scripts, out errors);
if (errors != null && errors.Any())
{
scripts = new List<string>{
string.Format("Set-GPPermissions -Name {0} -PermissionLevel gpoapply -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(collectionComputersEntry, "sAMAccountName").ToString()))
};
}
ExecuteRemoteShellCommand(runspace, PrimaryDomainController, scripts, out errors);
}
private void SetPowershellPermissions(Runspace runspace, RdsServerSetting setting, string usersGpo, string administratorsGpo)
{
if (setting != null)
{
SetRegistryValue(setting, runspace, DisallowRunParentKey, administratorsGpo, usersGpo, DisallowRunValueName, "1", "Dword");
if (setting.ApplyAdministrators)
{
SetRegistryValue(runspace, DisallowRunKey, administratorsGpo, "powershell.exe", "string");
}
if (setting.ApplyUsers)
{
SetRegistryValue(runspace, DisallowRunKey, usersGpo, "powershell.exe", "string");
}
}
}
private void SetRdsSessionHostPermissions(Runspace runspace, RdsServerSettings settings, string usersGpo, string administratorsGpo)
{
var viewSetting = settings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.RDS_VIEW_WITHOUT_PERMISSION));
var controlSetting = settings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION));
if (viewSetting == null || controlSetting == null)
{
return;
}
if (controlSetting.ApplyUsers)
{
SetRegistryValue(runspace, RDSSessionGpoKey, usersGpo, "2", RDSSessionGpoValueName, "DWord");
}
else if (viewSetting.ApplyUsers)
{
SetRegistryValue(runspace, RDSSessionGpoKey, usersGpo, "4", RDSSessionGpoValueName, "DWord");
}
else
{
SetRegistryValue(runspace, RDSSessionGpoKey, usersGpo, "3", RDSSessionGpoValueName, "DWord");
}
if (controlSetting.ApplyAdministrators)
{
SetRegistryValue(runspace, RDSSessionGpoKey, administratorsGpo, "2", RDSSessionGpoValueName, "DWord");
}
else if (viewSetting.ApplyAdministrators)
{
SetRegistryValue(runspace, RDSSessionGpoKey, administratorsGpo, "4", RDSSessionGpoValueName, "DWord");
}
else
{
SetRegistryValue(runspace, RDSSessionGpoKey, administratorsGpo, "3", RDSSessionGpoValueName, "DWord");
}
}
private void RemoveRegistryValue(Runspace runspace, string key, string gpoName)
{
@ -1173,6 +1285,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
private void SetRegistryValue(RdsServerSetting setting, Runspace runspace, string key, string administratorsGpo, string usersGpo, string valueName, string value, string type)
{
if (setting == null)
{
return;
}
if (setting.ApplyAdministrators)
{
SetRegistryValue(runspace, key, administratorsGpo, value, valueName, type);
@ -1184,6 +1301,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
}
private void SetRegistryValue(Runspace runspace, string key, string gpoName, string value, string type)
{
Command cmd = new Command("Set-GPRegistryValue");
cmd.Parameters.Add("Name", gpoName);
cmd.Parameters.Add("Key", string.Format("\"{0}\"", key));
cmd.Parameters.Add("Value", value);
cmd.Parameters.Add("Type", type);
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private void SetRegistryValue(Runspace runspace, string key, string gpoName, string value, string valueName, string type)
{
Command cmd = new Command("Set-GPRegistryValue");
@ -1196,19 +1324,46 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private string CreatePolicy(Runspace runspace, string organizationId, string gpoName, DirectoryEntry entry, string collectionName)
private void CreateHelpDeskPolicy(Runspace runspace, DirectoryEntry entry, DirectoryEntry collectionComputersEntry, string organizationId, string collectionName)
{
string gpoName = string.Format("{0}-HelpDesk", collectionName);
string gpoId = GetPolicyId(runspace, gpoName);
if (string.IsNullOrEmpty(gpoId))
{
gpoId = CreateAndLinkPolicy(runspace, gpoName, organizationId, collectionName);
SetPolicyPermissions(runspace, gpoName, entry, collectionComputersEntry);
SetRegistryValue(runspace, RDSSessionGpoKey, gpoName, "2", RDSSessionGpoValueName, "DWord");
}
else
{
CheckPolicySecurityFiltering(runspace, gpoName, collectionComputersEntry);
}
}
private string CreatePolicy(Runspace runspace, string organizationId, string gpoName, DirectoryEntry entry, DirectoryEntry collectionComputersEntry, string collectionName)
{
string gpoId = GetPolicyId(runspace, gpoName);
if (string.IsNullOrEmpty(gpoId))
{
gpoId = CreateAndLinkPolicy(runspace, gpoName, organizationId, collectionName);
SetPolicyPermissions(runspace, gpoName, entry);
SetPolicyPermissions(runspace, gpoName, entry, collectionComputersEntry);
}
else
{
CheckPolicySecurityFiltering(runspace, gpoName, collectionComputersEntry);
}
return gpoId;
}
private void DeleteHelpDeskPolicy(Runspace runspace, string collectionName)
{
string gpoName = string.Format("{0}-HelpDesk", collectionName);
DeleteGpo(runspace, gpoName);
}
private void DeleteGpo(Runspace runspace, string gpoName)
{
Command cmd = new Command("Remove-GPO");
@ -1217,12 +1372,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private void SetPolicyPermissions(Runspace runspace, string gpoName, DirectoryEntry entry)
private void SetPolicyPermissions(Runspace runspace, string gpoName, DirectoryEntry entry, DirectoryEntry collectionComputersEntry)
{
var scripts = new List<string>
{
string.Format("Set-GPPermissions -Name {0} -Replace -PermissionLevel None -TargetName 'Authenticated Users' -TargetType group", gpoName),
string.Format("Set-GPPermissions -Name {0} -PermissionLevel gpoapply -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(entry, "sAMAccountName").ToString()))
string.Format("Set-GPPermissions -Name {0} -PermissionLevel gpoapply -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(entry, "sAMAccountName").ToString())),
string.Format("Set-GPPermissions -Name {0} -PermissionLevel gpoapply -TargetName {1} -TargetType group", gpoName, string.Format("'{0}'", ActiveDirectoryUtils.GetADObjectProperty(collectionComputersEntry, "sAMAccountName").ToString()))
};
object[] errors = null;
@ -1235,7 +1391,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
try
{
var entry = new DirectoryEntry(GetCollectionOUPath(organizationId, string.Format("{0}-OU", collectionName)));
var entry = new DirectoryEntry(GetOrganizationPath(organizationId));
var distinguishedName = string.Format("\"{0}\"", ActiveDirectoryUtils.GetADObjectProperty(entry, "DistinguishedName"));
Command cmd = new Command("New-GPO");
@ -1294,6 +1450,32 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#endregion
#region Shadow Session
public void ShadowSession(string sessionId, bool control)
{
Runspace runspace = null;
try
{
runspace = OpenRunspace();
var scripts = new List<string>
{
string.Format("mstsc /Shadow:{0}{1}", sessionId, control ? " /Control" : "")
};
object[] errors = null;
ExecuteShellCommand(runspace, scripts, out errors);
}
finally
{
CloseRunspace(runspace);
}
}
#endregion
#region RDS Help Desk
private string GetHelpDeskGroupPath(string groupName)

View file

@ -20,5 +20,8 @@ namespace WebsitePanel.Providers.Virtualization
public const Int64 Size1G = 0x40000000;
public const Int64 Size1M = 0x100000;
public const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary";
public const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary";
}
}

View file

@ -36,6 +36,10 @@ namespace WebsitePanel.Providers.Virtualization
{
return obj.Members[name].Value == null ? "" : obj.Members[name].Value.ToString();
}
public static bool GetBool(this PSObject obj, string name)
{
return Convert.ToBoolean(obj.Members[name].Value);
}
#endregion

View file

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Threading.Tasks;
namespace WebsitePanel.Providers.Virtualization
{
public static class MemoryHelper
{
public static DynamicMemory GetDynamicMemory(PowerShellManager powerShell, string vmName)
{
DynamicMemory info = null;
Command cmd = new Command("Get-VMMemory");
cmd.Parameters.Add("VMName", vmName);
Collection<PSObject> result = powerShell.Execute(cmd);
if (result != null && result.Count > 0)
{
info = new DynamicMemory();
info.Enabled = result[0].GetBool("DynamicMemoryEnabled");
info.Minimum = Convert.ToInt32(result[0].GetLong("Minimum") / Constants.Size1M);
info.Maximum = Convert.ToInt32(result[0].GetLong("Maximum") / Constants.Size1M);
info.Buffer = Convert.ToInt32(result[0].GetInt("Buffer"));
info.Priority = Convert.ToInt32(result[0].GetInt("Priority"));
}
return info;
}
public static void Update(PowerShellManager powerShell, VirtualMachine vm, int ramMb, DynamicMemory dynamicMemory)
{
Command cmd = new Command("Set-VMMemory");
cmd.Parameters.Add("VMName", vm.Name);
cmd.Parameters.Add("StartupBytes", ramMb * Constants.Size1M);
if (dynamicMemory != null && dynamicMemory.Enabled)
{
cmd.Parameters.Add("DynamicMemoryEnabled", true);
cmd.Parameters.Add("MinimumBytes", dynamicMemory.Minimum * Constants.Size1M);
cmd.Parameters.Add("MaximumBytes", dynamicMemory.Maximum * Constants.Size1M);
cmd.Parameters.Add("Buffer", dynamicMemory.Buffer);
cmd.Parameters.Add("Priority", dynamicMemory.Priority);
}
else
{
cmd.Parameters.Add("DynamicMemoryEnabled", false);
}
powerShell.Execute(cmd, true);
}
}
}

View file

@ -34,7 +34,6 @@ namespace WebsitePanel.Providers.Virtualization
public static int GetVMProcessors(PowerShellManager powerShell, string name)
{
int procs = 0;
Command cmd = new Command("Get-VMProcessor");
@ -50,48 +49,17 @@ namespace WebsitePanel.Providers.Virtualization
return procs;
}
public static MemoryInfo GetVMMemory(PowerShellManager powerShell, string name)
{
MemoryInfo info = new MemoryInfo();
Command cmd = new Command("Get-VMMemory");
cmd.Parameters.Add("VMName", name);
Collection<PSObject> result = powerShell.Execute(cmd, true);
if (result != null && result.Count > 0)
{
info.DynamicMemoryEnabled = Convert.ToBoolean(result[0].GetProperty("DynamicMemoryEnabled"));
info.Startup = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Startup")) / Constants.Size1M);
info.Minimum = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Minimum")) / Constants.Size1M);
info.Maximum = Convert.ToInt32(Convert.ToInt64(result[0].GetProperty("Maximum")) / Constants.Size1M);
info.Buffer = Convert.ToInt32(result[0].GetProperty("Buffer"));
info.Priority = Convert.ToInt32(result[0].GetProperty("Priority"));
}
return info;
}
public static void UpdateProcessors(PowerShellManager powerShell, VirtualMachine vm, int cpuCores, int cpuLimitSettings, int cpuReserveSettings, int cpuWeightSettings)
{
Command cmd = new Command("Set-VMProcessor");
cmd.Parameters.Add("VMName", vm.Name);
cmd.Parameters.Add("Count", cpuCores);
cmd.Parameters.Add("Maximum", Convert.ToInt64(cpuLimitSettings * 1000));
cmd.Parameters.Add("Reserve", Convert.ToInt64(cpuReserveSettings * 1000));
cmd.Parameters.Add("Maximum", cpuLimitSettings);
cmd.Parameters.Add("Reserve", cpuReserveSettings);
cmd.Parameters.Add("RelativeWeight", cpuWeightSettings);
powerShell.Execute(cmd, true);
}
public static void UpdateMemory(PowerShellManager powerShell, VirtualMachine vm, long ramMB)
{
Command cmd = new Command("Set-VMMemory");
cmd.Parameters.Add("VMName", vm.Name);
cmd.Parameters.Add("StartupBytes", ramMB * Constants.Size1M);
powerShell.Execute(cmd, true);
}
}
}

View file

@ -143,34 +143,31 @@ namespace WebsitePanel.Providers.Virtualization
try
{
Command cmd = new Command("Get-VM");
cmd.Parameters.Add("Id", vmId);
Collection<PSObject> result = PowerShell.Execute(cmd, true);
if (result != null && result.Count > 0)
{
vm.Name = result[0].GetProperty("Name").ToString();
vm.Name = result[0].GetString("Name");
vm.State = result[0].GetEnum<VirtualMachineState>("State");
vm.CpuUsage = ConvertNullableToInt32(result[0].GetProperty("CpuUsage"));
// This does not truly give the RAM usage, only the memory assigned to the VPS
// Lets handle detection of total memory and usage else where. SetUsagesFromKVP method have been made for it.
vm.RamUsage = Convert.ToInt32(ConvertNullableToInt64(result[0].GetProperty("MemoryAssigned")) / Constants.Size1M);
vm.RamSize = Convert.ToInt32(ConvertNullableToInt64(result[0].GetProperty("MemoryStartup")) / Constants.Size1M);
vm.Uptime = Convert.ToInt64(result[0].GetProperty<TimeSpan>("UpTime").TotalMilliseconds);
vm.Status = result[0].GetProperty("Status").ToString();
vm.ReplicationState = result[0].GetProperty("ReplicationState").ToString();
vm.Generation = result[0].GetInt("Generation");
vm.ProcessorCount = result[0].GetInt("ProcessorCount");
vm.ParentSnapshotId = result[0].GetString("ParentSnapshotId");
vm.Heartbeat = VirtualMachineHelper.GetVMHeartBeatStatus(PowerShell, vm.Name);
vm.CreatedDate = DateTime.Now;
if (extendedInfo)
{
vm.CpuCores = VirtualMachineHelper.GetVMProcessors(PowerShell, vm.Name);
MemoryInfo memoryInfo = VirtualMachineHelper.GetVMMemory(PowerShell, vm.Name);
vm.RamSize = memoryInfo.Startup;
// BIOS
BiosInfo biosInfo = BiosHelper.Get(PowerShell, vm.Name, vm.Generation);
vm.NumLockEnabled = biosInfo.NumLockEnabled;
@ -192,6 +189,11 @@ namespace WebsitePanel.Providers.Virtualization
// network adapters
vm.Adapters = NetworkAdapterHelper.Get(PowerShell, vm.Name);
}
vm.DynamicMemory = MemoryHelper.GetDynamicMemory(PowerShell, vm.Name);
// If it is possible get usage ram and usage hdd data from KVP
SetUsagesFromKVP(ref vm);
}
}
catch (Exception ex)
@ -365,7 +367,7 @@ namespace WebsitePanel.Providers.Virtualization
DvdDriveHelper.Update(PowerShell, realVm, vm.DvdDriveInstalled); // Dvd should be before bios because bios sets boot order
BiosHelper.Update(PowerShell, realVm, vm.BootFromCD, vm.NumLockEnabled);
VirtualMachineHelper.UpdateProcessors(PowerShell, realVm, vm.CpuCores, CpuLimitSettings, CpuReserveSettings, CpuWeightSettings);
VirtualMachineHelper.UpdateMemory(PowerShell, realVm, vm.RamSize);
MemoryHelper.Update(PowerShell, realVm, vm.RamSize, vm.DynamicMemory);
NetworkAdapterHelper.Update(PowerShell, vm);
}
catch (Exception ex)
@ -504,19 +506,21 @@ namespace WebsitePanel.Providers.Virtualization
if (vm.State != VirtualMachineState.Saved && vm.State != VirtualMachineState.Off)
throw new Exception("The virtual computer system must be in the powered off or saved state prior to calling Destroy method.");
// Delete network adapters and network switchesw
// Delete network adapters and network switches
foreach (var networkAdapter in vm.Adapters)
{
NetworkAdapterHelper.Delete(PowerShell, vm.Name, networkAdapter);
if (!string.IsNullOrEmpty(networkAdapter.SwitchName))
DeleteSwitch(networkAdapter.SwitchName);
// If more than 1 VM are assigned to the same switch, deleting the virtual machine also deletes the switch which takes other VM instances off line
// There may be a reason for this that I am not aware of?
//if (!string.IsNullOrEmpty(networkAdapter.SwitchName))
//DeleteSwitch(networkAdapter.SwitchName);
}
Command cmdSet = new Command("Remove-VM");
cmdSet.Parameters.Add("Name", vm.Name);
cmdSet.Parameters.Add("Force");
PowerShell.Execute(cmdSet, false, true);
PowerShell.Execute(cmdSet, true, true);
return JobHelper.CreateSuccessResult(ReturnCode.JobStarted);
}
@ -782,10 +786,11 @@ namespace WebsitePanel.Providers.Virtualization
Command cmd = new Command("Get-VMSwitch");
if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName);
// Not needed as the PowerShellManager adds the computer name
//if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName);
if (!string.IsNullOrEmpty(type)) cmd.Parameters.Add("SwitchType", type);
Collection<PSObject> result = PowerShell.Execute(cmd, false, true);
Collection<PSObject> result = PowerShell.Execute(cmd, true, true);
foreach (PSObject current in result)
{
@ -1797,6 +1802,40 @@ namespace WebsitePanel.Providers.Virtualization
return jobCompleted;
}
private void SetUsagesFromKVP(ref VirtualMachine vm)
{
// Use the WebsitePanel VMConfig Windows service to get the RAM usage as well as the HDD usage / sizes
List<KvpExchangeDataItem> vmKvps = GetKVPItems(vm.VirtualMachineId);
foreach (KvpExchangeDataItem vmKvp in vmKvps)
{
// RAM
if (vmKvp.Name == Constants.KVP_RAM_SUMMARY_KEY)
{
string[] ram = vmKvp.Data.Split(':');
int freeRam = Int32.Parse(ram[0]);
int availRam = Int32.Parse(ram[1]);
vm.RamUsage = availRam - freeRam;
}
// HDD
if (vmKvp.Name == Constants.KVP_HDD_SUMMARY_KEY)
{
string[] disksArray = vmKvp.Data.Split(';');
vm.HddLogicalDisks = new LogicalDisk[disksArray.Length];
for (int i = 0; i < disksArray.Length; i++)
{
string[] disk = disksArray[i].Split(':');
vm.HddLogicalDisks[i] = new LogicalDisk
{
DriveLetter = disk[0],
FreeSpace = Int32.Parse(disk[1]),
Size = Int32.Parse(disk[2])
};
}
}
}
}
#endregion
#region Remote File Methods

View file

@ -4,8 +4,6 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Threading.Tasks;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Virtualization
@ -65,7 +63,6 @@ namespace WebsitePanel.Providers.Virtualization
public Collection<PSObject> Execute(Command cmd, bool addComputerNameParameter)
{
object[] errors;
return Execute(cmd, addComputerNameParameter, false);
}

View file

@ -57,6 +57,7 @@
<Compile Include="Extensions\PSObjectExtension.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
<Compile Include="Helpers\BiosHelper.cs" />
<Compile Include="Helpers\MemoryHelper.cs" />
<Compile Include="Helpers\VdsHelper.cs" />
<Compile Include="Helpers\HardDriveHelper.cs" />
<Compile Include="Helpers\NetworkAdapterHelper.cs" />

View file

@ -11,10 +11,6 @@
//
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//
using WebsitePanel.Providers.OS;
using WebsitePanel.Providers.Web;
namespace WebsitePanel.Providers.EnterpriseStorage {
using System.Xml.Serialization;
using System.Web.Services;
@ -22,6 +18,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage {
using System.Web.Services.Protocols;
using System;
using System.Diagnostics;
using WebsitePanel.Providers.OS;
using WebsitePanel.Providers.Web;
/// <remarks/>
@ -36,6 +34,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage {
private System.Threading.SendOrPostCallback GetFoldersOperationCompleted;
private System.Threading.SendOrPostCallback GetFoldersWithoutFrsmOperationCompleted;
private System.Threading.SendOrPostCallback GetFolderOperationCompleted;
private System.Threading.SendOrPostCallback CreateFolderOperationCompleted;
@ -60,6 +60,9 @@ namespace WebsitePanel.Providers.EnterpriseStorage {
/// <remarks/>
public event GetFoldersCompletedEventHandler GetFoldersCompleted;
/// <remarks/>
public event GetFoldersWithoutFrsmCompletedEventHandler GetFoldersWithoutFrsmCompleted;
/// <remarks/>
public event GetFolderCompletedEventHandler GetFolderCompleted;
@ -129,6 +132,51 @@ namespace WebsitePanel.Providers.EnterpriseStorage {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFoldersWithoutFrsm", 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 SystemFile[] GetFoldersWithoutFrsm(string organizationId, WebDavSetting[] settings) {
object[] results = this.Invoke("GetFoldersWithoutFrsm", new object[] {
organizationId,
settings});
return ((SystemFile[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetFoldersWithoutFrsm(string organizationId, WebDavSetting[] settings, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetFoldersWithoutFrsm", new object[] {
organizationId,
settings}, callback, asyncState);
}
/// <remarks/>
public SystemFile[] EndGetFoldersWithoutFrsm(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((SystemFile[])(results[0]));
}
/// <remarks/>
public void GetFoldersWithoutFrsmAsync(string organizationId, WebDavSetting[] settings) {
this.GetFoldersWithoutFrsmAsync(organizationId, settings, null);
}
/// <remarks/>
public void GetFoldersWithoutFrsmAsync(string organizationId, WebDavSetting[] settings, object userState) {
if ((this.GetFoldersWithoutFrsmOperationCompleted == null)) {
this.GetFoldersWithoutFrsmOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFoldersWithoutFrsmOperationCompleted);
}
this.InvokeAsync("GetFoldersWithoutFrsm", new object[] {
organizationId,
settings}, this.GetFoldersWithoutFrsmOperationCompleted, userState);
}
private void OnGetFoldersWithoutFrsmOperationCompleted(object arg) {
if ((this.GetFoldersWithoutFrsmCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetFoldersWithoutFrsmCompleted(this, new GetFoldersWithoutFrsmCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -544,6 +592,32 @@ namespace WebsitePanel.Providers.EnterpriseStorage {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetFoldersWithoutFrsmCompletedEventHandler(object sender, GetFoldersWithoutFrsmCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetFoldersWithoutFrsmCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetFoldersWithoutFrsmCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public SystemFile[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((SystemFile[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetFolderCompletedEventHandler(object sender, GetFolderCompletedEventArgs e);

View file

@ -0,0 +1,926 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.8657
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//
namespace WebsitePanel.Providers.HostedSolution {
using System.Xml.Serialization;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Diagnostics;
using WebsitePanel.Providers.SharePoint;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="HostedSharePointServerEntSoap", Namespace="http://smbsaas/websitepanel/server/")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class HostedSharePointServerEnt : Microsoft.Web.Services3.WebServicesClientProtocol {
public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue;
private System.Threading.SendOrPostCallback Enterprise_GetSupportedLanguagesOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_GetSiteCollectionsOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_GetSiteCollectionOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_CreateSiteCollectionOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_UpdateQuotasOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_DeleteSiteCollectionOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_BackupSiteCollectionOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_RestoreSiteCollectionOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_GetTempFileBinaryChunkOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_AppendTempFileBinaryChunkOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_GetSiteCollectionSizeOperationCompleted;
private System.Threading.SendOrPostCallback Enterprise_SetPeoplePickerOuOperationCompleted;
/// <remarks/>
public HostedSharePointServerEnt() {
this.Url = "http://localhost:9003/HostedSharePointServerEnt.asmx";
}
/// <remarks/>
public event Enterprise_GetSupportedLanguagesCompletedEventHandler Enterprise_GetSupportedLanguagesCompleted;
/// <remarks/>
public event Enterprise_GetSiteCollectionsCompletedEventHandler Enterprise_GetSiteCollectionsCompleted;
/// <remarks/>
public event Enterprise_GetSiteCollectionCompletedEventHandler Enterprise_GetSiteCollectionCompleted;
/// <remarks/>
public event Enterprise_CreateSiteCollectionCompletedEventHandler Enterprise_CreateSiteCollectionCompleted;
/// <remarks/>
public event Enterprise_UpdateQuotasCompletedEventHandler Enterprise_UpdateQuotasCompleted;
/// <remarks/>
public event Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventHandler Enterprise_CalculateSiteCollectionsDiskSpaceCompleted;
/// <remarks/>
public event Enterprise_DeleteSiteCollectionCompletedEventHandler Enterprise_DeleteSiteCollectionCompleted;
/// <remarks/>
public event Enterprise_BackupSiteCollectionCompletedEventHandler Enterprise_BackupSiteCollectionCompleted;
/// <remarks/>
public event Enterprise_RestoreSiteCollectionCompletedEventHandler Enterprise_RestoreSiteCollectionCompleted;
/// <remarks/>
public event Enterprise_GetTempFileBinaryChunkCompletedEventHandler Enterprise_GetTempFileBinaryChunkCompleted;
/// <remarks/>
public event Enterprise_AppendTempFileBinaryChunkCompletedEventHandler Enterprise_AppendTempFileBinaryChunkCompleted;
/// <remarks/>
public event Enterprise_GetSiteCollectionSizeCompletedEventHandler Enterprise_GetSiteCollectionSizeCompleted;
/// <remarks/>
public event Enterprise_SetPeoplePickerOuCompletedEventHandler Enterprise_SetPeoplePickerOuCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_GetSupportedLanguages", 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 int[] Enterprise_GetSupportedLanguages() {
object[] results = this.Invoke("Enterprise_GetSupportedLanguages", new object[0]);
return ((int[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_GetSupportedLanguages(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_GetSupportedLanguages", new object[0], callback, asyncState);
}
/// <remarks/>
public int[] EndEnterprise_GetSupportedLanguages(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int[])(results[0]));
}
/// <remarks/>
public void Enterprise_GetSupportedLanguagesAsync() {
this.Enterprise_GetSupportedLanguagesAsync(null);
}
/// <remarks/>
public void Enterprise_GetSupportedLanguagesAsync(object userState) {
if ((this.Enterprise_GetSupportedLanguagesOperationCompleted == null)) {
this.Enterprise_GetSupportedLanguagesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_GetSupportedLanguagesOperationCompleted);
}
this.InvokeAsync("Enterprise_GetSupportedLanguages", new object[0], this.Enterprise_GetSupportedLanguagesOperationCompleted, userState);
}
private void OnEnterprise_GetSupportedLanguagesOperationCompleted(object arg) {
if ((this.Enterprise_GetSupportedLanguagesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_GetSupportedLanguagesCompleted(this, new Enterprise_GetSupportedLanguagesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_GetSiteCollections", 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 SharePointEnterpriseSiteCollection[] Enterprise_GetSiteCollections() {
object[] results = this.Invoke("Enterprise_GetSiteCollections", new object[0]);
return ((SharePointEnterpriseSiteCollection[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_GetSiteCollections(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_GetSiteCollections", new object[0], callback, asyncState);
}
/// <remarks/>
public SharePointEnterpriseSiteCollection[] EndEnterprise_GetSiteCollections(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((SharePointEnterpriseSiteCollection[])(results[0]));
}
/// <remarks/>
public void Enterprise_GetSiteCollectionsAsync() {
this.Enterprise_GetSiteCollectionsAsync(null);
}
/// <remarks/>
public void Enterprise_GetSiteCollectionsAsync(object userState) {
if ((this.Enterprise_GetSiteCollectionsOperationCompleted == null)) {
this.Enterprise_GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_GetSiteCollectionsOperationCompleted);
}
this.InvokeAsync("Enterprise_GetSiteCollections", new object[0], this.Enterprise_GetSiteCollectionsOperationCompleted, userState);
}
private void OnEnterprise_GetSiteCollectionsOperationCompleted(object arg) {
if ((this.Enterprise_GetSiteCollectionsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_GetSiteCollectionsCompleted(this, new Enterprise_GetSiteCollectionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_GetSiteCollection", 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 SharePointEnterpriseSiteCollection Enterprise_GetSiteCollection(string url) {
object[] results = this.Invoke("Enterprise_GetSiteCollection", new object[] {
url});
return ((SharePointEnterpriseSiteCollection)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_GetSiteCollection(string url, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_GetSiteCollection", new object[] {
url}, callback, asyncState);
}
/// <remarks/>
public SharePointEnterpriseSiteCollection EndEnterprise_GetSiteCollection(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((SharePointEnterpriseSiteCollection)(results[0]));
}
/// <remarks/>
public void Enterprise_GetSiteCollectionAsync(string url) {
this.Enterprise_GetSiteCollectionAsync(url, null);
}
/// <remarks/>
public void Enterprise_GetSiteCollectionAsync(string url, object userState) {
if ((this.Enterprise_GetSiteCollectionOperationCompleted == null)) {
this.Enterprise_GetSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_GetSiteCollectionOperationCompleted);
}
this.InvokeAsync("Enterprise_GetSiteCollection", new object[] {
url}, this.Enterprise_GetSiteCollectionOperationCompleted, userState);
}
private void OnEnterprise_GetSiteCollectionOperationCompleted(object arg) {
if ((this.Enterprise_GetSiteCollectionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_GetSiteCollectionCompleted(this, new Enterprise_GetSiteCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_CreateSiteCollection", 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 Enterprise_CreateSiteCollection(SharePointEnterpriseSiteCollection siteCollection) {
this.Invoke("Enterprise_CreateSiteCollection", new object[] {
siteCollection});
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_CreateSiteCollection(SharePointEnterpriseSiteCollection siteCollection, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_CreateSiteCollection", new object[] {
siteCollection}, callback, asyncState);
}
/// <remarks/>
public void EndEnterprise_CreateSiteCollection(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void Enterprise_CreateSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection) {
this.Enterprise_CreateSiteCollectionAsync(siteCollection, null);
}
/// <remarks/>
public void Enterprise_CreateSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection, object userState) {
if ((this.Enterprise_CreateSiteCollectionOperationCompleted == null)) {
this.Enterprise_CreateSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_CreateSiteCollectionOperationCompleted);
}
this.InvokeAsync("Enterprise_CreateSiteCollection", new object[] {
siteCollection}, this.Enterprise_CreateSiteCollectionOperationCompleted, userState);
}
private void OnEnterprise_CreateSiteCollectionOperationCompleted(object arg) {
if ((this.Enterprise_CreateSiteCollectionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_CreateSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_UpdateQuotas", 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 Enterprise_UpdateQuotas(string url, long maxSize, long warningSize) {
this.Invoke("Enterprise_UpdateQuotas", new object[] {
url,
maxSize,
warningSize});
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_UpdateQuotas(string url, long maxSize, long warningSize, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_UpdateQuotas", new object[] {
url,
maxSize,
warningSize}, callback, asyncState);
}
/// <remarks/>
public void EndEnterprise_UpdateQuotas(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void Enterprise_UpdateQuotasAsync(string url, long maxSize, long warningSize) {
this.Enterprise_UpdateQuotasAsync(url, maxSize, warningSize, null);
}
/// <remarks/>
public void Enterprise_UpdateQuotasAsync(string url, long maxSize, long warningSize, object userState) {
if ((this.Enterprise_UpdateQuotasOperationCompleted == null)) {
this.Enterprise_UpdateQuotasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_UpdateQuotasOperationCompleted);
}
this.InvokeAsync("Enterprise_UpdateQuotas", new object[] {
url,
maxSize,
warningSize}, this.Enterprise_UpdateQuotasOperationCompleted, userState);
}
private void OnEnterprise_UpdateQuotasOperationCompleted(object arg) {
if ((this.Enterprise_UpdateQuotasCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_UpdateQuotasCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_CalculateSiteCollectionsDiskSpace", 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 SharePointSiteDiskSpace[] Enterprise_CalculateSiteCollectionsDiskSpace(string[] urls) {
object[] results = this.Invoke("Enterprise_CalculateSiteCollectionsDiskSpace", new object[] {
urls});
return ((SharePointSiteDiskSpace[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_CalculateSiteCollectionsDiskSpace(string[] urls, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_CalculateSiteCollectionsDiskSpace", new object[] {
urls}, callback, asyncState);
}
/// <remarks/>
public SharePointSiteDiskSpace[] EndEnterprise_CalculateSiteCollectionsDiskSpace(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((SharePointSiteDiskSpace[])(results[0]));
}
/// <remarks/>
public void Enterprise_CalculateSiteCollectionsDiskSpaceAsync(string[] urls) {
this.Enterprise_CalculateSiteCollectionsDiskSpaceAsync(urls, null);
}
/// <remarks/>
public void Enterprise_CalculateSiteCollectionsDiskSpaceAsync(string[] urls, object userState) {
if ((this.Enterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted == null)) {
this.Enterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted);
}
this.InvokeAsync("Enterprise_CalculateSiteCollectionsDiskSpace", new object[] {
urls}, this.Enterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted, userState);
}
private void OnEnterprise_CalculateSiteCollectionsDiskSpaceOperationCompleted(object arg) {
if ((this.Enterprise_CalculateSiteCollectionsDiskSpaceCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_CalculateSiteCollectionsDiskSpaceCompleted(this, new Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_DeleteSiteCollection", 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 Enterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection siteCollection) {
this.Invoke("Enterprise_DeleteSiteCollection", new object[] {
siteCollection});
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection siteCollection, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_DeleteSiteCollection", new object[] {
siteCollection}, callback, asyncState);
}
/// <remarks/>
public void EndEnterprise_DeleteSiteCollection(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void Enterprise_DeleteSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection) {
this.Enterprise_DeleteSiteCollectionAsync(siteCollection, null);
}
/// <remarks/>
public void Enterprise_DeleteSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection, object userState) {
if ((this.Enterprise_DeleteSiteCollectionOperationCompleted == null)) {
this.Enterprise_DeleteSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_DeleteSiteCollectionOperationCompleted);
}
this.InvokeAsync("Enterprise_DeleteSiteCollection", new object[] {
siteCollection}, this.Enterprise_DeleteSiteCollectionOperationCompleted, userState);
}
private void OnEnterprise_DeleteSiteCollectionOperationCompleted(object arg) {
if ((this.Enterprise_DeleteSiteCollectionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_DeleteSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_BackupSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string Enterprise_BackupSiteCollection(string url, string filename, bool zip) {
object[] results = this.Invoke("Enterprise_BackupSiteCollection", new object[] {
url,
filename,
zip});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_BackupSiteCollection(string url, string filename, bool zip, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_BackupSiteCollection", new object[] {
url,
filename,
zip}, callback, asyncState);
}
/// <remarks/>
public string EndEnterprise_BackupSiteCollection(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void Enterprise_BackupSiteCollectionAsync(string url, string filename, bool zip) {
this.Enterprise_BackupSiteCollectionAsync(url, filename, zip, null);
}
/// <remarks/>
public void Enterprise_BackupSiteCollectionAsync(string url, string filename, bool zip, object userState) {
if ((this.Enterprise_BackupSiteCollectionOperationCompleted == null)) {
this.Enterprise_BackupSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_BackupSiteCollectionOperationCompleted);
}
this.InvokeAsync("Enterprise_BackupSiteCollection", new object[] {
url,
filename,
zip}, this.Enterprise_BackupSiteCollectionOperationCompleted, userState);
}
private void OnEnterprise_BackupSiteCollectionOperationCompleted(object arg) {
if ((this.Enterprise_BackupSiteCollectionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_BackupSiteCollectionCompleted(this, new Enterprise_BackupSiteCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_RestoreSiteCollection", 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 Enterprise_RestoreSiteCollection(SharePointEnterpriseSiteCollection siteCollection, string filename) {
this.Invoke("Enterprise_RestoreSiteCollection", new object[] {
siteCollection,
filename});
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_RestoreSiteCollection(SharePointEnterpriseSiteCollection siteCollection, string filename, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_RestoreSiteCollection", new object[] {
siteCollection,
filename}, callback, asyncState);
}
/// <remarks/>
public void EndEnterprise_RestoreSiteCollection(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void Enterprise_RestoreSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection, string filename) {
this.Enterprise_RestoreSiteCollectionAsync(siteCollection, filename, null);
}
/// <remarks/>
public void Enterprise_RestoreSiteCollectionAsync(SharePointEnterpriseSiteCollection siteCollection, string filename, object userState) {
if ((this.Enterprise_RestoreSiteCollectionOperationCompleted == null)) {
this.Enterprise_RestoreSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_RestoreSiteCollectionOperationCompleted);
}
this.InvokeAsync("Enterprise_RestoreSiteCollection", new object[] {
siteCollection,
filename}, this.Enterprise_RestoreSiteCollectionOperationCompleted, userState);
}
private void OnEnterprise_RestoreSiteCollectionOperationCompleted(object arg) {
if ((this.Enterprise_RestoreSiteCollectionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_RestoreSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_GetTempFileBinaryChunk", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
public byte[] Enterprise_GetTempFileBinaryChunk(string path, int offset, int length) {
object[] results = this.Invoke("Enterprise_GetTempFileBinaryChunk", new object[] {
path,
offset,
length});
return ((byte[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_GetTempFileBinaryChunk(string path, int offset, int length, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_GetTempFileBinaryChunk", new object[] {
path,
offset,
length}, callback, asyncState);
}
/// <remarks/>
public byte[] EndEnterprise_GetTempFileBinaryChunk(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((byte[])(results[0]));
}
/// <remarks/>
public void Enterprise_GetTempFileBinaryChunkAsync(string path, int offset, int length) {
this.Enterprise_GetTempFileBinaryChunkAsync(path, offset, length, null);
}
/// <remarks/>
public void Enterprise_GetTempFileBinaryChunkAsync(string path, int offset, int length, object userState) {
if ((this.Enterprise_GetTempFileBinaryChunkOperationCompleted == null)) {
this.Enterprise_GetTempFileBinaryChunkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_GetTempFileBinaryChunkOperationCompleted);
}
this.InvokeAsync("Enterprise_GetTempFileBinaryChunk", new object[] {
path,
offset,
length}, this.Enterprise_GetTempFileBinaryChunkOperationCompleted, userState);
}
private void OnEnterprise_GetTempFileBinaryChunkOperationCompleted(object arg) {
if ((this.Enterprise_GetTempFileBinaryChunkCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_GetTempFileBinaryChunkCompleted(this, new Enterprise_GetTempFileBinaryChunkCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_AppendTempFileBinaryChunk", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string Enterprise_AppendTempFileBinaryChunk(string fileName, string path, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] chunk) {
object[] results = this.Invoke("Enterprise_AppendTempFileBinaryChunk", new object[] {
fileName,
path,
chunk});
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_AppendTempFileBinaryChunk", new object[] {
fileName,
path,
chunk}, callback, asyncState);
}
/// <remarks/>
public string EndEnterprise_AppendTempFileBinaryChunk(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
public void Enterprise_AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk) {
this.Enterprise_AppendTempFileBinaryChunkAsync(fileName, path, chunk, null);
}
/// <remarks/>
public void Enterprise_AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk, object userState) {
if ((this.Enterprise_AppendTempFileBinaryChunkOperationCompleted == null)) {
this.Enterprise_AppendTempFileBinaryChunkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_AppendTempFileBinaryChunkOperationCompleted);
}
this.InvokeAsync("Enterprise_AppendTempFileBinaryChunk", new object[] {
fileName,
path,
chunk}, this.Enterprise_AppendTempFileBinaryChunkOperationCompleted, userState);
}
private void OnEnterprise_AppendTempFileBinaryChunkOperationCompleted(object arg) {
if ((this.Enterprise_AppendTempFileBinaryChunkCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_AppendTempFileBinaryChunkCompleted(this, new Enterprise_AppendTempFileBinaryChunkCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_GetSiteCollectionSize", 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 long Enterprise_GetSiteCollectionSize(string url) {
object[] results = this.Invoke("Enterprise_GetSiteCollectionSize", new object[] {
url});
return ((long)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_GetSiteCollectionSize(string url, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_GetSiteCollectionSize", new object[] {
url}, callback, asyncState);
}
/// <remarks/>
public long EndEnterprise_GetSiteCollectionSize(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((long)(results[0]));
}
/// <remarks/>
public void Enterprise_GetSiteCollectionSizeAsync(string url) {
this.Enterprise_GetSiteCollectionSizeAsync(url, null);
}
/// <remarks/>
public void Enterprise_GetSiteCollectionSizeAsync(string url, object userState) {
if ((this.Enterprise_GetSiteCollectionSizeOperationCompleted == null)) {
this.Enterprise_GetSiteCollectionSizeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_GetSiteCollectionSizeOperationCompleted);
}
this.InvokeAsync("Enterprise_GetSiteCollectionSize", new object[] {
url}, this.Enterprise_GetSiteCollectionSizeOperationCompleted, userState);
}
private void OnEnterprise_GetSiteCollectionSizeOperationCompleted(object arg) {
if ((this.Enterprise_GetSiteCollectionSizeCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_GetSiteCollectionSizeCompleted(this, new Enterprise_GetSiteCollectionSizeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Enterprise_SetPeoplePickerOu", 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 Enterprise_SetPeoplePickerOu(string site, string ou) {
this.Invoke("Enterprise_SetPeoplePickerOu", new object[] {
site,
ou});
}
/// <remarks/>
public System.IAsyncResult BeginEnterprise_SetPeoplePickerOu(string site, string ou, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Enterprise_SetPeoplePickerOu", new object[] {
site,
ou}, callback, asyncState);
}
/// <remarks/>
public void EndEnterprise_SetPeoplePickerOu(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void Enterprise_SetPeoplePickerOuAsync(string site, string ou) {
this.Enterprise_SetPeoplePickerOuAsync(site, ou, null);
}
/// <remarks/>
public void Enterprise_SetPeoplePickerOuAsync(string site, string ou, object userState) {
if ((this.Enterprise_SetPeoplePickerOuOperationCompleted == null)) {
this.Enterprise_SetPeoplePickerOuOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnterprise_SetPeoplePickerOuOperationCompleted);
}
this.InvokeAsync("Enterprise_SetPeoplePickerOu", new object[] {
site,
ou}, this.Enterprise_SetPeoplePickerOuOperationCompleted, userState);
}
private void OnEnterprise_SetPeoplePickerOuOperationCompleted(object arg) {
if ((this.Enterprise_SetPeoplePickerOuCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.Enterprise_SetPeoplePickerOuCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_GetSupportedLanguagesCompletedEventHandler(object sender, Enterprise_GetSupportedLanguagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_GetSupportedLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((int[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_GetSiteCollectionsCompletedEventHandler(object sender, Enterprise_GetSiteCollectionsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_GetSiteCollectionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public SharePointEnterpriseSiteCollection[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((SharePointEnterpriseSiteCollection[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_GetSiteCollectionCompletedEventHandler(object sender, Enterprise_GetSiteCollectionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_GetSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public SharePointEnterpriseSiteCollection Result {
get {
this.RaiseExceptionIfNecessary();
return ((SharePointEnterpriseSiteCollection)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_CreateSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_UpdateQuotasCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventHandler(object sender, Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_CalculateSiteCollectionsDiskSpaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public SharePointSiteDiskSpace[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((SharePointSiteDiskSpace[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_DeleteSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_BackupSiteCollectionCompletedEventHandler(object sender, Enterprise_BackupSiteCollectionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_BackupSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_RestoreSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_GetTempFileBinaryChunkCompletedEventHandler(object sender, Enterprise_GetTempFileBinaryChunkCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_GetTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_GetTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public byte[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((byte[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_AppendTempFileBinaryChunkCompletedEventHandler(object sender, Enterprise_AppendTempFileBinaryChunkCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_AppendTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_AppendTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_GetSiteCollectionSizeCompletedEventHandler(object sender, Enterprise_GetSiteCollectionSizeCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class Enterprise_GetSiteCollectionSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal Enterprise_GetSiteCollectionSizeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public long Result {
get {
this.RaiseExceptionIfNecessary();
return ((long)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void Enterprise_SetPeoplePickerOuCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

View file

@ -104,6 +104,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback ApplyGPOOperationCompleted;
private System.Threading.SendOrPostCallback ShadowSessionOperationCompleted;
private System.Threading.SendOrPostCallback MoveSessionHostsToCollectionOUOperationCompleted;
/// <remarks/>
public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -220,6 +224,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
public event ApplyGPOCompletedEventHandler ApplyGPOCompleted;
/// <remarks/>
public event ShadowSessionCompletedEventHandler ShadowSessionCompleted;
/// <remarks/>
public event MoveSessionHostsToCollectionOUCompletedEventHandler MoveSessionHostsToCollectionOUCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1791,15 +1801,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ApplyGPO", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void ApplyGPO(string collectionName, RdsServerSettings serverSettings) {
public void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings) {
this.Invoke("ApplyGPO", new object[] {
organizationId,
collectionName,
serverSettings});
}
/// <remarks/>
public System.IAsyncResult BeginApplyGPO(string collectionName, RdsServerSettings serverSettings, System.AsyncCallback callback, object asyncState) {
public System.IAsyncResult BeginApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ApplyGPO", new object[] {
organizationId,
collectionName,
serverSettings}, callback, asyncState);
}
@ -1810,16 +1822,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
/// <remarks/>
public void ApplyGPOAsync(string collectionName, RdsServerSettings serverSettings) {
this.ApplyGPOAsync(collectionName, serverSettings, null);
public void ApplyGPOAsync(string organizationId, string collectionName, RdsServerSettings serverSettings) {
this.ApplyGPOAsync(organizationId, collectionName, serverSettings, null);
}
/// <remarks/>
public void ApplyGPOAsync(string collectionName, RdsServerSettings serverSettings, object userState) {
public void ApplyGPOAsync(string organizationId, string collectionName, RdsServerSettings serverSettings, object userState) {
if ((this.ApplyGPOOperationCompleted == null)) {
this.ApplyGPOOperationCompleted = new System.Threading.SendOrPostCallback(this.OnApplyGPOOperationCompleted);
}
this.InvokeAsync("ApplyGPO", new object[] {
organizationId,
collectionName,
serverSettings}, this.ApplyGPOOperationCompleted, userState);
}
@ -1831,6 +1844,95 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ShadowSession", 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 ShadowSession(string sessionId, bool control) {
this.Invoke("ShadowSession", new object[] {
sessionId,
control});
}
/// <remarks/>
public System.IAsyncResult BeginShadowSession(string sessionId, bool control, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ShadowSession", new object[] {
sessionId,
control}, callback, asyncState);
}
/// <remarks/>
public void EndShadowSession(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void ShadowSessionAsync(string sessionId, bool control) {
this.ShadowSessionAsync(sessionId, control, null);
}
/// <remarks/>
public void ShadowSessionAsync(string sessionId, bool control, object userState) {
if ((this.ShadowSessionOperationCompleted == null)) {
this.ShadowSessionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShadowSessionOperationCompleted);
}
this.InvokeAsync("ShadowSession", new object[] {
sessionId,
control}, this.ShadowSessionOperationCompleted, userState);
}
private void OnShadowSessionOperationCompleted(object arg) {
if ((this.ShadowSessionCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ShadowSessionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/MoveSessionHostsToCollectionOU", 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 MoveSessionHostsToCollectionOU(RdsServer[] servers, string collectionName, string organizationId) {
this.Invoke("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId});
}
/// <remarks/>
public System.IAsyncResult BeginMoveSessionHostsToCollectionOU(RdsServer[] servers, string collectionName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId}, callback, asyncState);
}
/// <remarks/>
public void EndMoveSessionHostsToCollectionOU(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void MoveSessionHostsToCollectionOUAsync(RdsServer[] servers, string collectionName, string organizationId) {
this.MoveSessionHostsToCollectionOUAsync(servers, collectionName, organizationId, null);
}
/// <remarks/>
public void MoveSessionHostsToCollectionOUAsync(RdsServer[] servers, string collectionName, string organizationId, object userState) {
if ((this.MoveSessionHostsToCollectionOUOperationCompleted == null)) {
this.MoveSessionHostsToCollectionOUOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMoveSessionHostsToCollectionOUOperationCompleted);
}
this.InvokeAsync("MoveSessionHostsToCollectionOU", new object[] {
servers,
collectionName,
organizationId}, this.MoveSessionHostsToCollectionOUOperationCompleted, userState);
}
private void OnMoveSessionHostsToCollectionOUOperationCompleted(object arg) {
if ((this.MoveSessionHostsToCollectionOUCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.MoveSessionHostsToCollectionOUCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@ -2468,4 +2570,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ApplyGPOCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ShadowSessionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void MoveSessionHostsToCollectionOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

View file

@ -82,6 +82,7 @@
<Compile Include="ExchangeServerProxy.cs" />
<Compile Include="FtpServerProxy.cs" />
<Compile Include="HeliconZooProxy.cs" />
<Compile Include="HostedSharePointServerEntProxy.cs" />
<Compile Include="HostedSharePointServerProxy.cs" />
<Compile Include="LyncServerProxy.cs" />
<Compile Include="OCSEdgeServerProxy.cs" />

View file

@ -29,6 +29,7 @@
using System;
using System.Diagnostics;
namespace WebsitePanel.Server.Utils
{
/// <summary>
@ -151,5 +152,7 @@ namespace WebsitePanel.Server.Utils
//
return String.Concat(String.Format("[{0:G}] {1}: ", DateTime.Now, tag), message);
}
}
}

View file

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
ProjectSection(SolutionItems) = preProject
@ -152,6 +152,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Virtualization.HyperV2012R2", "WebsitePanel.Providers.Virtualization.HyperV-2012R2\WebsitePanel.Providers.Virtualization.HyperV2012R2.csproj", "{EE40516B-93DF-4CAB-80C4-64DCE0B751CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.HostedSolution.SharePoint2013Ent", "WebsitePanel.Providers.HostedSolution.SharePoint2013Ent\WebsitePanel.Providers.HostedSolution.SharePoint2013Ent.csproj", "{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -762,6 +764,16 @@ Global
{EE40516B-93DF-4CAB-80C4-64DCE0B751CC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EE40516B-93DF-4CAB-80C4-64DCE0B751CC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{EE40516B-93DF-4CAB-80C4-64DCE0B751CC}.Release|x86.ActiveCfg = Release|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Debug|x86.ActiveCfg = Debug|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Release|Any CPU.Build.0 = Release|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0CF0C19E-7BFE-4A61-AF00-7B7CE7264252}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -75,6 +75,23 @@ namespace WebsitePanel.Server
}
}
[WebMethod, SoapHeader("settings")]
public SystemFile[] GetFoldersWithoutFrsm(string organizationId, WebDavSetting[] settings)
{
try
{
Log.WriteStart("'{0}' GetFolders", ProviderSettings.ProviderName);
SystemFile[] result = EnterpriseStorageProvider.GetFoldersWithoutFrsm(organizationId, settings);
Log.WriteEnd("'{0}' GetFolders", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetFolders", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public SystemFile GetFolder(string organizationId, string folder, WebDavSetting setting)
{

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="HostedSharePointServerEnt.asmx.cs" Class="WebsitePanel.Server.HostedSharePointServerEnt" %>

View file

@ -0,0 +1,274 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.ComponentModel;
using System.Web.Services;
using System.Web.Services.Protocols;
using WebsitePanel.Providers;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.SharePoint;
using WebsitePanel.Server.Utils;
using Microsoft.Web.Services3;
namespace WebsitePanel.Server
{
/// <summary>
/// Summary description for HostedSharePointServerEnt
/// </summary>
[WebService(Namespace = "http://smbsaas/websitepanel/server/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[Policy("ServerPolicy")]
[ToolboxItem(false)]
public class HostedSharePointServerEnt : HostingServiceProviderWebService
{
private delegate TReturn Action<TReturn>();
/// <summary>
/// Gets hosted SharePoint provider instance.
/// </summary>
private IHostedSharePointServerEnt HostedSharePointServerEntProvider
{
get { return (IHostedSharePointServerEnt)Provider; }
}
/// <summary>
/// Gets list of supported languages by this installation of SharePoint.
/// </summary>
/// <returns>List of supported languages</returns>
[WebMethod, SoapHeader("settings")]
public int[] Enterprise_GetSupportedLanguages()
{
return ExecuteAction<int[]>(delegate
{
return HostedSharePointServerEntProvider.Enterprise_GetSupportedLanguages();
}, "GetSupportedLanguages");
}
/// <summary>
/// Gets list of SharePoint collections within root web application.
/// </summary>
/// <returns>List of SharePoint collections within root web application.</returns>
[WebMethod, SoapHeader("settings")]
public SharePointEnterpriseSiteCollection[] Enterprise_GetSiteCollections()
{
return ExecuteAction<SharePointEnterpriseSiteCollection[]>(delegate
{
return HostedSharePointServerEntProvider.Enterprise_GetSiteCollections();
}, "GetSiteCollections");
}
/// <summary>
/// Gets SharePoint collection within root web application with given name.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be loaded.</param>
/// <returns>SharePoint collection within root web application with given name.</returns>
[WebMethod, SoapHeader("settings")]
public SharePointEnterpriseSiteCollection Enterprise_GetSiteCollection(string url)
{
return ExecuteAction<SharePointEnterpriseSiteCollection>(delegate
{
return HostedSharePointServerEntProvider.Enterprise_GetSiteCollection(url);
}, "GetSiteCollection");
}
/// <summary>
/// Creates site collection within predefined root web application.
/// </summary>
/// <param name="siteCollection">Information about site coolection to be created.</param>
[WebMethod, SoapHeader("settings")]
public void Enterprise_CreateSiteCollection(SharePointEnterpriseSiteCollection siteCollection)
{
siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin);
ExecuteAction<object>(delegate
{
HostedSharePointServerEntProvider.Enterprise_CreateSiteCollection(siteCollection);
return new object();
}, "CreateSiteCollection");
}
[WebMethod, SoapHeader("settings")]
public void Enterprise_UpdateQuotas(string url, long maxSize, long warningSize)
{
ExecuteAction<object>(delegate
{
HostedSharePointServerEntProvider.Enterprise_UpdateQuotas(url, maxSize, warningSize);
return new object();
}, "UpdateQuotas");
}
[WebMethod, SoapHeader("settings")]
public SharePointSiteDiskSpace[] Enterprise_CalculateSiteCollectionsDiskSpace(string[] urls)
{
SharePointSiteDiskSpace[] ret = null;
ret = ExecuteAction<SharePointSiteDiskSpace[]>(delegate
{
return HostedSharePointServerEntProvider.Enterprise_CalculateSiteCollectionsDiskSpace(urls);
}, "CalculateSiteCollectionDiskSpace");
return ret;
}
/// <summary>
/// Deletes site collection under given url.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
[WebMethod, SoapHeader("settings")]
public void Enterprise_DeleteSiteCollection(SharePointEnterpriseSiteCollection siteCollection)
{
ExecuteAction<object>(delegate
{
HostedSharePointServerEntProvider.Enterprise_DeleteSiteCollection(siteCollection);
return new object();
}, "DeleteSiteCollection");
}
/// <summary>
/// Backups site collection under give url.
/// </summary>
/// <param name="url">Url that uniquely identifies site collection to be deleted.</param>
/// <param name="filename">Resulting backup file name.</param>
/// <param name="zip">A value which shows whether created backup must be archived.</param>
/// <returns>Created backup full path.</returns>
[WebMethod, SoapHeader("settings")]
public string Enterprise_BackupSiteCollection(string url, string filename, bool zip)
{
return ExecuteAction<string>(delegate
{
return
HostedSharePointServerEntProvider.Enterprise_BackupSiteCollection(url, filename, zip);
}, "BackupSiteCollection");
}
/// <summary>
/// Restores site collection under given url from backup.
/// </summary>
/// <param name="siteCollection">Site collection to be restored.</param>
/// <param name="filename">Backup file name to restore from.</param>
[WebMethod, SoapHeader("settings")]
public void Enterprise_RestoreSiteCollection(SharePointEnterpriseSiteCollection siteCollection, string filename)
{
siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin);
ExecuteAction<object>(delegate
{
HostedSharePointServerEntProvider.Enterprise_RestoreSiteCollection(siteCollection, filename);
return new object();
}, "RestoreSiteCollection");
}
/// <summary>
/// Gets binary data chunk of specified size from specified offset.
/// </summary>
/// <param name="path">Path to file to get bunary data chunk from.</param>
/// <param name="offset">Offset from which to start data reading.</param>
/// <param name="length">Binary data chunk length.</param>
/// <returns>Binary data chunk read from file.</returns>
[WebMethod, SoapHeader("settings")]
public byte[] Enterprise_GetTempFileBinaryChunk(string path, int offset, int length)
{
return ExecuteAction<byte[]>(delegate
{
return
HostedSharePointServerEntProvider.Enterprise_GetTempFileBinaryChunk(path, offset, length);
}, "GetTempFileBinaryChunk");
}
/// <summary>
/// Appends supplied binary data chunk to file.
/// </summary>
/// <param name="fileName">Non existent file name to append to.</param>
/// <param name="path">Full path to existent file to append to.</param>
/// <param name="chunk">Binary data chunk to append to.</param>
/// <returns>Path to file that was appended with chunk.</returns>
[WebMethod, SoapHeader("settings")]
public virtual string Enterprise_AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk)
{
return ExecuteAction<string>(delegate
{
return
HostedSharePointServerEntProvider.Enterprise_AppendTempFileBinaryChunk(fileName, path, chunk);
}, "AppendTempFileBinaryChunk");
}
[WebMethod, SoapHeader("settings")]
public long Enterprise_GetSiteCollectionSize(string url)
{
return ExecuteAction<long>(delegate
{
return
HostedSharePointServerEntProvider.Enterprise_GetSiteCollectionSize(url);
}, "GetSiteCollectionSize");
}
[WebMethod, SoapHeader("settings")]
public void Enterprise_SetPeoplePickerOu(string site, string ou)
{
HostedSharePointServerEntProvider.Enterprise_SetPeoplePickerOu(site, ou);
}
/// <summary>
/// Executes supplied action and performs logging.
/// </summary>
/// <typeparam name="TReturn">Type of action's return value.</typeparam>
/// <param name="action">Action to be executed.</param>
/// <param name="actionName">Action name for logging purposes.</param>
/// <returns>Action execution result.</returns>
private TReturn ExecuteAction<TReturn>(Action<TReturn> action, string actionName)
{
try
{
Log.WriteStart("'{0}' {1}", ProviderSettings.ProviderName, actionName);
TReturn result = action();
Log.WriteEnd("'{0}' {1}", ProviderSettings.ProviderName, actionName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("Can't {1} '{0}' provider", ProviderSettings.ProviderName, actionName), ex);
throw;
}
}
/// <summary>
/// Returns fully qualified netbios account name.
/// </summary>
/// <param name="accountName">Account name.</param>
/// <returns>Fully qualified netbios account name.</returns>
private string AttachNetbiosDomainName(string accountName)
{
string domainNetbiosName = String.Format("{0}\\", ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain));
return String.Format("{0}{1}", domainNetbiosName, accountName.Replace(domainNetbiosName, String.Empty));
}
}
}

View file

@ -665,12 +665,12 @@ namespace WebsitePanel.Server
}
[WebMethod, SoapHeader("settings")]
public void ApplyGPO(string collectionName, RdsServerSettings serverSettings)
public void ApplyGPO(string organizationId, string collectionName, RdsServerSettings serverSettings)
{
try
{
Log.WriteStart("'{0}' ApplyGPO", ProviderSettings.ProviderName);
RDSProvider.ApplyGPO(collectionName, serverSettings);
RDSProvider.ApplyGPO(organizationId, collectionName, serverSettings);
Log.WriteEnd("'{0}' ApplyGPO", ProviderSettings.ProviderName);
}
catch (Exception ex)
@ -679,5 +679,37 @@ namespace WebsitePanel.Server
throw;
}
}
[WebMethod, SoapHeader("settings")]
public void ShadowSession(string sessionId, bool control)
{
try
{
Log.WriteStart("'{0}' ShadowSession", ProviderSettings.ProviderName);
RDSProvider.ShadowSession(sessionId, control);
Log.WriteEnd("'{0}' ShadowSession", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' ShadowSession", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public void MoveSessionHostsToCollectionOU(List<RdsServer> servers, string collectionName, string organizationId)
{
try
{
Log.WriteStart("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName);
RDSProvider.MoveSessionHostsToCollectionOU(servers, collectionName, organizationId);
Log.WriteEnd("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' MoveSessionHostsToCollectionOU", ProviderSettings.ProviderName), ex);
throw;
}
}
}
}

View file

@ -35,6 +35,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<WarningsAsErrors>618</WarningsAsErrors>
<FilesToIncludeForPublish>OnlyFilesToRunTheApp</FilesToIncludeForPublish>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@ -91,9 +92,187 @@
</ItemGroup>
<ItemGroup>
<Content Include="AutoDiscovery.asmx" />
<Content Include="bin\Crm2011\microsoft.crm.sdk.proxy.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.client.codegeneration.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.client.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.portal.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.portal.files.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.sdk.deployment.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.sdk.dll" />
<Content Include="bin\Crm2011\microsoft.xrm.sdk.workflow.dll" />
<Content Include="bin\Crm2011\WebsitePanel.Providers.HostedSolution.Crm2011.dll" />
<Content Include="bin\Crm2011\WebsitePanel.Providers.HostedSolution.Crm2011.pdb" />
<Content Include="bin\Crm2013\Microsoft.Crm.Sdk.Proxy.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Client.CodeGeneration.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Client.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Portal.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Portal.Files.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Sdk.Deployment.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Sdk.dll" />
<Content Include="bin\Crm2013\Microsoft.Xrm.Sdk.Workflow.dll" />
<Content Include="bin\Crm2013\System.Management.Automation.dll" />
<Content Include="bin\Crm2013\WebsitePanel.Providers.HostedSolution.Crm2013.dll" />
<Content Include="bin\Crm2013\WebsitePanel.Providers.HostedSolution.Crm2013.pdb" />
<Content Include="bin\Dns2012\Ionic.Zip.Reduced.dll" />
<Content Include="bin\Dns2012\Microsoft.Management.Infrastructure.dll" />
<Content Include="bin\Dns2012\System.Management.Automation.dll" />
<Content Include="bin\Dns2012\WebsitePanel.Providers.Base.dll" />
<Content Include="bin\Dns2012\WebsitePanel.Providers.Base.pdb" />
<Content Include="bin\Dns2012\WebsitePanel.Providers.DNS.MsDNS2012.dll" />
<Content Include="bin\Dns2012\WebsitePanel.Providers.DNS.MsDNS2012.pdb" />
<Content Include="bin\Dns2012\WebsitePanel.Server.Utils.dll" />
<Content Include="bin\Dns2012\WebsitePanel.Server.Utils.pdb" />
<Content Include="bin\Exchange2013\WebsitePanel.Providers.HostedSolution.Exchange2013.dll" />
<Content Include="bin\Exchange2013\WebsitePanel.Providers.HostedSolution.Exchange2013.pdb" />
<Content Include="bin\HyperV2012R2\Ionic.Zip.Reduced.dll" />
<Content Include="bin\HyperV2012R2\Microsoft.SharePoint.dll" />
<Content Include="bin\HyperV2012R2\Microsoft.Storage.Vds.dll" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.Base.dll" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.Base.pdb" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.HostedSolution.dll" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.HostedSolution.pdb" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.Virtualization.HyperV2012R2.dll" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Providers.Virtualization.HyperV2012R2.pdb" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Server.Utils.dll" />
<Content Include="bin\HyperV2012R2\WebsitePanel.Server.Utils.pdb" />
<Content Include="bin\IceWarp\WebsitePanel.Providers.Mail.IceWarp.dll" />
<Content Include="bin\IceWarp\WebsitePanel.Providers.Mail.IceWarp.pdb" />
<Content Include="bin\IIs80\WebsitePanel.Providers.Web.IIs80.dll" />
<Content Include="bin\IIs80\WebsitePanel.Providers.Web.IIs80.pdb" />
<Content Include="bin\Ionic.Zip.Reduced.dll" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.Base.dll" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.Base.pdb" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.HostedSolution.Lync2013.dll" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.HostedSolution.Lync2013.pdb" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.HostedSolution.Lync2013HP.dll" />
<Content Include="bin\Lync2013\WebsitePanel.Providers.HostedSolution.Lync2013HP.pdb" />
<Content Include="bin\Lync2013\WebsitePanel.Server.Utils.dll" />
<Content Include="bin\Lync2013\WebsitePanel.Server.Utils.pdb" />
<Content Include="bin\Microsoft.Practices.EnterpriseLibrary.Caching.dll" />
<Content Include="bin\Microsoft.Practices.EnterpriseLibrary.Common.dll" />
<Content Include="bin\Microsoft.Practices.ObjectBuilder.dll" />
<Content Include="bin\Microsoft.SharePoint.dll" />
<Content Include="bin\Microsoft.Storage.Vds.dll" />
<Content Include="bin\Microsoft.Web.Deployment.dll" />
<Content Include="bin\Microsoft.Web.Management.dll" />
<Content Include="bin\Microsoft.Web.PlatformInstaller.dll" />
<Content Include="bin\Microsoft.Web.Services3.dll" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013.dll" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013.pdb" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013Ent.dll" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013Ent.pdb" />
<Content Include="bin\WebsitePanel.Providers.Base.dll" />
<Content Include="bin\WebsitePanel.Providers.Base.pdb" />
<Content Include="bin\WebsitePanel.Providers.Database.MySQL.dll" />
<Content Include="bin\WebsitePanel.Providers.Database.MySQL.pdb" />
<Content Include="bin\WebsitePanel.Providers.Database.SqlServer.dll" />
<Content Include="bin\WebsitePanel.Providers.Database.SqlServer.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.Bind.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.Bind.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.MsDNS.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.MsDNS.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.Nettica.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.Nettica.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.PowerDNS.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.PowerDNS.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.SimpleDNS.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.SimpleDNS.pdb" />
<Content Include="bin\WebsitePanel.Providers.DNS.SimpleDNS50.dll" />
<Content Include="bin\WebsitePanel.Providers.DNS.SimpleDNS50.pdb" />
<Content Include="bin\WebsitePanel.Providers.EnterpriseStorage.Windows2012.dll" />
<Content Include="bin\WebsitePanel.Providers.EnterpriseStorage.Windows2012.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.FileZilla.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.FileZilla.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.Gene6.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.Gene6.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs60.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs60.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs70.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs70.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs80.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.IIs80.pdb" />
<Content Include="bin\WebsitePanel.Providers.FTP.ServU.dll" />
<Content Include="bin\WebsitePanel.Providers.FTP.ServU.pdb" />
<Content Include="bin\WebsitePanel.Providers.HostedSolution.dll" />
<Content Include="bin\WebsitePanel.Providers.HostedSolution.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.AbilityMailServer.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.AbilityMailServer.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.ArgoMail.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.ArgoMail.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer43.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer43.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer5.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.hMailServer5.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.MailEnable.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.MailEnable.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.MDaemon.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.MDaemon.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.Merak.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.Merak.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.Merak10.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.Merak10.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail10.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail10.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail2.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail2.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail3.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail3.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail5.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail5.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail6.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail6.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail7.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail7.pdb" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail9.dll" />
<Content Include="bin\WebsitePanel.Providers.Mail.SmarterMail9.pdb" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2003.dll" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2003.pdb" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2008.dll" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2008.pdb" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2012.dll" />
<Content Include="bin\WebsitePanel.Providers.OS.Windows2012.pdb" />
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.dll" />
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.pdb" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.dll" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.pdb" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.dll" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.pdb" />
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.dll" />
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.pdb" />
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.dll" />
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.pdb" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.dll" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.pdb" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.dll" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.pdb" />
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.dll" />
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.HeliconZoo.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.HeliconZoo.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs60.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs60.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs70.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs70.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs80.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.IIs80.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.pdb" />
<Content Include="bin\WebsitePanel.Server.Client.dll" />
<Content Include="bin\WebsitePanel.Server.Client.pdb" />
<Content Include="bin\WebsitePanel.Server.dll" />
<Content Include="bin\WebsitePanel.Server.pdb" />
<Content Include="bin\WebsitePanel.Server.Utils.dll" />
<Content Include="bin\WebsitePanel.Server.Utils.pdb" />
<Content Include="bin\WebsitePanel.Server.WPIService.exe" />
<Content Include="bin\WebsitePanel.Server.WPIService.pdb" />
<Content Include="bin\WpiServiceContract.dll" />
<Content Include="bin\WpiServiceContract.pdb" />
<Content Include="BlackBerry.asmx" />
<EmbeddedResource Include="Images\logo.png" />
<Content Include="EnterpriseStorage.asmx" />
<Content Include="HostedSharePointServerEnt.asmx" />
<Content Include="RemoteDesktopServices.asmx" />
<Content Include="HeliconZoo.asmx" />
<Content Include="LyncServer.asmx" />
@ -115,9 +294,11 @@
<Content Include="StatisticsServer.asmx" />
<Content Include="VirtualizationServer.asmx" />
<Content Include="VirtualizationServerForPrivateCloud.asmx" />
<Content Include="Web.config">
<Content Include="bin\WebsitePanel.Server.dll.config" />
<Content Include="bin\WebsitePanel.Server.WPIService.exe.config" />
<None Include="Web.config">
<SubType>Designer</SubType>
</Content>
</None>
<Content Include="WebServer.asmx" />
<Content Include="WindowsServer.asmx" />
</ItemGroup>
@ -141,6 +322,10 @@
<DependentUpon>EnterpriseStorage.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="HostedSharePointServerEnt.asmx.cs">
<DependentUpon>HostedSharePointServerEnt.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="RemoteDesktopServices.asmx.cs">
<DependentUpon>RemoteDesktopServices.asmx</DependentUpon>
<SubType>Component</SubType>
@ -243,6 +428,10 @@
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Client\WebsitePanel.Server.Client.csproj">
<Project>{990c4a2a-34a5-4be0-9546-e10abdfffd0e}</Project>
<Name>WebsitePanel.Server.Client</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
<Name>WebsitePanel.Server.Utils</Name>
@ -253,7 +442,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="WsePolicyCache.Config" />
<None Include="Properties\PublishProfiles\WebsitePanel Server.pubxml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View file

@ -0,0 +1,10 @@
<%@ Control Language="C#" AutoEventWireup="false" %>
<div class="VpsFooter">
<div class="VpsHeader">
<div class="VpsBottom">
<div class="Vps2012Body">
<asp:PlaceHolder ID="ContentPane" runat="server"></asp:PlaceHolder>
</div>
</div>
</div>
</div>

View file

@ -99,11 +99,22 @@
<Control key="sharepoint_edit_sitecollection" general_key="sharepoint_sitecollections" />
<Control key="sharepoint_backup_sitecollection" general_key="sharepoint_sitecollections" />
<Control key="sharepoint_restore_sitecollection" general_key="sharepoint_sitecollections" />
<Control key="sharepoint_storage_settings" />
<Control key="sharepoint_storage_usage" />
<!--SharePoint Enterprise-->
<Control key="sharepoint_enterprise_sitecollections" />
<Control key="sharepoint_enterprise_edit_sitecollection" general_key="sharepoint_enterprise_sitecollections" />
<Control key="sharepoint_enterprise_backup_sitecollection" general_key="sharepoint_enterprise_sitecollections" />
<Control key="sharepoint_enterprise_restore_sitecollection" general_key="sharepoint_enterprise_sitecollections" />
<Control key="sharepoint_enterprise_storage_settings" />
<Control key="sharepoint_enterprise_storage_usage" />
<!--BlackBerry-->
<Control key="blackberry_users" />

View file

@ -69,6 +69,7 @@
</MenuItems>
</MenuItem>
<MenuItem pageID="SpaceVPS" resourceGroup="VPS"/>
<MenuItem pageID="SpaceVPS2012" resourceGroup="VPS2012"/>
<MenuItem pageID="SpaceVPSForPC" resourceGroup="VPSForPC"/>
<MenuItem pageID="SpaceExchangeServer" resourceGroup="Hosted Organizations"/>
<MenuItem pageID="SpaceSharedSSL" resourceGroup="OS" quota="Web.SharedSSL"/>
@ -123,6 +124,7 @@
</Group>
<Group pageID="SpaceHome" titleresourcekey="VPS" disabled="True">
<Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="icons/vps_48.png" />
<Icon pageID="SpaceVPS2012" resourceGroup="VPS2012" imageUrl="icons/vps_48.png" />
<Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="icons/vpsforpc_48.png" />
</Group>
<!--

View file

@ -252,6 +252,16 @@
</ModuleDefinition>
<ModuleDefinition id="HostedSharePointEnterpriseSiteCollections">
<Controls>
<Control key="" src="WebsitePanel/HostedSharePointEnterpriseSiteCollections.ascx" title="HostedSharePointEnterpriseSiteCollections" type="View" icon="colors_48.png"/>
<Control key="edit_item" src="WebsitePanel/HostedSharePointEnterpriseEditSiteCollection.ascx" title="HostedSharePointEnterpriseSiteCollection" type="View" icon="colors_48.png" />
<Control key="backup" src="WebsitePanel/HostedSharePointEnterpriseBackupSiteCollection.ascx" title="HostedSharePointEnterpriseBackupSiteCollection" type="View"/>
<Control key="restore" src="WebsitePanel/HostedSharePointEnterpriseRestoreSiteCollection.ascx" title="HostedSharePointEnterpriseRestoreSiteCollection" type="View"/>
</Controls>
</ModuleDefinition>
<ModuleDefinition id="FileManager">
<Controls>
<Control key="" src="WebsitePanel/FileManager.ascx" title="HostingSpaceFiles" type="View" />
@ -535,14 +545,21 @@
<Control key="crm_storage_settings" src="WebsitePanel/CRM/CRMStorageSettings.ascx" title="CRMRestoreSiteCollection" type="View"/>
<Control key="sharepoint_sitecollections" src="WebsitePanel/HostedSharePointSiteCollections.ascx" title="HostedSharePointSiteCollections" type="View" icon="colors_48.png"/>
<Control key="sharepoint_edit_sitecollection" src="WebsitePanel/HostedSharePointEditSiteCollection.ascx" title="HostedSharePointSiteCollection" type="View" icon="colors_48.png" />
<Control key="sharepoint_backup_sitecollection" src="WebsitePanel/HostedSharePointBackupSiteCollection.ascx" title="HostedSharePointBackupSiteCollection" type="View"/>
<Control key="sharepoint_restore_sitecollection" src="WebsitePanel/HostedSharePointRestoreSiteCollection.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_storage_settings" src="WebsitePanel/HostedSharePointStorageSettings.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_storage_usage" src="WebsitePanel/HostedSharePointStorageUsage.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_sitecollections" src="WebsitePanel/HostedSharePoint/HostedSharePointSiteCollections.ascx" title="HostedSharePointSiteCollections" type="View" icon="colors_48.png"/>
<Control key="sharepoint_edit_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointEditSiteCollection.ascx" title="HostedSharePointSiteCollection" type="View" icon="colors_48.png" />
<Control key="sharepoint_backup_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointBackupSiteCollection.ascx" title="HostedSharePointBackupSiteCollection" type="View"/>
<Control key="sharepoint_restore_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointRestoreSiteCollection.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_storage_settings" src="WebsitePanel/HostedSharePoint/HostedSharePointStorageSettings.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_storage_usage" src="WebsitePanel/HostedSharePoint/HostedSharePointStorageUsage.ascx" title="HostedSharePointRestoreSiteCollection" type="View"/>
<Control key="sharepoint_enterprise_sitecollections" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseSiteCollections.ascx" title="HostedSharePointEnterpriseSiteCollections" type="View" icon="colors_48.png"/>
<Control key="sharepoint_enterprise_edit_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseEditSiteCollection.ascx" title="HostedSharePointEnterpriseSiteCollection" type="View" icon="colors_48.png" />
<Control key="sharepoint_enterprise_backup_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseBackupSiteCollection.ascx" title="HostedSharePointEnterpriseBackupSiteCollection" type="View"/>
<Control key="sharepoint_enterprise_restore_sitecollection" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseRestoreSiteCollection.ascx" title="HostedSharePointEnterpriseRestoreSiteCollection" type="View"/>
<Control key="sharepoint_enterprise_storage_settings" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageSettings.ascx" title="HostedSharePointEnterpriseRestoreSiteCollection" type="View"/>
<Control key="sharepoint_enterprise_storage_usage" src="WebsitePanel/HostedSharePoint/HostedSharePointEnterpriseStorageUsage.ascx" title="HostedSharePointEnterpriseRestoreSiteCollection" type="View"/>
<Control key="blackberry_users" src="WebsitePanel/BlackBerry/BlackBerryUsers.ascx" title="BlackBerry Users" type="View" />
<Control key="create_new_blackberry_user" src="WebsitePanel/BlackBerry/CreateNewBlackBerryUser.ascx" title="Create New BlackBerry User" type="View" />
<Control key="edit_blackberry_user" src="WebsitePanel/BlackBerry/EditBlackBerryUser.ascx" title="Edit BlackBerry User" type="View" />
@ -626,6 +643,37 @@
</Controls>
</ModuleDefinition>
<ModuleDefinition id="VPS2012">
<Controls>
<Control key="" src="WebsitePanel/VPS2012/VdcHome.ascx" title="VdcHome" type="View" />
<Control key="vdc_create_server" src="WebsitePanel/VPS2012/VdcCreateServer.ascx" title="VdcCreateServer" type="View" />
<Control key="vdc_import_server" src="WebsitePanel/VPS2012/VdcImportServer.ascx" title="VdcImportServer" type="View" />
<Control key="vdc_external_network" src="WebsitePanel/VPS2012/VdcExternalNetwork.ascx" title="VdcExternalNetwork" type="View" />
<Control key="vdc_management_network" src="WebsitePanel/VPS2012/VdcManagementNetwork.ascx" title="VdcManagementNetwork" type="View" />
<Control key="vdc_allocate_external_ip" src="WebsitePanel/VPS2012/VdcAddExternalAddress.ascx" title="VdcAddExternalAddress" type="View" />
<Control key="vdc_private_network" src="WebsitePanel/VPS2012/VdcPrivateNetwork.ascx" title="VdcPrivateNetwork" type="View" />
<Control key="vdc_permissions" src="WebsitePanel/VPS2012/VdcPermissions.ascx" title="VdcPermissions" type="View" />
<Control key="vdc_audit_log" src="WebsitePanel/VPS2012/VdcAuditLog.ascx" title="VdcAuditLog" type="View" />
<Control key="vps_general" src="WebsitePanel/VPS2012/VpsDetailsGeneral.ascx" title="VpsDetailsGeneral" type="View" />
<Control key="vps_config" src="WebsitePanel/VPS2012/VpsDetailsConfiguration.ascx" title="VpsDetailsConfiguration" type="View" />
<Control key="vps_edit_config" src="WebsitePanel/VPS2012/VpsDetailsEditConfiguration.ascx" title="VpsDetailsEditConfiguration" type="View" />
<Control key="vps_dvd" src="WebsitePanel/VPS2012/VpsDetailsDvd.ascx" title="VpsDetailsDvd" type="View" />
<Control key="vps_insert_dvd" src="WebsitePanel/VPS2012/VpsDetailsInsertDvd.ascx" title="VpsDetailsInsertDvd" type="View" />
<Control key="vps_snapshots" src="WebsitePanel/VPS2012/VpsDetailsSnapshots.ascx" title="VpsDetailsSnapshots" type="View" />
<Control key="vps_network" src="WebsitePanel/VPS2012/VpsDetailsNetwork.ascx" title="VpsDetailsNetwork" type="View" />
<Control key="vps_add_external_ip" src="WebsitePanel/VPS2012/VpsDetailsAddExternalAddress.ascx" title="VpsDetailsAddExternalAddress" type="View" />
<Control key="vps_add_private_ip" src="WebsitePanel/VPS2012/VpsDetailsAddPrivateAddress.ascx" title="VpsDetailsAddPrivateAddress" type="View" />
<Control key="vps_permissions" src="WebsitePanel/VPS2012/VpsDetailsPermissions.ascx" title="VpsDetailsNetworking" type="View" />
<Control key="vps_tools" src="WebsitePanel/VPS2012/VpsDetailsTools.ascx" title="VpsDetailsTools" type="View" />
<Control key="vps_audit_log" src="WebsitePanel/VPS2012/VpsDetailsAuditLog.ascx" title="VpsDetailsAuditLog" type="View" />
<Control key="vps_help" src="WebsitePanel/VPS2012/VpsDetailsHelp.ascx" title="VpsDetailsHelp" type="View" />
<Control key="vps_tools_delete" src="WebsitePanel/VPS2012/VpsToolsDeleteServer.ascx" title="VpsToolsDeleteServer" type="View" />
<Control key="vps_tools_move" src="WebsitePanel/VPS2012/VpsMoveServer.ascx" title="VpsMoveServer" type="View" />
<Control key="vps_tools_reinstall" src="WebsitePanel/VPS2012/VpsToolsReinstallServer.ascx" title="VpsToolsReinstallServer" type="View" />
</Controls>
</ModuleDefinition>
<ModuleDefinition id="VPSForPC">
<Controls>
<Control key="" src="WebsitePanel/VPSForPC/VdcHome.ascx" title="VdcHome" type="View" />

View file

@ -175,6 +175,17 @@
</Content>
</Page>
<Page name="SpaceOrganizationHostedSharePointEnterprise" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True">
<Content id="LeftPane">
<Module moduleDefinitionID="HostedSolutionMenu" title="HostedSolutionMenu" container="Clear.ascx">
<ModuleData ref="HostedSolutionMenu"/>
</Module>
</Content>
<Content id="ContentPane">
<Module moduleDefinitionID="HostedSharePointEnterpriseSiteCollections" title="HostedSharePointEnterpriseSiteCollections" icon="colors_48.png" />
</Content>
</Page>
<Page name="SpaceDomains" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True">
<Content id="LeftPane">
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
@ -641,6 +652,20 @@
</Content>
</Page>
<Page name="SpaceVPS2012" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx">
<Content id="LeftPane">
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
<ModuleData ref="UserMenu"/>
</Module>
<Module moduleDefinitionID="SpaceMenu" title="SpaceMenu" container="Clear.ascx">
<ModuleData ref="SpaceMenu"/>
</Module>
</Content>
<Content id="ContentPane">
<Module moduleDefinitionID="VPS2012" title="VirtualPrivateServers2012" icon="" container="VPS2012.ascx" admincontainer="VPS2012.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content>
</Page>
<Page name="SpaceVPSForPC" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx">
<Content id="LeftPane">
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">

View file

@ -732,6 +732,21 @@
<data name="ModuleTitle.HostedSharePointRestoreSiteCollection" xml:space="preserve">
<value>Restore Site Collection</value>
</data>
<data name="ModuleTitle.HostedSharePointEnterpriseSiteCollection" xml:space="preserve">
<value>SharePoint Enterprise Site Collection</value>
</data>
<data name="ModuleTitle.HostedSharePointEnterpriseSiteCollections" xml:space="preserve">
<value>Hosted SharePoint Enterprise Site Collections</value>
</data>
<data name="ModuleTitle.HostedSharePointEnterpriseBackupSiteCollection" xml:space="preserve">
<value>Backup Site Collection</value>
</data>
<data name="ModuleTitle.HostedSharePointEnterpriseRestoreSiteCollection" xml:space="preserve">
<value>Restore Site Collection</value>
</data>
<data name="ModuleTitle.WebSiteIPAddresses" xml:space="preserve">
<value>Web Site IP Addresses</value>
</data>

View file

@ -444,6 +444,12 @@
<data name="PageTitle.SpaceVPS" xml:space="preserve">
<value>{user} - {space} - Virtual Private Servers</value>
</data>
<data name="PageName.SpaceVPS2012" xml:space="preserve">
<value>Virtual Private Servers 2012</value>
</data>
<data name="PageTitle.SpaceVPS2012" xml:space="preserve">
<value>{user} - {space} - Virtual Private Servers 2012</value>
</data>
<data name="PageName.SpaceWebIPAddresses" xml:space="preserve">
<value>IP Addresses</value>
</data>

View file

@ -3370,15 +3370,15 @@
<data name="Quota.HostedSolution.DeletedUsersBackupStorageSpace" xml:space="preserve">
<value>Deleted Users Backup Storage Space per Organization, Mb</value>
</data>
<data name="ResourceGroup.Hosted SharePoint" xml:space="preserve">
<value>Hosted SharePoint</value>
</data>
<data name="ResourceGroup.SharePoint Foundation Server" xml:space="preserve">
<value>SharePoint Foundation Server</value>
</data>
<data name="ResourceGroup.SharePoint Server" xml:space="preserve">
<value>SharePoint Server</value>
</data>
<data name="ResourceGroup.SharePoint Enterprise Server" xml:space="preserve">
<value>SharePoint Enterprise Server</value>
</data>
<data name="ResourceGroup.OCS" xml:space="preserve">
<value>Office Communications Server</value>
</data>
@ -3397,6 +3397,12 @@
<data name="Quota.HostedSharePointServer.MaxStorage" xml:space="preserve">
<value>Max site storage, MB</value>
</data>
<data name="Quota.HostedSharePointEnterprise.Sites" xml:space="preserve">
<value>SharePoint Enterprise Site Collections per Organization</value>
</data>
<data name="Quota.HostedSharePointEnterprise.MaxStorage" xml:space="preserve">
<value>Max site storage, MB</value>
</data>
<data name="Quota.HostedCRM.Users" xml:space="preserve">
<value>Full licenses per organization</value>
</data>
@ -4261,6 +4267,9 @@
<data name="VPS.VPS_QUOTA_WRONG_RAM" xml:space="preserve">
<value>RAM size must be a positive number and greater than zero</value>
</data>
<data name="VPS.VPS_QUOTA_NOT_IN_DYNAMIC_RAM" xml:space="preserve">
<value>RAM size must be between the minimum and maximum of the dynamic memory</value>
</data>
<data name="VPS.VPS_QUOTA_WRONG_SNAPSHOTS" xml:space="preserve">
<value>Snapshots must be a positive number and greater than zero</value>
</data>
@ -5122,6 +5131,74 @@
<data name="Quota.VPSForPC.StartShutdownAllowed" xml:space="preserve">
<value>Allow user to Start, Turn off VPS</value>
</data>
<data name="ResourceGroup.VPS2012" xml:space="preserve">
<value>Virtual Private Servers 2012</value>
</data>
<data name="AuditLogSource.VPS2012" xml:space="preserve">
<value>Virtual Private Servers 2012</value>
</data>
<data name="Quota.VPS2012.Bandwidth" xml:space="preserve">
<value>Monthly bandwidth, GB</value>
</data>
<data name="Quota.VPS2012.BootCdAllowed" xml:space="preserve">
<value>Boot from CD allowed</value>
</data>
<data name="Quota.VPS2012.BootCdEnabled" xml:space="preserve">
<value>Boot from CD</value>
</data>
<data name="Quota.VPS2012.CpuNumber" xml:space="preserve">
<value>Number of CPU cores</value>
</data>
<data name="Quota.VPS2012.DvdEnabled" xml:space="preserve">
<value>DVD drive</value>
</data>
<data name="Quota.VPS2012.ExternalIPAddressesNumber" xml:space="preserve">
<value>Number of External IP addresses</value>
</data>
<data name="Quota.VPS2012.ExternalNetworkEnabled" xml:space="preserve">
<value>External Network</value>
</data>
<data name="Quota.VPS2012.Hdd" xml:space="preserve">
<value>Hard Drive size, GB</value>
</data>
<data name="Quota.VPS2012.ManagingAllowed" xml:space="preserve">
<value>Allow user to create, delete VPS</value>
</data>
<data name="Quota.VPS2012.NumLockEnabled" xml:space="preserve">
<value>"Num Lock" by default</value>
</data>
<data name="Quota.VPS2012.PauseResumeAllowed" xml:space="preserve">
<value>Allow user to Pause, Resume VPS</value>
</data>
<data name="Quota.VPS2012.PrivateIPAddressesNumber" xml:space="preserve">
<value>Number of Private IP addresses per VPS</value>
</data>
<data name="Quota.VPS2012.PrivateNetworkEnabled" xml:space="preserve">
<value>Private Network</value>
</data>
<data name="Quota.VPS2012.Ram" xml:space="preserve">
<value>RAM size, MB</value>
</data>
<data name="Quota.VPS2012.RebootAllowed" xml:space="preserve">
<value>Allow user to Reboot VPS</value>
</data>
<data name="Quota.VPS2012.ReinstallAllowed" xml:space="preserve">
<value>Allow user to Re-install VPS</value>
</data>
<data name="Quota.VPS2012.ResetAlowed" xml:space="preserve">
<value>Allow user to Reset VPS</value>
</data>
<data name="Quota.VPS2012.ServersNumber" xml:space="preserve">
<value>Number of VPS</value>
</data>
<data name="Quota.VPS2012.SnapshotsNumber" xml:space="preserve">
<value>Number of Snaphots</value>
</data>
<data name="Quota.VPS2012.StartShutdownAllowed" xml:space="preserve">
<value>Allow user to Start, Turn off VPS</value>
</data>
<data name="Error.CreateCheckPointError" xml:space="preserve">
<value>Error creating CheckPoint</value>
</data>
@ -5173,6 +5250,9 @@
<data name="Quota.HostedSharePoint.UseSharedSSL" xml:space="preserve">
<value>Use shared SSL Root</value>
</data>
<data name="Quota.HostedSharePointEnterprise.UseSharedSSL" xml:space="preserve">
<value>Use shared SSL Root</value>
</data>
<data name="Quota.HostedSharePointServer.UseSharedSSL" xml:space="preserve">
<value>Use shared SSL Root</value>
</data>
@ -5701,6 +5781,12 @@
<data name="ERROR.REMOTE_DESKTOP_SERVICES_LOG_OFF_USER" xml:space="preserve">
<value>RDS User logging off error</value>
</data>
<data name="ERROR.REMOTE_DESKTOP_SERVICES_VIEW_SESSION" xml:space="preserve">
<value>View session error</value>
</data>
<data name="ERROR.REMOTE_DESKTOP_SERVICES_CONTROL_SESSION" xml:space="preserve">
<value>Control session error</value>
</data>
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve">
<value>Getting RDS User sessions error</value>
</data>

View file

@ -1168,6 +1168,9 @@
<ItemGroup>
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\Default Settings.pubxml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View file

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

View file

@ -123,6 +123,15 @@
<data name="cbUsers.Text" xml:space="preserve">
<value>Users</value>
</data>
<data name="secChangeDesktop.Text" xml:space="preserve">
<value>Changing Desktop Disabled</value>
</data>
<data name="secControlSession.Text" xml:space="preserve">
<value>Control RDS Session without Users's Permission</value>
</data>
<data name="secDisableCmd.Text" xml:space="preserve">
<value>Disable Command Prompt</value>
</data>
<data name="secDriveSpace.Text" xml:space="preserve">
<value>Drive Space Threshold</value>
</data>
@ -145,9 +154,9 @@
<value>Disable Task Manager</value>
</data>
<data name="secTimeout.Text" xml:space="preserve">
<value>Lock Screen Timeout</value>
<value>Lock Screen Timeout (sec.)</value>
</data>
<data name="sekChangeDesktop.Text" xml:space="preserve">
<value>Changing Desktop Disabled</value>
<data name="secViewSession.Text" xml:space="preserve">
<value>View RDS Session without Users's Permission</value>
</data>
</root>

View file

@ -180,8 +180,8 @@
<data name="lblOCSUsers.Text" xml:space="preserve">
<value>OCS Users:</value>
</data>
<data name="lblSharepointSites" xml:space="preserve">
<value>Sharepoint Sites:</value>
<data name="lblSharepointSites.Text" xml:space="preserve">
<value>SharePoint Foundation Sites:</value>
</data>
<data name="lblUserAccounts.Text" xml:space="preserve">
<value>User Accounts:</value>
@ -210,4 +210,7 @@
<data name="lblDeletedUsers.Text" xml:space="preserve">
<value>Deleted Users:</value>
</data>
<data name="lblSharepointEnterpriseSites.Text" xml:space="preserve">
<value>SharePoint Server Sites:</value>
</data>
</root>

View file

@ -141,6 +141,9 @@
<data name="lnkVps.Text" xml:space="preserve">
<value>Virtual Private Servers</value>
</data>
<data name="lnkVps2012.Text" xml:space="preserve">
<value>Virtual Private Servers 2012</value>
</data>
<data name="lnkVpsForPC.Text" xml:space="preserve">
<value>Virtual Private Servers for Private Cloud</value>
</data>

View file

@ -237,9 +237,9 @@
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>Hosted Organization - SharePoint Foundation Server</value>
</data>
<data name="Text.SharePointServerGroup" xml:space="preserve">
<data name="Text.SharePointEnterpriseServerGroup" xml:space="preserve">
<value>Hosted Organization - SharePoint Server</value>
</data>
</data>
<data name="Text.SiteCollections" xml:space="preserve">
<value>Sharepoint Sites</value>
</data>
@ -250,7 +250,7 @@
<value>Storage Usage</value>
</data>
<data name="Text.Users" xml:space="preserve">
<value>Users</value>
<value>Users (User Organization)</value>
</data>
<data name="Text.CreateOrganization" xml:space="preserve">
<value>Create Organization</value>

Some files were not shown because too many files have changed in this diff Show more