This commit is contained in:
Alexander Trofimov 2015-04-07 22:03:47 +03:00
commit 9e67b26822
134 changed files with 10745 additions and 598 deletions

View file

@ -9638,7 +9638,48 @@ END
GO
UPDATE [dbo].[Quotas] SET GroupID = 45 WHERE QuotaName = 'EnterpriseStorage.DriveMaps'
Go
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]
(
@ -9688,6 +9729,7 @@ BEGIN
END
-- add item
INSERT INTO ServiceItems
(

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

@ -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

View file

@ -45,6 +45,7 @@ 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";

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

@ -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

@ -89,6 +89,7 @@
<SubType>code</SubType>
</Compile>
<Compile Include="HeliconZooProxy.cs" />
<Compile Include="HostedSharePointServersEntProxy.cs" />
<Compile Include="LyncProxy.cs" />
<Compile Include="RemoteDesktopServicesProxy.cs" />
<Compile Include="VirtualizationServerProxy2012.cs" />

View file

@ -381,6 +381,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);
@ -668,6 +675,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);
@ -937,7 +954,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
@ -969,6 +988,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,6 +1076,13 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.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;
@ -1117,6 +1150,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 =
@ -159,6 +174,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
}
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)
{
PackageInfo package;
@ -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

@ -408,24 +408,7 @@ namespace WebsitePanel.EnterpriseServer
var rds = GetRemoteDesktopServices(GetRdsServiceId(collection.ItemId));
Organization org = OrganizationController.GetOrganization(collection.ItemId);
rds.ApplyGPO(org.OrganizationId, 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;
string xml = GetSettingsXml(settings);
DataProvider.UpdateRdsServerSettings(serverId, settingsName, xml);
@ -792,8 +775,11 @@ namespace WebsitePanel.EnterpriseServer
};
rds.CreateCollection(org.OrganizationId, collection);
rds.ApplyGPO(org.OrganizationId, collection.Name, GetDefaultGpoSettings());
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);
@ -850,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)
{
@ -2142,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

@ -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, "Sharepoint Foundation Server", 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

@ -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>
@ -163,6 +163,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" />

View file

@ -68,16 +68,19 @@
<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>
@ -120,6 +123,7 @@
<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" />
@ -165,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>

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

@ -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

@ -83,5 +83,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
void MoveSessionHostToRdsOU(string hostName);
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

@ -45,6 +45,9 @@ namespace WebsitePanel.EnterpriseServer.Base.RDS
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; }

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

@ -122,6 +122,8 @@
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
<Compile Include="HostedSolution\OrganizationDeletedUser.cs" />
<Compile Include="HostedSolution\OrganizationDeletedUsersPaged.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" />
@ -280,11 +282,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" />

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

@ -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\Sharepoint2013Ent\</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>bin\Release\</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

@ -95,6 +95,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
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
@ -371,9 +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);
CreateHelpDeskPolicy(runSpace, new DirectoryEntry(GetHelpDeskGroupPath(RDSHelpDeskGroup)), organizationId, 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
{
@ -632,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;
@ -1129,14 +1145,25 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
try
{
runspace = OpenRunspace();
string collectionComputersPath = GetComputerGroupPath(organizationId, collectionName);
CreateHelpDeskPolicy(runspace, new DirectoryEntry(GetHelpDeskGroupPath(RDSHelpDeskGroup)), 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, 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.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.SCREEN_SAVER_DISABLED));
SetRegistryValue(setting, runspace, ScreenSaverGpoKey, administratorsGpo, usersGpo, ScreenSaverValueName, "0", "string");
@ -1153,6 +1180,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
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;
@ -1162,6 +1192,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
SetRdsSessionHostPermissions(runspace, serverSettings, usersGpo, administratorsGpo);
SetPowershellPermissions(runspace, serverSettings.Settings.FirstOrDefault(s => s.PropertyName.Equals(RdsServerSettings.REMOVE_POWERSHELL_COMMAND)), usersGpo, administratorsGpo);
}
finally
{
@ -1169,6 +1200,43 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
}
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));
@ -1233,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");
@ -1245,7 +1324,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
Collection<PSObject> result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
}
private void CreateHelpDeskPolicy(Runspace runspace, DirectoryEntry entry, string organizationId, 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);
@ -1253,19 +1332,27 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
if (string.IsNullOrEmpty(gpoId))
{
gpoId = CreateAndLinkPolicy(runspace, gpoName, organizationId, collectionName);
SetPolicyPermissions(runspace, gpoName, entry);
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, string collectionName)
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;
@ -1285,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;

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

@ -106,6 +106,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback ShadowSessionOperationCompleted;
private System.Threading.SendOrPostCallback MoveSessionHostsToCollectionOUOperationCompleted;
/// <remarks/>
public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -225,6 +227,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <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)]
@ -1882,6 +1887,52 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <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);
@ -2523,4 +2574,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <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

@ -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

@ -695,5 +695,21 @@ namespace WebsitePanel.Server
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

@ -157,6 +157,8 @@
<Content Include="bin\Microsoft.Web.Management.dll" />
<Content Include="bin\Microsoft.Web.PlatformInstaller.dll" />
<Content Include="bin\Microsoft.Web.Services3.dll" />
<Content Include="bin\Sharepoint2013Ent\WebsitePanel.Providers.HostedSolution.SharePoint2013Ent.dll" />
<Content Include="bin\Sharepoint2013Ent\WebsitePanel.Providers.HostedSolution.SharePoint2013Ent.pdb" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013.dll" />
<Content Include="bin\Sharepoint2013\WebsitePanel.Providers.HostedSolution.SharePoint2013.pdb" />
<Content Include="bin\WebsitePanel.Providers.Base.dll" />
@ -270,6 +272,7 @@
<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" />
@ -319,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>

View file

@ -103,6 +103,17 @@
<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

@ -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" />
@ -532,14 +542,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" />

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">

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

@ -3371,14 +3371,11 @@
<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 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>
@ -3398,6 +3395,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>
@ -5245,6 +5248,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>

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

@ -129,6 +129,9 @@
<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>

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

@ -237,7 +237,7 @@
<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 name="Text.SiteCollections" xml:space="preserve">
@ -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>

View file

@ -203,6 +203,11 @@ namespace WebsitePanel.Portal
get { return GetCachedProxy<esHostedSharePointServers>(); }
}
public esHostedSharePointServersEnt HostedSharePointServersEnt
{
get { return GetCachedProxy<esHostedSharePointServersEnt>(); }
}
public esImport Import
{
get { return GetCachedProxy<esImport>(); }

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;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.SharePoint;
using System.Collections.Generic;
namespace WebsitePanel.Portal
{
public class HostedSharePointEnterpriseSiteCollectionsHelper
{
SharePointEnterpriseSiteCollectionListPaged result;
public int GetSharePointEnterpriseSiteCollectionPagedCount(int packageId, int organizationId, string filterColumn, string filterValue)
{
return result.TotalRowCount;
}
public List<SharePointEnterpriseSiteCollection> GetSharePointEnterpriseSiteCollectionPaged(int packageId, int organizationId, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn)
{
if (!String.IsNullOrEmpty(filterValue))
{
filterValue = filterValue + "%";
}
result = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
return result.SiteCollections;
}
}
}

View file

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

View file

@ -196,7 +196,7 @@
<value>OCS</value>
</data>
<data name="locSharePoint.Text" xml:space="preserve">
<value>SharePoint</value>
<value>SharePoint Foundation</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Home</value>
@ -237,4 +237,7 @@
<data name="lnkRdsUsers.Text" xml:space="preserve">
<value>RDS Users</value>
</data>
<data name="locSharePointEnterprise.Text" xml:space="preserve">
<value>SharePoint Server</value>
</data>
</root>

View file

@ -218,6 +218,25 @@
</tr>
</asp:Panel>
<asp:Panel runat="server" ID="sharePointEnterpriseStatsPanel">
<tr class="OrgStatsRow">
<td class="OrgStatsGroup" width="100%" colspan="2">
<asp:Localize ID="locSharePointEnterprise" runat="server" meta:resourcekey="locSharePointEnterprise"
Text="Organization Statistics"></asp:Localize>
</td>
</tr>
<tr class="OrgStatsRow">
<td class="OrgStatsQuota" nowrap>
<asp:HyperLink ID="lnkEnterpriseSiteCollections" runat="server" meta:resourcekey="lnkSiteCollections"></asp:HyperLink>
</td>
<td>
<wsp:QuotaViewer ID="enterpriseSiteCollectionsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
</asp:Panel>
<asp:Panel runat="server" ID="ocsStatsPanel">
<tr>
<td class="OrgStatsGroup" width="100%" colspan="2">

View file

@ -249,6 +249,21 @@ namespace WebsitePanel.Portal.ExchangeServer
else
sharePointStatsPanel.Visible = false;
//Show SharePoint statistics
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
sharePointEnterpriseStatsPanel.Visible = true;
lnkSiteCollections.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_enterprise_sitecollections",
"SpaceID=" + PanelSecurity.PackageId);
enterpriseSiteCollectionsStats.QuotaUsedValue = orgStats.CreatedSharePointEnterpriseSiteCollections;
enterpriseSiteCollectionsStats.QuotaValue = orgStats.AllocatedSharePointEnterpriseSiteCollections;
if (orgStats.AllocatedSharePointEnterpriseSiteCollections != -1) enterpriseSiteCollectionsStats.QuotaAvailable = tenantStats.AllocatedSharePointEnterpriseSiteCollections - tenantStats.CreatedSharePointEnterpriseSiteCollections;
}
else
sharePointEnterpriseStatsPanel.Visible = false;
if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
{
ocsStatsPanel.Visible = true;

View file

@ -525,6 +525,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer siteCollectionsStats;
/// <summary>
/// sharePointEnterpriseStatsPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel sharePointEnterpriseStatsPanel;
/// <summary>
/// locSharePointEnterprise control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locSharePointEnterprise;
/// <summary>
/// lnkEnterpriseSiteCollections control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkEnterpriseSiteCollections;
/// <summary>
/// enterpriseSiteCollectionsStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer enterpriseSiteCollectionsStats;
/// <summary>
/// ocsStatsPanel control.
/// </summary>

View file

@ -168,8 +168,8 @@
<data name="Text.SharePointFoundationServerGroup" xml:space="preserve">
<value>SharePoint Foundation</value>
</data>
<data name="Text.SharePointServerGroup" xml:space="preserve">
<value>SharePoint Server</value>
<data name="Text.SharePointEnterpriseServerGroup" xml:space="preserve">
<value>SharePoint Enterprise</value>
</data>
<data name="Text.OCSGroup" xml:space="preserve">
<value>OCS</value>

View file

@ -251,6 +251,20 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
groups.Add(sharepointGroup);
}
private void PrepareSharePointEnterpriseMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath, string menuItemText)
{
MenuGroup sharepointGroup =
new MenuGroup(menuItemText, imagePath + "sharepoint24.png");
sharepointGroup.MenuItems.Add(CreateMenuItem("SiteCollections", "sharepoint_enterprise_sitecollections"));
sharepointGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "sharepoint_enterprise_storage_usage"));
sharepointGroup.MenuItems.Add(CreateMenuItem("StorageLimits", "sharepoint_enterprise_storage_settings"));
groups.Add(sharepointGroup);
}
private void PrepareOCSMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
@ -319,9 +333,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointFoundationServerGroup"));
}
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointServer))
if (cntx.Groups.ContainsKey(ResourceGroups.SharepointEnterpriseServer))
{
PrepareSharePointMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointServerGroup"));
PrepareSharePointEnterpriseMenu(cntx, groups, imagePath, GetLocalizedString("Text.SharePointEnterpriseServerGroup"));
}
//CRM Menu

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnBackup.Text" xml:space="preserve">
<value>Backup</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="chkZipBackup.Text" xml:space="preserve">
<value>ZIP Backup</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;The backup file that you create includes list or library content, security settings, user information, navigation, customizations, and personalizations (such as views, site templates, and content types). The backup file does not include workflows, alerts, and properties stored at the site collection level.&lt;/p&gt;</value>
</data>
<data name="lblBackupDestination.Text" xml:space="preserve">
<value>Backup Destination:</value>
</data>
<data name="lblBackupFileName.Text" xml:space="preserve">
<value>Backup File Name:</value>
</data>
<data name="lblBackupOptions.Text" xml:space="preserve">
<value>Backup Options:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Backup SharePoint Site Collection</value>
</data>
<data name="rbCopy.Text" xml:space="preserve">
<value>Copy to Folder</value>
</data>
<data name="rbDownload.Text" xml:space="preserve">
<value>Download via HTTP</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Backup SharePoint Site Collection</value>
</data>
</root>

View file

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnBackup.Text" xml:space="preserve">
<value>Backup Site Collection</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="btnDelete.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Deleting SharePoint site collection...');</value>
</data>
<data name="btnDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="btnRestore.Text" xml:space="preserve">
<value>Restore Site Collection</value>
</data>
<data name="btnUpdate.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Updating SharePoint site collection...');</value>
</data>
<data name="btnUpdate.Text" xml:space="preserve">
<value>Update</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;Here you can create new SharePoint site collection. Choose URL from the list of domains you already own. Site URL like team.yourcompany.com should be added as domain in “Domain names” organizations menu before SharePoint site collection creation.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Site owner&lt;/b&gt; is member of your organization who will be responsible for this SharePoint site collection administration: choosing site templates, adding other users, creating sub-sites.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Locale ID&lt;/b&gt; defines your site language and can not be changed after site creation. However child sub sites can use another Locale IDs.&lt;/p&gt;
&lt;p&gt;Title will be visible in site header.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Description&lt;/b&gt; will be visible when you open site on the top of the main site page.&lt;/p&gt;
&lt;p&gt;After you create this site open it using owner login, and do at least 2 main steps:
1. Choose site template
2. Define who will be able to access this site. To add user from your hosted organization to SharePoint site, please copy/paste his or her e-mail from user's properties in WebsitePanel to SharePoint site collections Users/Groups field.&lt;/p&gt;</value>
</data>
<data name="gvUserEmail.HeaderText" xml:space="preserve">
<value>Email</value>
</data>
<data name="gvUserName.HeaderText" xml:space="preserve">
<value>User Name</value>
</data>
<data name="lblDescription.Text" xml:space="preserve">
<value>Description:</value>
</data>
<data name="lblSiteCollectionLocaleID.Text" xml:space="preserve">
<value>Locale ID:</value>
</data>
<data name="lblSiteCollectionOwner.Text" xml:space="preserve">
<value>Owner:</value>
</data>
<data name="lblSiteCollectionUrl.Text" xml:space="preserve">
<value>Url:</value>
</data>
<data name="lblTitle.Text" xml:space="preserve">
<value>Title:</value>
</data>
<data name="lblWarningStorage.Text" xml:space="preserve">
<value>Send warning E-mail when site storage reaches (MB):</value>
</data>
<data name="localesList.Text" xml:space="preserve">
<value>Full list of locales</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>SharePoint Site Collection</value>
</data>
<data name="secMainTools.Text" xml:space="preserve">
<value>SharePoint Site Collection Tools</value>
</data>
<data name="Text.Add" xml:space="preserve">
<value>Add Site Collection</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Edit SharePoint Site Collection</value>
</data>
<data name="Text.Update" xml:space="preserve">
<value>Update</value>
</data>
<data name="lblMaxStorage.Text" xml:space="preserve">
<value>Maximum site storage size (MB):</value>
</data>
<data name="WarningUnlimitedValue" xml:space="preserve">
<value>Do not send</value>
</data>
<data name="btnCreate.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Creating SharePoint site collection...');</value>
</data>
</root>

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAddItem.Text" xml:space="preserve">
<value>Add SharePoint Enterprise Site Collection</value>
</data>
<data name="btnCreateSiteCollection.Text" xml:space="preserve">
<value>Create New Site Collection</value>
</data>
<data name="cmdDelete.Text" xml:space="preserve">
<value>Delete</value>
</data>
<data name="ddlSearchColumnUrl.Text" xml:space="preserve">
<value>Url</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;&lt;b&gt;SharePoint site collection&lt;/b&gt; is a group of sites built on Microsoft Windows SharePoint Services that all exist under a top-level site. To make managing the sites and their content more convenient, you can assign users to be site collection administrators or site collection owners. These are permission levels to give to users who you want to have full administrative rights to all sites and content within a site collection.&lt;/p&gt;</value>
</data>
<data name="gvOwnerDisplayName.HeaderText" xml:space="preserve">
<value>Owner</value>
</data>
<data name="gvSiteCollection.Empty" xml:space="preserve">
<value>No SharePoint site collections have been created. To create a SharePoint site collection click "Create New Site Collection" button.</value>
</data>
<data name="gvSiteCollectionUrl.HeaderText" xml:space="preserve">
<value>Site Collection Url</value>
</data>
<data name="locQuota.Text" xml:space="preserve">
<value>Total Site Collections Created:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>SharePoint Enterprise Site Collections</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>SharePoint Enterprise Site Collections</value>
</data>
</root>

View file

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="btnRestore.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Restoring SharePoint site collection...');</value>
</data>
<data name="btnRestore.Text" xml:space="preserve">
<value>Restore</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;After site collection is restored it will have primary administrator assigned to it as it was before restoration (primary administrator record from backup is ignored).&lt;/p&gt;</value>
</data>
<data name="lblAllowedFiles.Text" xml:space="preserve">
<value>.ZIP, .BAK files are allowed</value>
</data>
<data name="lblRestoreFrom.Text" xml:space="preserve">
<value>Restore From:</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Restore SharePoint Site Collection</value>
</data>
<data name="radioFile.Text" xml:space="preserve">
<value>Hosting Space File</value>
</data>
<data name="radioUpload.Text" xml:space="preserve">
<value>Uploaded File</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Restore SharePoint Site Collection</value>
</data>
</root>

View file

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnSave.Text" xml:space="preserve">
<value>Save</value>
</data>
<data name="btnSaveApply.Text" xml:space="preserve">
<value>Save and Apply to All Site Collections</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;Storage settings are used to limit the amount of storage available on a SharePoint site collection, and they are used to send e-mail alerts to the site administrator when a specified value of space is used.&lt;/p&gt;
&lt;p&gt;These settings will be applied to the new site collections only. By clicking "Save and Apply to All Site Collections" button you can override these settings for all existing site collections.&lt;/p&gt;
&lt;p&gt;Please note, that you cannot specify storage settings higher than defined in the space hosting plan.&lt;/p&gt;</value>
</data>
<data name="locMaxStorage.Text" xml:space="preserve">
<value>Maximum site storage size (MB):</value>
</data>
<data name="locWarningStorage.Text" xml:space="preserve">
<value>Send warning E-mail when site storage reaches (MB):</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Storage Settings</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Storage Settings</value>
</data>
<data name="secStorageLimits.Text" xml:space="preserve">
<value>Storage Settings</value>
</data>
<data name="chkQuotaUnlimited.Text" xml:space="preserve">
<value>Don't use</value>
</data>
<data name="WarningUnlimitedValue" xml:space="preserve">
<value>Do not send</value>
</data>
</root>

View file

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnRecalculateDiscSpace.Text" xml:space="preserve">
<value>Recalculate Disk Space</value>
</data>
<data name="FormComments.Text" xml:space="preserve">
<value>&lt;p&gt;SharePoint disk space usage is calculated on timely basis (usually once a day). You can recalculate it right now by clicking "Recalculate Disk Space" button.&lt;/p&gt;</value>
</data>
<data name="gvSiteCollectionName.HeaderText" xml:space="preserve">
<value>Site Collection</value>
</data>
<data name="gvSiteCollectionSize.HeaderText" xml:space="preserve">
<value>Total Size, MB</value>
</data>
<data name="gvStorageUsage.EmptyDataText" xml:space="preserve">
<value>There are no site collections</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Storage Usage</value>
</data>
<data name="secSiteCollectionsReport.Text" xml:space="preserve">
<value>Site Collections</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Storage Usage</value>
</data>
<data name="locTotalMailboxesSize.Text" xml:space="preserve">
<value>Total Size (MB):</value>
</data>
<data name="locTotalMailboxItems.Text" xml:space="preserve">
<value>Total Items:</value>
</data>
</root>

View file

@ -1,10 +1,11 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointBackupSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointBackupSiteCollection" %>
<%@ Register Src="UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />

View file

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

View file

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

View file

@ -1,13 +1,14 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEditSiteCollection.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEditSiteCollection" %>
<%@ Register Src="ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register Src="UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
<%@ Register Src="ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register src="UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
<%@ Register Src="../DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />

View file

@ -44,11 +44,6 @@ namespace WebsitePanel.Portal
{
SharePointSiteCollection item = null;
public static string GroupName
{
get { return HttpContext.Current.Request["GroupName"]; }
}
private int OrganizationId
{
get
@ -230,7 +225,7 @@ namespace WebsitePanel.Portal
/// <returns> Reserved disk space vallue.</returns>
private int GetReservedDiskStorageSpace()
{
var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false, GroupName);
var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false);
return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
}
@ -257,20 +252,9 @@ namespace WebsitePanel.Portal
{
item = new SharePointSiteCollection();
string groupName = GroupName;
if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName))
if (!UseSharedSLL(PanelSecurity.PackageId))
{
groupName = ResourceGroups.SharepointFoundationServer;
}
else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName))
{
groupName = ResourceGroups.SharepointServer;
}
if (!UseSharedSLL(PanelSecurity.PackageId))
{
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue, groupName);
SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue);
foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections)
{
Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name);
@ -303,7 +287,7 @@ namespace WebsitePanel.Portal
item.MaxSiteStorage = maxStorage.QuotaValue;
item.WarningStorage = warningStorage.QuotaValue;
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item, groupName);
int result = ES.Services.HostedSharePointServers.AddSiteCollection(item);
if (result < 0)
{
localMessageBox.ShowResultMessage(result);
@ -390,19 +374,19 @@ namespace WebsitePanel.Portal
protected void btnBackup_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void btnRestore_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
private void RedirectToSiteCollectionsList()
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName));
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
}
private bool UseSharedSLL(int packageID)
@ -420,13 +404,6 @@ namespace WebsitePanel.Portal
return true;
}
break;
case 552:
if (Convert.ToBoolean(quota.QuotaAllocatedValue))
{
return true;
}
break;
}
}

View file

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

View file

@ -0,0 +1,80 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseBackupSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseBackupSiteCollection" %>
<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="SharePointSiteCollection48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="SharePoint Site Collections"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table cellspacing="0" cellpadding="5" width="100%">
<tr>
<td class="Huge" colspan="2">
<asp:Literal ID="litSiteCollectionName" runat="server"></asp:Literal></td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="SubHead" valign="top">
<asp:Label ID="lblBackupFileName" runat="server" meta:resourcekey="lblBackupFileName"
Text="Backup File Name:"></asp:Label></td>
<td class="normal">
<asp:TextBox ID="txtBackupName" runat="server" CssClass="NormalTextBox" Width="200"></asp:TextBox><asp:RequiredFieldValidator
ID="validatorUserName" runat="server" ControlToValidate="txtBackupName" CssClass="NormalBold"
Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="SubHead" valign="top">
<asp:Label ID="lblBackupOptions" runat="server" meta:resourcekey="lblBackupOptions"
Text="Backup Options:"></asp:Label></td>
<td class="normal">
<asp:CheckBox ID="chkZipBackup" runat="server" meta:resourcekey="chkZipBackup" Checked="True"
Text="ZIP Backup" AutoPostBack="True" OnCheckedChanged="chkZipBackup_CheckedChanged">
</asp:CheckBox><br />
<br />
</td>
</tr>
<tr>
<td class="SubHead" valign="top">
<asp:Label ID="lblBackupDestination" runat="server" meta:resourcekey="lblBackupDestination"
Text="Backup Destination:"></asp:Label></td>
<td class="normal">
<asp:RadioButton ID="rbDownload" runat="server" meta:resourcekey="rbDownload" Checked="True"
Text="Download via HTTP" GroupName="action" AutoPostBack="True" OnCheckedChanged="rbDownload_CheckedChanged">
</asp:RadioButton><br />
<asp:RadioButton ID="rbCopy" runat="server" meta:resourcekey="rbCopy" Text="Copy to Folder"
GroupName="action" AutoPostBack="True" OnCheckedChanged="rbDownload_CheckedChanged">
</asp:RadioButton><br />
&nbsp;&nbsp;&nbsp;&nbsp;<uc1:FileLookup ID="fileLookup" runat="server" Width="300" />
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button ID="btnBackup" runat="server" meta:resourcekey="btnBackup" CssClass="Button1"
Text="Backup" OnClick="btnBackup_Click"/>
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1"
CausesValidation="false" Text="Cancel" OnClick="btnCancel_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,189 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.IO;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.SharePoint;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseBackupSiteCollection : WebsitePanelModuleBase
{
private const string BACKUP_EXTENSION = ".bsh";
private int OrganizationId
{
get
{
return PanelRequest.GetInt("ItemID");
}
}
private int SiteCollectionId
{
get
{
return PanelRequest.GetInt("SiteCollectionID");
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindSite();
}
}
private void BindSite()
{
try
{
SharePointEnterpriseSiteCollection siteCollection = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
litSiteCollectionName.Text = siteCollection.PhysicalAddress;
txtBackupName.Text = siteCollection.Url + BACKUP_EXTENSION;
fileLookup.SelectedFile = "\\";
fileLookup.PackageId = siteCollection.PackageId;
BindBackupName();
ToggleControls();
}
catch (Exception ex)
{
ShowErrorMessage("SHAREPOINT_GET_SITE", ex);
return;
}
}
private void BindBackupName()
{
string backupName = Path.GetFileNameWithoutExtension(txtBackupName.Text);
txtBackupName.Text = backupName + (chkZipBackup.Checked ? ".zip" : BACKUP_EXTENSION);
}
private void ToggleControls()
{
fileLookup.Visible = rbCopy.Checked;
}
private void BackupSiteCollection()
{
try
{
string bakFile = ES.Services.HostedSharePointServersEnt.Enterprise_BackupSiteCollection(this.SiteCollectionId,
txtBackupName.Text, chkZipBackup.Checked, rbDownload.Checked, fileLookup.SelectedFile);
if (rbDownload.Checked && !String.IsNullOrEmpty(bakFile))
{
string fileName = bakFile;
//Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(fileName));
Response.ContentType = "application/octet-stream";
int FILE_BUFFER_LENGTH = 5000000;
byte[] buffer = null;
int offset = 0;
do
{
// Read remote content.
buffer = ES.Services.HostedSharePointServersEnt.Enterprise_GetBackupBinaryChunk(this.SiteCollectionId, fileName, offset, FILE_BUFFER_LENGTH);
// Write to stream.
//Response.BinaryWrite(buffer);
Response.OutputStream.Write(buffer, 0, buffer.Length);
offset += FILE_BUFFER_LENGTH;
}
while (buffer.Length == FILE_BUFFER_LENGTH);
Response.Flush();
Response.End();
//Response.Close();
//HttpContext.Current.ApplicationInstance.CompleteRequest();
//Response.End();
}
}
catch (Exception ex)
{
ShowErrorMessage("SHAREPOINT_BACKUP_SITE", ex);
return;
}
//Response.ClearContent();
Context.Response.Clear();
if (!rbDownload.Checked)
RedirectBack();
}
protected void btnBackup_Click(object sender, EventArgs e)
{
BackupSiteCollection();
}
protected void btnCancel_Click(object sender, EventArgs e)
{
RedirectBack();
}
private void RedirectBack()
{
HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void chkZipBackup_CheckedChanged(object sender, EventArgs e)
{
BindBackupName();
}
protected void rbDownload_CheckedChanged(object sender, EventArgs e)
{
ToggleControls();
}
protected override void OnPreRender(EventArgs e)
{
string str = string.Format("var rb = document.getElementById('{0}'); if (!rb.checked) ShowProgressDialog('Backing up site collection...');", rbDownload.ClientID);
btnBackup.Attributes.Add("onclick", str);
base.OnPreRender(e);
}
}
}

View file

@ -0,0 +1,159 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseBackupSiteCollection {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// litSiteCollectionName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litSiteCollectionName;
/// <summary>
/// lblBackupFileName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblBackupFileName;
/// <summary>
/// txtBackupName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtBackupName;
/// <summary>
/// validatorUserName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator validatorUserName;
/// <summary>
/// lblBackupOptions control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblBackupOptions;
/// <summary>
/// chkZipBackup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkZipBackup;
/// <summary>
/// lblBackupDestination control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblBackupDestination;
/// <summary>
/// rbDownload control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton rbDownload;
/// <summary>
/// rbCopy control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton rbCopy;
/// <summary>
/// fileLookup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.FileLookup fileLookup;
/// <summary>
/// btnBackup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnBackup;
/// <summary>
/// btnCancel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancel;
}
}

View file

@ -0,0 +1,209 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseEditSiteCollection.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseEditSiteCollection" %>
<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/AllocatePackageIPAddresses.ascx" TagName="SiteUrlBuilder" TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/UserSelector.ascx" TagName="UserSelector" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
<%@ Register Src="../DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="SharePointSiteCollection48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="SharePoint Site Collection"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="localMessageBox" runat="server">
</wsp:SimpleMessageBox>
<table id="tblEditItem" runat="server" cellspacing="0" cellpadding="5" width="100%">
<tr id="rowUrl">
<td class="SubHead" nowrap width="200">
<asp:Label ID="lblSiteCollectionUrl" runat="server" meta:resourcekey="lblSiteCollectionUrl"
Text="Url:"></asp:Label>
</td>
<td width="100%" class="NormalBold">
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domain" runat="server" HideWebSites="false" HideDomainPointers="true" HideInstantAlias="true"/>
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
ErrorMessage="Enter valid hostname" ControlToValidate="txtHostName" Display="Dynamic"
meta:resourcekey="valRequireCorrectHostName" ValidationExpression="^([0-9a-zA-Z])*[0-9a-zA-Z]+$" SetFocusOnError="True"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSiteCollectionOwner" runat="server" meta:resourcekey="lblSiteCollectionOwner"
Text="Owner:"></asp:Label>
</td>
<td class="Normal">
<wsp:UserSelector id="userSelector" IncludeMailboxes="true" runat="server"/>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSiteCollectionLocaleID" runat="server" meta:resourcekey="lblSiteCollectionLocaleID"
Text="Locale ID:"></asp:Label>
</td>
<td class="Normal">
<asp:DropDownList ID="ddlLocaleID" runat="server" DataTextField="DisplayName" DataValueField="LCID" ></asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblMaxStorage" runat="server" meta:resourcekey="lblMaxStorage"></asp:Label>
</td>
<td class="Normal">
<uc1:QuotaEditor ID="maxStorage" runat="server" Width="200px" CssClass="NormalTextBox" QuotaTypeId="2" />
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblWarningStorage" runat="server" meta:resourcekey="lblWarningStorage"></asp:Label>
</td>
<td class="Normal">
<uc1:QuotaEditor ID="warningStorage" runat="server" Width="200px" QuotaTypeId="2" CssClass="NormalTextBox"/>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Text="Title:"></asp:Label>
</td>
<td class="Normal">
<asp:TextBox ID="txtTitle" runat="server" Width="200px" CssClass="NormalTextBox" ></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireTitle" runat="server" ErrorMessage="*"
ControlToValidate="txtTitle" ValidationGroup="CreateSiteCollection"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblDescription" runat="server" meta:resourcekey="lblDescription" Text="Description:"></asp:Label>
</td>
<td class="Normal">
<asp:TextBox ID="txtDescription" runat="server" Width="200px" CssClass="NormalTextBox"
TextMode="MultiLine" Rows="5"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
ControlToValidate="txtDescription" ValidationGroup="CreateSiteCollection"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
<table id="tblViewItem" runat="server" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td class="SubHead" nowrap width="200">
<asp:Label ID="lblSiteCollectionUrl2" runat="server" meta:resourcekey="lblSiteCollectionUrl"
Text="Url:"></asp:Label>
</td>
<td width="100%" class="NormalBold">
<span class="Huge">
<asp:HyperLink runat="server" ID="lnkUrl" /> </span>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSiteCollectionOwner2" runat="server" meta:resourcekey="lblSiteCollectionOwner"
Text="Owner:"></asp:Label>
</td>
<td class="Normal">
<asp:Literal ID="litSiteCollectionOwner" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblSiteCollectionLocaleID2" runat="server" meta:resourcekey="lblSiteCollectionLocaleID"
Text="Locale ID:"></asp:Label>
</td>
<td class="Normal">
<asp:Literal ID="litLocaleID" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblMaxStorageView" runat="server" meta:resourcekey="lblMaxStorage"
Text="Limit site storage to a maximum of:"></asp:Label>
</td>
<td class="Normal">
<uc1:QuotaEditor ID="editMaxStorage" runat="server" Width="200px" QuotaTypeId="2" CssClass="NormalTextBox"/>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblWarningStorageView" runat="server" meta:resourcekey="lblWarningStorage"
Text="Send warning E-mail when site storage reaches:"></asp:Label>
</td>
<td class="Normal">
<uc1:QuotaEditor ID="editWarningStorage" runat="server" Width="200px" QuotaTypeId="2" CssClass="NormalTextBox"/>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblTitle2" runat="server" meta:resourcekey="lblTitle" Text="Title:"></asp:Label>
</td>
<td class="Normal">
<asp:Literal ID="litTitle" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td class="SubHead">
<asp:Label ID="lblDescription2" runat="server" meta:resourcekey="lblDescription"
Text="Description:"></asp:Label>
</td>
<td class="Normal">
<asp:Literal ID="litDescription" runat="server"></asp:Literal>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td>
<wsp:CollapsiblePanel id="secMainTools" runat="server" IsCollapsed="true" TargetControlID="ToolsPanel"
meta:resourcekey="secMainTools" Text="SharePoint Site Collection Tools">
</wsp:CollapsiblePanel>
<asp:Panel ID="ToolsPanel" runat="server" Height="0" Style="overflow: hidden;">
<table id="tblMaintenance" runat="server" cellpadding="10">
<tr>
<td>
<asp:Button ID="btnBackup" runat="server" meta:resourcekey="btnBackup" CausesValidation="false"
Text="Backup Site Collection" CssClass="Button3" OnClick="btnBackup_Click" />
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnRestore" runat="server" meta:resourcekey="btnRestore" CausesValidation="false"
Text="Restore Site Collection" CssClass="Button3" OnClick="btnRestore_Click" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button ID="btnUpdate" runat="server" CssClass="Button1"
Text="Update" OnClick="btnUpdate_Click" ValidationGroup="CreateSiteCollection" />
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1"
CausesValidation="false" Text="Cancel" OnClick="btnCancel_Click" />
<asp:Button ID="btnDelete" runat="server" meta:resourcekey="btnDelete" CssClass="Button1"
CausesValidation="false" Text="Delete" OnClientClick="return confirm('Delete Site?');"
OnClick="btnDelete_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,450 @@
// 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.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.DNS;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.SharePoint;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseEditSiteCollection : WebsitePanelModuleBase
{
SharePointEnterpriseSiteCollection item = null;
private int OrganizationId
{
get
{
return PanelRequest.GetInt("ItemID");
}
}
private int SiteCollectionId
{
get
{
return PanelRequest.GetInt("SiteCollectionID");
}
}
protected void Page_Load(object sender, EventArgs e)
{
domain.PackageId = PanelSecurity.PackageId;
warningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
editWarningStorage.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
bool newItem = (this.SiteCollectionId == 0);
tblEditItem.Visible = newItem;
tblViewItem.Visible = !newItem;
//btnUpdate.Visible = newItem;
btnDelete.Visible = !newItem;
btnUpdate.Text = newItem ? GetLocalizedString("Text.Add") : GetLocalizedString("Text.Update");
btnUpdate.OnClientClick = newItem ? GetLocalizedString("btnCreate.OnClientClick") : GetLocalizedString("btnUpdate.OnClientClick");
btnBackup.Enabled = btnRestore.Enabled = !newItem;
// bind item
BindItem();
}
private void BindItem()
{
try
{
if (!IsPostBack)
{
if (!this.IsDnsServiceAvailable())
{
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DNS");
}
// load item if required
if (this.SiteCollectionId > 0)
{
// existing item
item = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
if (item != null)
{
// save package info
ViewState["PackageId"] = item.PackageId;
}
else
RedirectToBrowsePage();
}
else
{
// new item
ViewState["PackageId"] = PanelSecurity.PackageId;
if (UseSharedSLL(PanelSecurity.PackageId))
{
rowUrl.Visible = false;
valRequireHostName.Enabled = false;
valRequireCorrectHostName.Enabled = false;
}
}
//this.gvUsers.DataBind();
List<CultureInfo> cultures = new List<CultureInfo>();
foreach (int localeId in ES.Services.HostedSharePointServersEnt.Enterprise_GetSupportedLanguages(PanelSecurity.PackageId))
{
cultures.Add(new CultureInfo(localeId, false));
}
this.ddlLocaleID.DataSource = cultures;
this.ddlLocaleID.DataBind();
}
if (!IsPostBack)
{
// bind item to controls
if (item != null)
{
// bind item to controls
lnkUrl.Text = item.PhysicalAddress;
lnkUrl.NavigateUrl = item.PhysicalAddress;
litSiteCollectionOwner.Text = String.Format("{0} ({1})", item.OwnerName, item.OwnerEmail);
litLocaleID.Text = new CultureInfo(item.LocaleId, false).DisplayName;
litTitle.Text = item.Title;
litDescription.Text = item.Description;
editWarningStorage.QuotaValue = (int)item.WarningStorage;
editMaxStorage.QuotaValue = (int)item.MaxSiteStorage;
}
Organization org = ES.Services.Organizations.GetOrganization(OrganizationId);
if (org != null)
{
SetStorageQuotas(org, item);
}
}
//OrganizationDomainName[] domains = ES.Services.Organizations.GetOrganizationDomains(PanelRequest.ItemID);
//DomainInfo[] domains = ES.Services.Servers.GetMyDomains(PanelSecurity.PackageId);
EnterpriseServer.DomainInfo[] domains = ES.Services.Servers.GetDomains(PanelSecurity.PackageId);
if (domains.Length == 0)
{
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_DOMAINS");
DisableFormControls(this, btnCancel);
return;
}
//if (this.gvUsers.Rows.Count == 0)
//{
// localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
// DisableFormControls(this, btnCancel);
// return;
//}
}
catch
{
localMessageBox.ShowWarningMessage("INIT_SERVICE_ITEM_FORM");
DisableFormControls(this, btnCancel);
return;
}
}
/// <summary> Checks and sets disk quotas values.</summary>
/// <param name="organization"> The organization.</param>
/// <param name="collection"> The site collection.</param>
private void SetStorageQuotas(Organization organization, SharePointEnterpriseSiteCollection collection)
{
var quotaValue = organization.MaxSharePointEnterpriseStorage;
if (quotaValue != -1)
{
var spaceResrved = GetReservedDiskStorageSpace();
if (spaceResrved > quotaValue)
{
quotaValue = 0;
}
else
{
quotaValue -= spaceResrved;
}
if (collection != null)
{
quotaValue += (int)collection.MaxSiteStorage;
}
}
maxStorage.ParentQuotaValue = quotaValue;
maxStorage.QuotaValue = quotaValue;
editMaxStorage.ParentQuotaValue = quotaValue;
warningStorage.ParentQuotaValue = quotaValue;
warningStorage.QuotaValue = quotaValue;
editWarningStorage.ParentQuotaValue = quotaValue;
btnUpdate.Enabled = quotaValue != 0;
}
/// <summary> Gets disk space reserved by existing site collections.</summary>
/// <returns> Reserved disk space vallue.</returns>
private int GetReservedDiskStorageSpace()
{
var existingCollections = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollections(PanelSecurity.PackageId, false);
return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage);
}
private void SaveItem()
{
if (!Page.IsValid)
{
return;
}
if (this.SiteCollectionId == 0)
{
if (this.userSelector.GetAccount() == null)
{
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_NO_USERS");
return;
}
// new item
try
{
item = new SharePointEnterpriseSiteCollection();
if (!UseSharedSLL(PanelSecurity.PackageId))
{
SharePointEnterpriseSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), 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, this.txtHostName.Text.ToLower() + "." + this.domain.DomainName))
{
localMessageBox.ShowWarningMessage("HOSTEDSHAREPOINT_DOMAIN_IN_USE");
return;
}
}
item.Name = this.txtHostName.Text.ToLower() + "." + this.domain.DomainName;
}
else
item.Name = string.Empty;
// get form data
item.OrganizationId = this.OrganizationId;
item.Id = this.SiteCollectionId;
item.PackageId = PanelSecurity.PackageId;
item.LocaleId = Int32.Parse(this.ddlLocaleID.SelectedValue);
item.OwnerLogin = this.userSelector.GetSAMAccountName();
item.OwnerEmail = this.userSelector.GetPrimaryEmailAddress();
item.OwnerName = this.userSelector.GetDisplayName();
item.Title = txtTitle.Text;
item.Description = txtDescription.Text;
item.MaxSiteStorage = maxStorage.QuotaValue;
item.WarningStorage = warningStorage.QuotaValue;
int result = ES.Services.HostedSharePointServersEnt.Enterprise_AddSiteCollection(item);
if (result < 0)
{
localMessageBox.ShowResultMessage(result);
return;
}
}
catch (Exception ex)
{
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_ADD_SITECOLLECTION", ex);
return;
}
}
else
{
ES.Services.HostedSharePointServersEnt.Enterprise_UpdateQuota(PanelRequest.ItemID, SiteCollectionId, editMaxStorage.QuotaValue, editWarningStorage.QuotaValue);
}
// return
RedirectToSiteCollectionsList();
}
private void AddDnsRecord(int domainId, string recordName, string recordData)
{
int result = ES.Services.Servers.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, recordData, 0, 0, 0, 0);
if (result < 0)
{
ShowResultMessage(result);
}
}
private bool IsDnsServiceAvailable()
{
ProviderInfo dnsProvider = ES.Services.Servers.GetPackageServiceProvider(PanelSecurity.PackageId, ResourceGroups.Dns);
return dnsProvider != null;
}
private void DeleteItem()
{
// delete
try
{
int result = ES.Services.HostedSharePointServersEnt.Enterprise_DeleteSiteCollection(this.SiteCollectionId);
if (result < 0)
{
ShowResultMessage(result);
return;
}
}
catch (Exception ex)
{
localMessageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
return;
}
// return
RedirectToSiteCollectionsList();
}
protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
localMessageBox.ShowErrorMessage("ORGANIZATION_GET_USERS", e.Exception);
e.ExceptionHandled = true;
}
}
protected void btnCancel_Click(object sender, EventArgs e)
{
// return
RedirectToSiteCollectionsList();
}
protected void btnDelete_Click(object sender, EventArgs e)
{
DeleteItem();
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
SaveItem();
}
protected void btnBackup_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void btnRestore_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
private void RedirectToSiteCollectionsList()
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString()));
}
private bool UseSharedSLL(int packageID)
{
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
if (cntx != null)
{
foreach (QuotaValueInfo quota in cntx.QuotasArray)
{
switch (quota.QuotaId)
{
case 552:
if (Convert.ToBoolean(quota.QuotaAllocatedValue))
{
return true;
}
break;
}
}
}
return false;
}
//private void RegisterOwnerSelector()
//{
// // Define the name and type of the client scripts on the page.
// String csname = "OwnerSelectorScript";
// Type cstype = this.GetType();
// // Get a ClientScriptManager reference from the Page class.
// ClientScriptManager cs = Page.ClientScript;
// // Check to see if the client script is already registered.
// if (!cs.IsClientScriptBlockRegistered(cstype, csname))
// {
// StringBuilder ownerSelector = new StringBuilder();
// ownerSelector.Append("<script type=text/javascript> function DoSelectOwner(ownerId, ownerDisplayName, email) {");
// ownerSelector.AppendFormat("{0}.{1}.value=ownerId;", this.Page.Form.ID, this.hdnSiteCollectionOwner.ClientID);
// ownerSelector.AppendFormat("{0}.{1}.value=ownerDisplayName;", this.Page.Form.ID, this.txtSiteCollectionOwner.ClientID);
// ownerSelector.AppendFormat("{0}.{1}.value=email;", this.Page.Form.ID, this.hdnSiteCollectionOwnerEmail.ClientID);
// ownerSelector.Append("} </script>");
// cs.RegisterClientScriptBlock(cstype, csname, ownerSelector.ToString(), false);
// }
//}
//private StringDictionary ConvertArrayToDictionary(string[] settings)
//{
// StringDictionary r = new StringDictionary();
// foreach (string setting in settings)
// {
// int idx = setting.IndexOf('=');
// r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
// }
// return r;
//}
}
}

View file

@ -0,0 +1,447 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseEditSiteCollection {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// localMessageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox localMessageBox;
/// <summary>
/// tblEditItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable tblEditItem;
/// <summary>
/// rowUrl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowUrl;
/// <summary>
/// lblSiteCollectionUrl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionUrl;
/// <summary>
/// txtHostName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtHostName;
/// <summary>
/// domain control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.DomainsSelectDomainControl domain;
/// <summary>
/// valRequireHostName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireHostName;
/// <summary>
/// valRequireCorrectHostName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RegularExpressionValidator valRequireCorrectHostName;
/// <summary>
/// lblSiteCollectionOwner control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionOwner;
/// <summary>
/// userSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserSelector userSelector;
/// <summary>
/// lblSiteCollectionLocaleID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionLocaleID;
/// <summary>
/// ddlLocaleID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlLocaleID;
/// <summary>
/// lblMaxStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMaxStorage;
/// <summary>
/// maxStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor maxStorage;
/// <summary>
/// lblWarningStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWarningStorage;
/// <summary>
/// warningStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor warningStorage;
/// <summary>
/// lblTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitle;
/// <summary>
/// txtTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTitle;
/// <summary>
/// valRequireTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireTitle;
/// <summary>
/// lblDescription control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblDescription;
/// <summary>
/// txtDescription control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtDescription;
/// <summary>
/// RequiredFieldValidator1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// tblViewItem control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable tblViewItem;
/// <summary>
/// lblSiteCollectionUrl2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionUrl2;
/// <summary>
/// lnkUrl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkUrl;
/// <summary>
/// lblSiteCollectionOwner2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionOwner2;
/// <summary>
/// litSiteCollectionOwner control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litSiteCollectionOwner;
/// <summary>
/// lblSiteCollectionLocaleID2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSiteCollectionLocaleID2;
/// <summary>
/// litLocaleID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litLocaleID;
/// <summary>
/// lblMaxStorageView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMaxStorageView;
/// <summary>
/// editMaxStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor editMaxStorage;
/// <summary>
/// lblWarningStorageView control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWarningStorageView;
/// <summary>
/// editWarningStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor editWarningStorage;
/// <summary>
/// lblTitle2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTitle2;
/// <summary>
/// litTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litTitle;
/// <summary>
/// lblDescription2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblDescription2;
/// <summary>
/// litDescription control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDescription;
/// <summary>
/// secMainTools control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secMainTools;
/// <summary>
/// ToolsPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel ToolsPanel;
/// <summary>
/// tblMaintenance control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTable tblMaintenance;
/// <summary>
/// btnBackup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnBackup;
/// <summary>
/// btnRestore control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnRestore;
/// <summary>
/// btnUpdate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnUpdate;
/// <summary>
/// btnCancel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancel;
/// <summary>
/// btnDelete control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnDelete;
}
}

View file

@ -0,0 +1,101 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseRestoreSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseRestoreSiteCollection" %>
<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
6
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="SharePointSiteCollection48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="SharePoint Site Collections"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<table cellspacing="0" cellpadding="5" width="100%">
<tr>
<td class="Huge" colspan="2">
<asp:Literal ID="litSiteCollectionName" runat="server"></asp:Literal></td>
</tr>
<tr>
<td>
&nbsp;</td>
</tr>
<tr>
<td class="SubHead" valign="top" nowrap width="200">
<asp:Label ID="lblRestoreFrom" runat="server" meta:resourcekey="lblRestoreFrom" Text="Restore From:"></asp:Label></td>
<td class="normal" width="100%">
<table width="100%">
<tr>
<td class="Normal">
<asp:RadioButton ID="radioUpload" meta:resourcekey="radioUpload" Checked="True" GroupName="media"
Text="Uploaded File" runat="server" AutoPostBack="True" OnCheckedChanged="radioUpload_CheckedChanged">
</asp:RadioButton></td>
</tr>
<tr>
<td class="Normal">
<asp:RadioButton ID="radioFile" meta:resourcekey="radioFile" GroupName="media" Text="Hosting Space File"
runat="server" AutoPostBack="True" OnCheckedChanged="radioUpload_CheckedChanged">
</asp:RadioButton></td>
</tr>
<tr>
<td class="Normal" id="cellUploadFile" runat="server">
<table width="100%">
<tr>
<td>
<asp:FileUpload ID="uploadFile" runat="server" Width="300px" /></td>
</tr>
<tr>
<td class="Small" nowrap>
<asp:Label ID="lblAllowedFiles1" runat="server" meta:resourcekey="lblAllowedFiles"
Text=".ZIP, .BAK files are allowed"></asp:Label></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="Normal" id="cellFile" runat="server">
<table width="100%">
<tr>
<td>
<uc1:FileLookup ID="fileLookup" runat="server" Width="300" IncludeFiles="true" />
</td>
</tr>
<tr>
<td class="Small" nowrap>
<asp:Label ID="lblAllowedFiles2" runat="server" meta:resourcekey="lblAllowedFiles"
Text=".ZIP, .BAK files are allowed"></asp:Label></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</td>
</tr>
</table>
<div class="FormFooterClean">
<asp:Button ID="btnRestore" runat="server" meta:resourcekey="btnRestore" CssClass="Button1"
Text="Restore" OnClick="btnRestore_Click" OnClientClick="ShowProgressDialog('Restoring site collection...');"/>
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1"
CausesValidation="false" Text="Cancel" OnClick="btnCancel_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,176 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.IO;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebsitePanel.Providers.SharePoint;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseRestoreSiteCollection : WebsitePanelModuleBase
{
private int OrganizationId
{
get
{
return PanelRequest.GetInt("ItemID");
}
}
private int SiteCollectionId
{
get
{
return PanelRequest.GetInt("SiteCollectionID");
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindSite();
}
}
private void BindSite()
{
try
{
SharePointEnterpriseSiteCollection siteCollection = ES.Services.HostedSharePointServersEnt.Enterprise_GetSiteCollection(this.SiteCollectionId);
litSiteCollectionName.Text = siteCollection.PhysicalAddress;
fileLookup.SelectedFile = String.Empty;
fileLookup.PackageId = siteCollection.PackageId;
ToggleControls();
}
catch (Exception ex)
{
ShowErrorMessage("SHAREPOINT_GET_SITE", ex);
return;
}
}
private void ToggleControls()
{
cellFile.Visible = radioFile.Checked;
cellUploadFile.Visible = radioUpload.Checked;
}
private void RestoreSiteCollection()
{
try
{
string uploadedFile = null;
string packageFile = null;
if (radioUpload.Checked)
{
if (uploadFile.PostedFile.FileName != "")
{
Stream stream = uploadFile.PostedFile.InputStream;
// save uploaded file
int FILE_BUFFER_LENGTH = 5000000;
string path = null;
int readBytes = 0;
string fileName = Path.GetFileName(uploadFile.PostedFile.FileName);
int offset = 0;
do
{
// read input stream
byte[] buffer = new byte[FILE_BUFFER_LENGTH];
readBytes = stream.Read(buffer, 0, FILE_BUFFER_LENGTH);
if (readBytes < FILE_BUFFER_LENGTH)
Array.Resize<byte>(ref buffer, readBytes);
// write remote backup file
string tempPath = ES.Services.HostedSharePointServersEnt.Enterprise_AppendBackupBinaryChunk(this.SiteCollectionId, fileName, path, buffer);
if (path == null)
path = tempPath;
offset += FILE_BUFFER_LENGTH;
}
while (readBytes == FILE_BUFFER_LENGTH);
uploadedFile = path;
}
}
else
{
// package files
packageFile = fileLookup.SelectedFile;
}
int result = ES.Services.HostedSharePointServersEnt.Enterprise_RestoreSiteCollection(this.SiteCollectionId, uploadedFile, packageFile);
if (result < 0)
{
ShowResultMessage(result);
return;
}
}
catch (Exception ex)
{
ShowErrorMessage("SHAREPOINT_RESTORE_SITE", ex);
return;
}
RedirectBack();
}
protected void btnRestore_Click(object sender, EventArgs e)
{
RestoreSiteCollection();
}
protected void btnCancel_Click(object sender, EventArgs e)
{
RedirectBack();
}
private void RedirectBack()
{
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString()));
}
protected void radioUpload_CheckedChanged(object sender, EventArgs e)
{
ToggleControls();
}
}
}

View file

@ -0,0 +1,159 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseRestoreSiteCollection {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// litSiteCollectionName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litSiteCollectionName;
/// <summary>
/// lblRestoreFrom control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblRestoreFrom;
/// <summary>
/// radioUpload control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton radioUpload;
/// <summary>
/// radioFile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButton radioFile;
/// <summary>
/// cellUploadFile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell cellUploadFile;
/// <summary>
/// uploadFile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.FileUpload uploadFile;
/// <summary>
/// lblAllowedFiles1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblAllowedFiles1;
/// <summary>
/// cellFile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell cellFile;
/// <summary>
/// fileLookup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.FileLookup fileLookup;
/// <summary>
/// lblAllowedFiles2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblAllowedFiles2;
/// <summary>
/// btnRestore control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnRestore;
/// <summary>
/// btnCancel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancel;
}
}

View file

@ -0,0 +1,92 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointEnterpriseSiteCollections.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseSiteCollections" %>
<%@ Register Src="../UserControls/SpaceServiceItems.ascx" TagName="SpaceServiceItems"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/Quota.ascx" TagName="Quota" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
<script type="text/javascript">
function confirmation()
{
if (!confirm("Are you sure you want to delete Site Collection?")) return false; else ShowProgressDialog('Deleting SharePoint site collection...');
}
</script>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="SharePointSiteCollection48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="SharePoint Site Collections"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanLeft">
<asp:Button ID="btnCreateSiteCollection" runat="server" meta:resourcekey="btnCreateSiteCollection"
Text="Create New Site Collection" CssClass="Button1" OnClick="btnCreateSiteCollection_Click" />
</div>
<div class="FormButtonsBarCleanRight">
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
<asp:Localize ID="locSearch" runat="server" meta:resourcekey="locSearch" Visible="false"></asp:Localize>
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
<asp:ListItem Value="ItemName" meta:resourcekey="ddlSearchColumnUrl">Url</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox"
Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" runat="server" meta:resourcekey="cmdSearch"
SkinID="SearchButton" CausesValidation="false" />
</asp:Panel>
</div>
</div>
<asp:GridView ID="gvSiteCollections" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvSiteCollection" CssSelectorClass="NormalGridView" OnRowCommand="gvSiteCollections_RowCommand"
AllowPaging="True" AllowSorting="True" DataSourceID="odsSiteCollectionsPaged">
<Columns>
<asp:TemplateField meta:resourcekey="gvSiteCollectionUrl" SortExpression="ItemName">
<ItemStyle Width="50%"></ItemStyle>
<ItemTemplate>
<asp:HyperLink ID="lnk1" runat="server" NavigateUrl='<%# GetSiteCollectionEditUrl(Eval("Id").ToString()) %>'>
<%# Eval("PhysicalAddress") %>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField meta:resourcekey="gvOwnerDisplayName" DataField="OwnerName" ItemStyle-Width="50%" />
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"
CommandName="DeleteItem" CommandArgument='<%# Eval("Id") %>'
OnClientClick="confirmation()"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsSiteCollectionsPaged" runat="server" EnablePaging="True" SelectCountMethod="GetSharePointEnterpriseSiteCollectionPagedCount"
SelectMethod="GetSharePointEnterpriseSiteCollectionPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.HostedSharePointEnterpriseSiteCollectionsHelper"
OnSelected="odsSharePointEnterpriseSiteCollectionPaged_Selected">
<SelectParameters>
<asp:QueryStringParameter Name="packageId" QueryStringField="SpaceID" DefaultValue="-1" />
<asp:QueryStringParameter Name="organizationId" QueryStringField="ItemID" DefaultValue="0" />
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
</SelectParameters>
</asp:ObjectDataSource>
<br />
<asp:Localize ID="locQuota" runat="server" meta:resourcekey="locQuota" Text="Total Site Collections Created:"></asp:Localize>
&nbsp;&nbsp;&nbsp;
<%--<wsp:Quota ID="siteCollectionsQuota1" runat="server" QuotaName="HostedSharePoint.Sites" />--%>
<wsp:QuotaViewer ID="siteCollectionsQuota" runat="server" QuotaTypeId="2" />
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,110 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using WebsitePanel.Providers.SharePoint;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseSiteCollections : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
this.BindStats();
}
private void BindStats()
{
// quota values
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
siteCollectionsQuota.QuotaUsedValue = stats.CreatedSharePointEnterpriseSiteCollections;
siteCollectionsQuota.QuotaValue = stats.AllocatedSharePointEnterpriseSiteCollections;
if (stats.AllocatedSharePointEnterpriseSiteCollections != -1) siteCollectionsQuota.QuotaAvailable = tenantStats.AllocatedSharePointEnterpriseSiteCollections - tenantStats.CreatedSharePointEnterpriseSiteCollections;
}
protected void btnCreateSiteCollection_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_enterprise_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString()));
}
public string GetSiteCollectionEditUrl(string siteCollectionId)
{
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_enterprise_edit_sitecollection",
"SiteCollectionID=" + siteCollectionId,
"ItemID=" + PanelRequest.ItemID.ToString());
}
protected void odsSharePointEnterpriseSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception != null)
{
messageBox.ShowErrorMessage("HOSTEDSHAREPOINT_GET_SITECOLLECTIONS", e.Exception);
e.ExceptionHandled = true;
}
}
protected void gvSiteCollections_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "DeleteItem")
{
int siteCollectionId = Utils.ParseInt(e.CommandArgument.ToString(), 0);
try
{
int result = ES.Services.HostedSharePointServersEnt.Enterprise_DeleteSiteCollection(siteCollectionId);
if (result < 0)
{
messageBox.ShowResultMessage(result);
return;
}
gvSiteCollections.DataBind();
this.BindStats();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("HOSTEDSHAREPOINT_DELETE_SITECOLLECTION", ex);
}
}
}
}
}

View file

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseSiteCollections {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// btnCreateSiteCollection control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCreateSiteCollection;
/// <summary>
/// SearchPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel SearchPanel;
/// <summary>
/// locSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locSearch;
/// <summary>
/// ddlSearchColumn control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSearchColumn;
/// <summary>
/// txtSearchValue control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSearchValue;
/// <summary>
/// cmdSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
/// <summary>
/// gvSiteCollections control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvSiteCollections;
/// <summary>
/// odsSiteCollectionsPaged control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsSiteCollectionsPaged;
/// <summary>
/// locQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locQuota;
/// <summary>
/// siteCollectionsQuota control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer siteCollectionsQuota;
}
}

View file

@ -0,0 +1,62 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointEnterpriseStorageSettings.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseStorageSettings" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register src="../UserControls/QuotaEditor.ascx" tagname="QuotaEditor" tagprefix="uc1" %>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeStorageConfig48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" ></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secStorageLimits" runat="server"
TargetControlID="StorageLimits" meta:resourcekey="secStorageLimits" >
</wsp:CollapsiblePanel>
<asp:Panel ID="StorageLimits" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel200" align="right"><asp:Localize ID="locMaxStorage" runat="server" meta:resourcekey="locMaxStorage" ></asp:Localize></td>
<td>
<uc1:QuotaEditor QuotaTypeId="2" ID="maxStorageSettingsValue" runat="server" />
</td>
</tr>
<tr>
<td class="FormLabel200" align="right"><asp:Localize ID="locWarningStorage" runat="server" meta:resourcekey="locWarningStorage" ></asp:Localize></td>
<td>
<uc1:QuotaEditor QuotaTypeId="2" ID="warningValue" runat="server" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<div class="FormFooterClean">
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave"
ValidationGroup="EditStorageSettings" OnClick="btnSave_Click" ></asp:Button>
<asp:Button id="btnSaveApply" runat="server" Text="Save and Apply to All SiteCollections" CssClass="Button1" meta:resourcekey="btnSaveApply"
ValidationGroup="EditStorageSettings" OnClick="btnSaveApply_Click" ></asp:Button>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,93 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseStorageSettings : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
warningValue.UnlimitedText = GetLocalizedString("WarningUnlimitedValue");
if (!IsPostBack)
{
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
foreach(QuotaValueInfo quota in cntx.QuotasArray)
{
if (quota.QuotaId == 551 /*Max storage quota*/)
{
maxStorageSettingsValue.ParentQuotaValue = quota.QuotaAllocatedValue;
warningValue.ParentQuotaValue = quota.QuotaAllocatedValue;
}
}
maxStorageSettingsValue.QuotaValue = org.MaxSharePointEnterpriseStorage;
warningValue.QuotaValue = org.WarningSharePointEnterpriseStorage;
}
}
private void Save(bool apply)
{
try
{
int res = ES.Services.HostedSharePointServersEnt.Enterprise_SetStorageSettings(PanelRequest.ItemID, maxStorageSettingsValue.QuotaValue,
warningValue.QuotaValue,
apply);
if (res < 0)
{
messageBox.ShowResultMessage(res);
return;
}
messageBox.ShowSuccessMessage("HOSTED_SHAREPOINT_UPDATE_QUOTAS");
}
catch (Exception)
{
messageBox.ShowErrorMessage("HOSTED_SHAREPOINT_UPDATE_QUOTAS");
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
Save(false);
}
protected void btnSaveApply_Click(object sender, EventArgs e)
{
Save(true);
}
}
}

View file

@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseStorageSettings {
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// secStorageLimits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secStorageLimits;
/// <summary>
/// StorageLimits control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel StorageLimits;
/// <summary>
/// locMaxStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locMaxStorage;
/// <summary>
/// maxStorageSettingsValue control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor maxStorageSettingsValue;
/// <summary>
/// locWarningStorage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locWarningStorage;
/// <summary>
/// warningValue control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaEditor warningValue;
/// <summary>
/// btnSave control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave;
/// <summary>
/// btnSaveApply control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSaveApply;
}
}

View file

@ -0,0 +1,57 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HostedSharePointEnterpriseStorageUsage.ascx.cs" Inherits="WebsitePanel.Portal.HostedSharePointEnterpriseStorageUsage" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<div id="ExchangeContainer">
<div class="Module">
<div class="Left">
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeStorageConfig48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Storage Usage"></asp:Localize>
</div>
<div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secSiteCollectionsReport" runat="server"
TargetControlID="siteCollectionsReport" meta:resourcekey="secSiteCollectionsReport" Text="Site Collections">
</wsp:CollapsiblePanel>
<asp:Panel ID="siteCollectionsReport" runat="server" Height="0" style="overflow:hidden;">
<asp:GridView ID="gvStorageUsage" runat="server" AutoGenerateColumns="False" meta:resourcekey="gvStorageUsage"
Width="100%" EmptyDataText="gvSiteCollections" CssSelectorClass="NormalGridView">
<Columns>
<asp:BoundField meta:resourcekey="gvSiteCollectionName" DataField="Url" />
<asp:BoundField meta:resourcekey="gvSiteCollectionSize" DataField="DiskSpace" />
</Columns>
</asp:GridView>
<br />
<table cellpadding="2">
<tr>
<td class="FormLabel150"><asp:Localize ID="locTotalboxItems" runat="server" meta:resourcekey="locTotalMailboxItems" ></asp:Localize></td>
<td><asp:Label ID="lblTotalItems" runat="server" CssClass="NormalBold">177</asp:Label></td>
</tr>
<tr>
<td class="FormLabel150"><asp:Localize ID="locTotalMailboxesSize" runat="server" meta:resourcekey="locTotalMailboxesSize" ></asp:Localize></td>
<td><asp:Label ID="lblTotalSize" runat="server" CssClass="NormalBold">100</asp:Label></td>
</tr>
</table>
<br />
</asp:Panel>
<div class="FormFooterClean">
<asp:Button id="btnRecalculateDiscSpace" runat="server" Text="Recalculate Disk Space" CssClass="Button1" meta:resourcekey="btnRecalculateDiscSpace" OnClick="btnRecalculateDiscSpace_Click" ></asp:Button>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,94 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.SharePoint;
namespace WebsitePanel.Portal
{
public partial class HostedSharePointEnterpriseStorageUsage : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
BindGrid();
}
protected void btnRecalculateDiscSpace_Click(object sender, EventArgs e)
{
BindGrid();
}
private void BindGrid()
{
int errorCode;
try
{
SharePointEnterpriseSiteDiskSpace[] sharePointEnterpriseSiteDiskSpace =
ES.Services.HostedSharePointServersEnt.Enterprise_CalculateSharePointSitesDiskSpace(PanelRequest.ItemID,
out errorCode);
if (errorCode < 0)
{
messageBox.ShowResultMessage(errorCode);
return;
}
if (sharePointEnterpriseSiteDiskSpace != null && sharePointEnterpriseSiteDiskSpace.Length == 1 && string.IsNullOrEmpty(sharePointEnterpriseSiteDiskSpace[0].Url))
{
gvStorageUsage.DataSource = null;
gvStorageUsage.DataBind();
lblTotalItems.Text = "0";
lblTotalSize.Text = "0";
return;
}
gvStorageUsage.DataSource = sharePointEnterpriseSiteDiskSpace;
gvStorageUsage.DataBind();
if (sharePointEnterpriseSiteDiskSpace != null)
{
lblTotalItems.Text = sharePointEnterpriseSiteDiskSpace.Length.ToString();
long total = 0;
foreach (SharePointEnterpriseSiteDiskSpace current in sharePointEnterpriseSiteDiskSpace)
{
total += current.DiskSpace;
}
lblTotalSize.Text = total.ToString();
}
}
catch(Exception ex)
{
messageBox.ShowErrorMessage("HOSTED_SHAREPOINT_RECALCULATE_SIZE", ex);
}
}
}
}

View file

@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class HostedSharePointEnterpriseStorageUsage {
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// secSiteCollectionsReport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secSiteCollectionsReport;
/// <summary>
/// siteCollectionsReport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel siteCollectionsReport;
/// <summary>
/// gvStorageUsage control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvStorageUsage;
/// <summary>
/// locTotalboxItems control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTotalboxItems;
/// <summary>
/// lblTotalItems control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTotalItems;
/// <summary>
/// locTotalMailboxesSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTotalMailboxesSize;
/// <summary>
/// lblTotalSize control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTotalSize;
/// <summary>
/// btnRecalculateDiscSpace control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnRecalculateDiscSpace;
}
}

View file

@ -1,10 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="HostedSharePointRestoreSiteCollection.ascx.cs"
Inherits="WebsitePanel.Portal.HostedSharePointRestoreSiteCollection" %>
<%@ Register Src="UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
<%@ Register Src="../UserControls/FileLookup.ascx" TagName="FileLookup" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox"
TagPrefix="wsp" %>
6
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport"
TagPrefix="wsp" %>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />

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