This commit is contained in:
VoosW 2013-01-24 17:47:58 +01:00
commit f2b62d80eb
64 changed files with 171492 additions and 379 deletions

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.17929 // Runtime Version:4.0.30319.18010
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -15,8 +15,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")] [assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")]
[assembly: AssemblyVersion("2.0.0.1")] [assembly: AssemblyVersion("2.1.0.1")]
[assembly: AssemblyFileVersion("2.0.0.1")] [assembly: AssemblyFileVersion("2.1.0.1")]
[assembly: AssemblyInformationalVersion("2.0.0")] [assembly: AssemblyInformationalVersion("2.1.0")]

View file

@ -12,6 +12,20 @@ BEGIN
END END
GO GO
--- Fix on version 2.0
DELETE FROM HostingPlanQuotas WHERE QuotaID = 340
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 341
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 342
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 343
GO
DELETE FROM HostingPlanResources WHERE GroupID = 33
GO
-- Version 2.1 section -- Version 2.1 section
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted Microsoft Exchange Server 2013') IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted Microsoft Exchange Server 2013')
BEGIN BEGIN
@ -25,16 +39,6 @@ GO
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.AllowLitigationHold') IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.AllowLitigationHold')
DELETE FROM HostingPlanQuotas WHERE QuotaID = 340
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 341
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 342
GO
DELETE FROM HostingPlanQuotas WHERE QuotaID = 343
GO
DELETE FROM HostingPlanResources WHERE GroupID = 33
GO
BEGIN BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (420, 12, 24,N'Exchange2007.AllowLitigationHold',N'Allow Litigation Hold',1, 0 , NULL) INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (420, 12, 24,N'Exchange2007.AllowLitigationHold',N'Allow Litigation Hold',1, 0 , NULL)
END END
@ -58,6 +62,13 @@ ALTER TABLE [dbo].[ExchangeMailboxPlans] ADD
END END
GO GO
IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeMailboxPlans' AND COLS.name='LitigationHoldUrl')
BEGIN
ALTER TABLE [dbo].[ExchangeMailboxPlans] ADD
[LitigationHoldUrl] [nvarchar] (256) COLLATE Latin1_General_CI_AS NULL,
[LitigationHoldMsg] [nvarchar] (512) COLLATE Latin1_General_CI_AS NULL
END
GO
@ -85,7 +96,9 @@ ALTER PROCEDURE [dbo].[AddExchangeMailboxPlan]
@MailboxPlanType int, @MailboxPlanType int,
@AllowLitigationHold bit, @AllowLitigationHold bit,
@RecoverableItemsWarningPct int, @RecoverableItemsWarningPct int,
@RecoverableItemsSpace int @RecoverableItemsSpace int,
@LitigationHoldUrl nvarchar(256),
@LitigationHoldMsg nvarchar(512)
) )
AS AS
@ -123,7 +136,10 @@ INSERT INTO ExchangeMailboxPlans
MailboxPlanType, MailboxPlanType,
AllowLitigationHold, AllowLitigationHold,
RecoverableItemsWarningPct, RecoverableItemsWarningPct,
RecoverableItemsSpace RecoverableItemsSpace,
LitigationHoldUrl,
LitigationHoldMsg
) )
VALUES VALUES
( (
@ -147,7 +163,9 @@ VALUES
@MailboxPlanType, @MailboxPlanType,
@AllowLitigationHold, @AllowLitigationHold,
@RecoverableItemsWarningPct, @RecoverableItemsWarningPct,
@RecoverableItemsSpace @RecoverableItemsSpace,
@LitigationHoldUrl,
@LitigationHoldMsg
) )
SET @MailboxPlanId = SCOPE_IDENTITY() SET @MailboxPlanId = SCOPE_IDENTITY()
@ -185,7 +203,9 @@ ALTER PROCEDURE [dbo].[UpdateExchangeMailboxPlan]
@MailboxPlanType int, @MailboxPlanType int,
@AllowLitigationHold bit, @AllowLitigationHold bit,
@RecoverableItemsWarningPct int, @RecoverableItemsWarningPct int,
@RecoverableItemsSpace int @RecoverableItemsSpace int,
@LitigationHoldUrl nvarchar(256),
@LitigationHoldMsg nvarchar(512)
) )
AS AS
@ -209,7 +229,10 @@ UPDATE ExchangeMailboxPlans SET
MailboxPlanType = @MailboxPlanType, MailboxPlanType = @MailboxPlanType,
AllowLitigationHold = @AllowLitigationHold, AllowLitigationHold = @AllowLitigationHold,
RecoverableItemsWarningPct = @RecoverableItemsWarningPct, RecoverableItemsWarningPct = @RecoverableItemsWarningPct,
RecoverableItemsSpace = @RecoverableItemsSpace RecoverableItemsSpace = @RecoverableItemsSpace,
LitigationHoldUrl = @LitigationHoldUrl,
LitigationHoldMsg = @LitigationHoldMsg
WHERE MailboxPlanId = @MailboxPlanId WHERE MailboxPlanId = @MailboxPlanId
RETURN RETURN
@ -217,6 +240,81 @@ RETURN
GO GO
ALTER PROCEDURE [dbo].[GetExchangeMailboxPlan]
(
@MailboxPlanId int
)
AS
SELECT
MailboxPlanId,
ItemID,
MailboxPlan,
EnableActiveSync,
EnableIMAP,
EnableMAPI,
EnableOWA,
EnablePOP,
IsDefault,
IssueWarningPct,
KeepDeletedItemsDays,
MailboxSizeMB,
MaxReceiveMessageSizeKB,
MaxRecipients,
MaxSendMessageSizeKB,
ProhibitSendPct,
ProhibitSendReceivePct,
HideFromAddressBook,
MailboxPlanType,
AllowLitigationHold,
RecoverableItemsWarningPct,
RecoverableItemsSpace,
LitigationHoldUrl,
LitigationHoldMsg
FROM
ExchangeMailboxPlans
WHERE
MailboxPlanId = @MailboxPlanId
RETURN
GO
ALTER PROCEDURE [dbo].[GetExchangeOrganizationStatistics]
(
@ItemID int
)
AS
IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
BEGIN
SELECT
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
(SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
(SELECT MIN(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
(SELECT MIN(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace
END
ELSE
BEGIN
SELECT
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
(SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains,
(SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace,
(SELECT SUM(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace
END
RETURN
GO
-- UPDATE Domains SET IsDomainPointer=0, DomainItemID=NULL WHERE MailDomainID IS NOT NULL AND isDomainPointer=1 -- UPDATE Domains SET IsDomainPointer=0, DomainItemID=NULL WHERE MailDomainID IS NOT NULL AND isDomainPointer=1
@ -315,4 +413,10 @@ exec sp_xml_removedocument @idoc
COMMIT TRAN COMMIT TRAN
RETURN RETURN
GO GO
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted MS CRM 2011')
BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (1201, 21, N'CRM', N'Hosted MS CRM 2011', N'WebsitePanel.Providers.HostedSolution.CRMProvider2011, WebsitePanel.Providers.HostedSolution', N'CRM', NULL)
END
GO

View file

@ -2534,7 +2534,7 @@ namespace WebsitePanel.EnterpriseServer
public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP,
bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients,
int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType,
bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int); SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int);
outParam.Direction = ParameterDirection.Output; outParam.Direction = ParameterDirection.Output;
@ -2563,8 +2563,10 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@HideFromAddressBook", hideFromAddressBook), new SqlParameter("@HideFromAddressBook", hideFromAddressBook),
new SqlParameter("@MailboxPlanType", mailboxPlanType), new SqlParameter("@MailboxPlanType", mailboxPlanType),
new SqlParameter("@AllowLitigationHold",enabledLitigationHold), new SqlParameter("@AllowLitigationHold",enabledLitigationHold),
new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsSpace), new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning),
new SqlParameter("@RecoverableItemsSpace",recoverabelItemsWarning) new SqlParameter("@RecoverableItemsSpace",recoverabelItemsSpace),
new SqlParameter("@LitigationHoldUrl",litigationHoldUrl),
new SqlParameter("@LitigationHoldMsg",litigationHoldMsg)
); );
return Convert.ToInt32(outParam.Value); return Convert.ToInt32(outParam.Value);
@ -2575,7 +2577,7 @@ namespace WebsitePanel.EnterpriseServer
public static void UpdateExchangeMailboxPlan(int mailboxPlanID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, public static void UpdateExchangeMailboxPlan(int mailboxPlanID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP,
bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients,
int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType,
bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
SqlHelper.ExecuteNonQuery( SqlHelper.ExecuteNonQuery(
ConnectionString, ConnectionString,
@ -2600,8 +2602,11 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@HideFromAddressBook", hideFromAddressBook), new SqlParameter("@HideFromAddressBook", hideFromAddressBook),
new SqlParameter("@MailboxPlanType", mailboxPlanType), new SqlParameter("@MailboxPlanType", mailboxPlanType),
new SqlParameter("@AllowLitigationHold", enabledLitigationHold), new SqlParameter("@AllowLitigationHold", enabledLitigationHold),
new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsSpace), new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning),
new SqlParameter("@RecoverableItemsSpace", recoverabelItemsWarning) new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace),
new SqlParameter("@LitigationHoldUrl",litigationHoldUrl),
new SqlParameter("@LitigationHoldMsg",litigationHoldMsg)
); );
} }

View file

@ -192,6 +192,7 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedDomains = tempStats.CreatedDomains; stats.CreatedDomains = tempStats.CreatedDomains;
stats.CreatedPublicFolders = tempStats.CreatedPublicFolders; stats.CreatedPublicFolders = tempStats.CreatedPublicFolders;
stats.UsedDiskSpace = tempStats.UsedDiskSpace; stats.UsedDiskSpace = tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
} }
else else
{ {
@ -218,6 +219,7 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedDomains += tempStats.CreatedDomains; stats.CreatedDomains += tempStats.CreatedDomains;
stats.CreatedPublicFolders += tempStats.CreatedPublicFolders; stats.CreatedPublicFolders += tempStats.CreatedPublicFolders;
stats.UsedDiskSpace += tempStats.UsedDiskSpace; stats.UsedDiskSpace += tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
} }
} }
} }
@ -235,6 +237,7 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedDistributionLists = cntx.Quotas[Quotas.EXCHANGE2007_DISTRIBUTIONLISTS].QuotaAllocatedValue; stats.AllocatedDistributionLists = cntx.Quotas[Quotas.EXCHANGE2007_DISTRIBUTIONLISTS].QuotaAllocatedValue;
stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue; stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue;
stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue;
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
return stats; return stats;
} }
@ -2714,7 +2717,9 @@ namespace WebsitePanel.EnterpriseServer
plan.MaxReceiveMessageSizeKB, plan.MaxReceiveMessageSizeKB,
plan.AllowLitigationHold, plan.AllowLitigationHold,
plan.RecoverableItemsSpace != -1 ? (plan.RecoverableItemsSpace * 1024) : -1, plan.RecoverableItemsSpace != -1 ? (plan.RecoverableItemsSpace * 1024) : -1,
plan.RecoverableItemsSpace != -1 ? (((long)plan.RecoverableItemsWarningPct * (long)plan.RecoverableItemsSpace * 1024) / 100) : -1); plan.RecoverableItemsSpace != -1 ? (((long)plan.RecoverableItemsWarningPct * (long)plan.RecoverableItemsSpace * 1024) / 100) : -1,
plan.LitigationHoldUrl,
plan.LitigationHoldMsg);
DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId); DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId);
@ -2889,7 +2894,8 @@ namespace WebsitePanel.EnterpriseServer
return DataProvider.AddExchangeMailboxPlan(itemID, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP, return DataProvider.AddExchangeMailboxPlan(itemID, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP,
mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients,
mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType,
mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct); mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct,
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -2959,7 +2965,8 @@ namespace WebsitePanel.EnterpriseServer
DataProvider.UpdateExchangeMailboxPlan(mailboxPlan.MailboxPlanId, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP, DataProvider.UpdateExchangeMailboxPlan(mailboxPlan.MailboxPlanId, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP,
mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients,
mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType,
mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct); mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct,
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg);
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -1329,7 +1329,7 @@ namespace WebsitePanel.EnterpriseServer
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
string upn = string.Format("{0}@{1}", name, domain); string upn = string.Format("{0}@{1}", name, domain);
string sAMAccountName = BuildAccountName(org.OrganizationId, name); string sAMAccountName = BuildAccountName(org.OrganizationId, name, org.ServiceId);
TaskManager.Write("accountName :" + sAMAccountName); TaskManager.Write("accountName :" + sAMAccountName);
TaskManager.Write("upn :" + upn); TaskManager.Write("upn :" + upn);
@ -1454,21 +1454,21 @@ namespace WebsitePanel.EnterpriseServer
{ {
DataProvider.AddExchangeAccountEmailAddress(accountId, emailAddress); DataProvider.AddExchangeAccountEmailAddress(accountId, emailAddress);
} }
private static string BuildAccountName(string orgId, string name) private static string BuildAccountName(string orgId, string name, int ServiceId)
{ {
string accountName = name = name.Replace(" ", ""); string accountName = name = name.Replace(" ", "");
string CounterStr = "00000"; string CounterStr = "00000";
int counter = 0; int counter = 0;
bool bFound = false; bool bFound = false;
if (!AccountExists(accountName)) return accountName; if (!AccountExists(accountName, ServiceId)) return accountName;
do do
{ {
accountName = genSamLogin(name, CounterStr); accountName = genSamLogin(name, CounterStr);
if (!AccountExists(accountName)) bFound = true; if (!AccountExists(accountName, ServiceId)) bFound = true;
CounterStr = counter.ToString("d5"); CounterStr = counter.ToString("d5");
counter++; counter++;
@ -1494,9 +1494,19 @@ namespace WebsitePanel.EnterpriseServer
} }
private static bool AccountExists(string accountName) private static bool AccountExists(string accountName, int ServiceId)
{ {
return DataProvider.ExchangeAccountExists(accountName);
if (!DataProvider.ExchangeAccountExists(accountName))
{
Organizations orgProxy = GetOrganizationProxy(ServiceId);
return orgProxy.DoesSamAccountNameExist(accountName);
}
else
return true;
} }
public static int DeleteUser(int itemId, int accountId) public static int DeleteUser(int itemId, int accountId)

View file

@ -310,25 +310,25 @@ namespace WebsitePanel.EnterpriseServer
// error while creating mail account // error while creating mail account
throw new Exception("Could not create mail account", ex); throw new Exception("Could not create mail account", ex);
} }
}
// Instant Alias / Temporary URL // Instant Alias / Temporary URL
if (tempDomain && (domainId > 0)) if (tempDomain && (domainId > 0))
{
int instantAliasId = ServerController.CreateDomainInstantAlias("", domainId);
if (instantAliasId < 0)
{ {
int instantAliasId = ServerController.CreateDomainInstantAlias("", domainId); // rollback wizard
if (instantAliasId < 0) Rollback();
{
// rollback wizard
Rollback();
return instantAliasId; return instantAliasId;
}
} }
}
// Domain DNS Zone // Domain DNS Zone
if (createZoneRecord && (domainId > 0)) if (createZoneRecord && (domainId > 0))
{ {
ServerController.EnableDomainDns(domainId); ServerController.EnableDomainDns(domainId);
}
} }
} }

View file

@ -59,6 +59,8 @@ namespace WebsitePanel.Providers.HostedSolution
bool allowLitigationHold; bool allowLitigationHold;
int recoverableItemsWarningPct; int recoverableItemsWarningPct;
int recoverableItemsSpace; int recoverableItemsSpace;
string litigationHoldUrl;
string litigationHoldMsg;
public int ItemId public int ItemId
@ -196,5 +198,16 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.recoverableItemsSpace = value; } set { this.recoverableItemsSpace = value; }
} }
public string LitigationHoldUrl
{
get { return this.litigationHoldUrl; }
set { this.litigationHoldUrl = value; }
}
public string LitigationHoldMsg
{
get { return this.litigationHoldMsg; }
set { this.litigationHoldMsg = value; }
}
} }
} }

View file

@ -64,7 +64,7 @@ namespace WebsitePanel.Providers.HostedSolution
ExchangeMailbox GetMailboxMailFlowSettings(string accountName); ExchangeMailbox GetMailboxMailFlowSettings(string accountName);
void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeMailbox GetMailboxAdvancedSettings(string accountName); ExchangeMailbox GetMailboxAdvancedSettings(string accountName);
void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning); void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg);
ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName); ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName);
void SetMailboxEmailAddresses(string accountName, string[] emailAddresses); void SetMailboxEmailAddresses(string accountName, string[] emailAddresses);
void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress); void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress);

View file

@ -64,5 +64,7 @@ namespace WebsitePanel.Providers.HostedSolution
PasswordPolicyResult GetPasswordPolicy(); PasswordPolicyResult GetPasswordPolicy();
string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName); string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName);
bool DoesSamAccountNameExist(string accountName);
} }
} }

View file

@ -51,6 +51,10 @@ namespace WebsitePanel.Providers.HostedSolution
private int allocatedDiskSpace; private int allocatedDiskSpace;
private int usedDiskSpace; private int usedDiskSpace;
private int allocatedLitigationHoldSpace;
private int usedLitigationHoldSpace;
private int allocatedSharePointSiteCollections; private int allocatedSharePointSiteCollections;
private int createdSharePointSiteCollections; private int createdSharePointSiteCollections;
@ -154,6 +158,18 @@ namespace WebsitePanel.Providers.HostedSolution
set { usedDiskSpace = value; } set { usedDiskSpace = value; }
} }
public int AllocatedLitigationHoldSpace
{
get { return allocatedLitigationHoldSpace; }
set { allocatedLitigationHoldSpace = value; }
}
public int UsedLitigationHoldSpace
{
get { return usedLitigationHoldSpace; }
set { usedLitigationHoldSpace = value; }
}
public int AllocatedSharePointSiteCollections public int AllocatedSharePointSiteCollections
{ {
get { return allocatedSharePointSiteCollections; } get { return allocatedSharePointSiteCollections; }

View file

@ -287,12 +287,12 @@ namespace WebsitePanel.Providers.HostedSolution
public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP,
bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB,
int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA, SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA,
enableMAPI, enableActiveSync, issueWarningKB, enableMAPI, enableActiveSync, issueWarningKB,
prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning); enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, litigationHoldUrl, litigationHoldMsg);
} }
public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName)
@ -2489,7 +2489,7 @@ namespace WebsitePanel.Providers.HostedSolution
private void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP, private void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB, bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB,
long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB,
int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal"); ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName); ExchangeLog.DebugInfo("Account: {0}", accountName);
@ -2510,12 +2510,13 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB));
cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB));
if (enabledLitigationHold) cmd.Parameters.Add("LitigationHoldEnabled", enabledLitigationHold);
{ cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace));
cmd.Parameters.Add("LitigationHoldEnabled", true);
cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace)); cmd.Parameters.Add("RetentionUrl", litigationHoldUrl);
cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning)); cmd.Parameters.Add("RetentionComment", litigationHoldMsg);
}
if (recoverabelItemsSpace != -1) cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);

File diff suppressed because it is too large Load diff

View file

@ -285,12 +285,12 @@ namespace WebsitePanel.Providers.HostedSolution
public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP,
bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB,
int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA, SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA,
enableMAPI, enableActiveSync, issueWarningKB, enableMAPI, enableActiveSync, issueWarningKB,
prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning); enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, litigationHoldUrl, litigationHoldMsg );
} }
public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName)
@ -2110,7 +2110,7 @@ namespace WebsitePanel.Providers.HostedSolution
return cn; return cn;
} }
private ExchangeAccount GetManager(DirectoryEntry entry) internal virtual ExchangeAccount GetManager(DirectoryEntry entry)
{ {
ExchangeAccount retUser = null; ExchangeAccount retUser = null;
string path = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Manager); string path = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Manager);
@ -2129,7 +2129,7 @@ namespace WebsitePanel.Providers.HostedSolution
return retUser; return retUser;
} }
private ExchangeMailbox GetMailboxGeneralSettingsInternal(string accountName) internal virtual ExchangeMailbox GetMailboxGeneralSettingsInternal(string accountName)
{ {
ExchangeLog.LogStart("GetMailboxGeneralSettingsInternal"); ExchangeLog.LogStart("GetMailboxGeneralSettingsInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName); ExchangeLog.DebugInfo("Account: {0}", accountName);
@ -2415,7 +2415,8 @@ namespace WebsitePanel.Providers.HostedSolution
internal virtual void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP, internal virtual void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB, bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB,
long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB,
int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning,
string litigationHoldUrl, string litigationHoldMsg)
{ {
ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal"); ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName); ExchangeLog.DebugInfo("Account: {0}", accountName);

View file

@ -78,6 +78,74 @@ namespace WebsitePanel.Providers.HostedSolution
} }
internal override ExchangeMailbox GetMailboxGeneralSettingsInternal(string accountName)
{
ExchangeLog.LogStart("GetMailboxGeneralSettingsInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName);
ExchangeMailbox info = new ExchangeMailbox();
info.AccountName = accountName;
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
Collection<PSObject> result = GetMailboxObject(runSpace, accountName);
PSObject mailbox = result[0];
string id = GetResultObjectDN(result);
string path = AddADPrefix(id);
DirectoryEntry entry = GetADObject(path);
//ADAccountOptions userFlags = (ADAccountOptions)entry.Properties["userAccountControl"].Value;
//info.Disabled = ((userFlags & ADAccountOptions.UF_ACCOUNTDISABLE) != 0);
info.Disabled = (bool)entry.InvokeGet("AccountDisabled");
info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName");
info.HideFromAddressBook = (bool)GetPSObjectProperty(mailbox, "HiddenFromAddressListsEnabled");
info.EnableLitigationHold = (bool)GetPSObjectProperty(mailbox, "LitigationHoldEnabled");
Command cmd = new Command("Get-User");
cmd.Parameters.Add("Identity", accountName);
result = ExecuteShellCommand(runSpace, cmd);
PSObject user = result[0];
info.FirstName = (string)GetPSObjectProperty(user, "FirstName");
info.Initials = (string)GetPSObjectProperty(user, "Initials");
info.LastName = (string)GetPSObjectProperty(user, "LastName");
info.Address = (string)GetPSObjectProperty(user, "StreetAddress");
info.City = (string)GetPSObjectProperty(user, "City");
info.State = (string)GetPSObjectProperty(user, "StateOrProvince");
info.Zip = (string)GetPSObjectProperty(user, "PostalCode");
info.Country = CountryInfoToString((CountryInfo)GetPSObjectProperty(user, "CountryOrRegion"));
info.JobTitle = (string)GetPSObjectProperty(user, "Title");
info.Company = (string)GetPSObjectProperty(user, "Company");
info.Department = (string)GetPSObjectProperty(user, "Department");
info.Office = (string)GetPSObjectProperty(user, "Office");
info.ManagerAccount = GetManager(entry); //GetExchangeAccount(runSpace, ObjToString(GetPSObjectProperty(user, "Manager")));
info.BusinessPhone = (string)GetPSObjectProperty(user, "Phone");
info.Fax = (string)GetPSObjectProperty(user, "Fax");
info.HomePhone = (string)GetPSObjectProperty(user, "HomePhone");
info.MobilePhone = (string)GetPSObjectProperty(user, "MobilePhone");
info.Pager = (string)GetPSObjectProperty(user, "Pager");
info.WebPage = (string)GetPSObjectProperty(user, "WebPage");
info.Notes = (string)GetPSObjectProperty(user, "Notes");
}
finally
{
CloseRunspace(runSpace);
}
ExchangeLog.LogEnd("GetMailboxGeneralSettingsInternal");
return info;
}
internal override ExchangeMailbox GetMailboxAdvancedSettingsInternal(string accountName) internal override ExchangeMailbox GetMailboxAdvancedSettingsInternal(string accountName)
{ {
ExchangeLog.LogStart("GetMailboxAdvancedSettingsInternal"); ExchangeLog.LogStart("GetMailboxAdvancedSettingsInternal");
@ -237,11 +305,11 @@ namespace WebsitePanel.Providers.HostedSolution
if (result.Count > 0) if (result.Count > 0)
{ {
PSObject statistics = result[0]; PSObject statistics = result[0];
Unlimited<ByteQuantifiedSize> totalItemSize = (Unlimited<ByteQuantifiedSize>)GetPSObjectProperty(statistics, "FolderAndSubfolderSize"); ByteQuantifiedSize totalItemSize = (ByteQuantifiedSize)GetPSObjectProperty(statistics, "FolderAndSubfolderSize");
info.LitigationHoldTotalSize = ConvertUnlimitedToBytes(totalItemSize); info.LitigationHoldTotalSize = (totalItemSize == null) ? 0 : ConvertUnlimitedToBytes(totalItemSize);
uint? itemCount = (uint?)GetPSObjectProperty(statistics, "ItemsInFolder"); Int32 itemCount = (Int32)GetPSObjectProperty(statistics, "ItemsInFolder");
info.LitigationHoldTotalItems = ConvertNullableToInt32(itemCount); info.LitigationHoldTotalItems = (itemCount == null) ? 0 : itemCount;
} }
} }
else else
@ -264,7 +332,8 @@ namespace WebsitePanel.Providers.HostedSolution
internal override void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP, internal override void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB, bool enableOWA, bool enableMAPI, bool enableActiveSync, long issueWarningKB, long prohibitSendKB,
long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB,
int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) int maxReceiveMessageSizeKB, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning,
string litigationHoldUrl, string litigationHoldMsg)
{ {
ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal"); ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName); ExchangeLog.DebugInfo("Account: {0}", accountName);
@ -287,7 +356,11 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("LitigationHoldEnabled", enabledLitigationHold); cmd.Parameters.Add("LitigationHoldEnabled", enabledLitigationHold);
cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace)); cmd.Parameters.Add("RecoverableItemsQuota", ConvertKBToUnlimited(recoverabelItemsSpace));
cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning));
cmd.Parameters.Add("RetentionUrl", litigationHoldUrl);
cmd.Parameters.Add("RetentionComment", litigationHoldMsg);
if (recoverabelItemsSpace != -1) cmd.Parameters.Add("RecoverableItemsWarningQuota", ConvertKBToUnlimited(recoverabelItemsWarning));
ExecuteShellCommand(runSpace, cmd); ExecuteShellCommand(runSpace, cmd);

View file

@ -710,6 +710,48 @@ namespace WebsitePanel.Providers.HostedSolution
} }
public bool DoesSamAccountNameExist(string accountName)
{
return DoesSamAccountNameExistInternal(accountName);
}
private bool DoesSamAccountNameExistInternal(string accountName)
{
HostedSolutionLog.LogStart("DoesSamAccountNameExistInternal");
HostedSolutionLog.DebugInfo("userPrincipalName : {0}", accountName);
bool bFound = false;
try
{
string path = GetRootOU();
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
DirectorySearcher searcher = new DirectorySearcher(entry);
searcher.PropertiesToLoad.Add("sAMAccountName");
searcher.Filter = "(sAMAccountName=" + accountName + ")";
searcher.SearchScope = SearchScope.Subtree;
SearchResult resCollection = searcher.FindOne();
if (resCollection != null)
{
if(resCollection.Properties["samaccountname"] != null)
bFound = true; ;
}
HostedSolutionLog.LogEnd("GetSamAccountNameByUserPrincipalNameInternal");
}
catch (Exception e)
{
HostedSolutionLog.DebugInfo("Failed : {0}", e.Message);
}
return bFound;
}
#endregion #endregion
#region Domains #region Domains

View file

@ -15,7 +15,7 @@
<OldToolsVersion>3.5</OldToolsVersion> <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
@ -63,6 +63,10 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Admin.AdminService.dll</HintPath> <HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Admin.AdminService.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="microsoft.crm.sdk.proxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.crm.sdk.proxy.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Crm.Setup.Common"> <Reference Include="Microsoft.Crm.Setup.Common">
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Setup.Common.dll</HintPath> <HintPath>..\..\Lib\References\Microsoft\Microsoft.Crm.Setup.Common.dll</HintPath>
</Reference> </Reference>
@ -119,6 +123,34 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath> <HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="microsoft.xrm.client, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.client.codegeneration, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.client.codegeneration.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.portal, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.portal.files, Version=5.0.9689.1985, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.portal.files.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk.deployment, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.deployment.dll</HintPath>
</Reference>
<Reference Include="microsoft.xrm.sdk.workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\microsoft.xrm.sdk.workflow.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.configuration" /> <Reference Include="System.configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@ -129,6 +161,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\System.Management.Automation.dll</HintPath> <HintPath>..\..\Lib\System.Management.Automation.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Services" /> <Reference Include="System.Web.Services" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
@ -139,11 +173,13 @@
</Compile> </Compile>
<Compile Include="BlackBerry5Provider.cs" /> <Compile Include="BlackBerry5Provider.cs" />
<Compile Include="BlackBerryProvider.cs" /> <Compile Include="BlackBerryProvider.cs" />
<Compile Include="CRMProvider2011.cs" />
<Compile Include="Exchange2010.cs" /> <Compile Include="Exchange2010.cs" />
<Compile Include="Exchange2010SP2.cs" /> <Compile Include="Exchange2010SP2.cs" />
<Compile Include="HostedSharePointServer2010.cs" /> <Compile Include="HostedSharePointServer2010.cs" />
<Compile Include="Lync2010.cs" /> <Compile Include="Lync2010.cs" />
<Compile Include="LyncTransaction.cs" /> <Compile Include="LyncTransaction.cs" />
<Compile Include="myorganizationcrmsdktypes.cs" />
<Compile Include="OCSEdge2007R2.cs" /> <Compile Include="OCSEdge2007R2.cs" />
<Compile Include="OCS2007R2.cs" /> <Compile Include="OCS2007R2.cs" />
<Compile Include="CRMProvider.cs" /> <Compile Include="CRMProvider.cs" />

View file

@ -200,29 +200,23 @@ namespace WebsitePanel.Providers.Mail
{ {
try try
{ {
svcUserAdmin users = new svcUserAdmin();
PrepareProxy(users);
// get mailbox size StatInfoResult userStats = users.GetUserStats(AdminUsername, AdminPassword, item.Name, DateTime.Now, DateTime.Now);
string name = item.Name; if (!userStats.Result)
{
throw new Exception(userStats.Message);
}
// try to get SmarterMail postoffices path Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
string poPath = DomainsPath; // calculate disk space
if (poPath == null) ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
continue; diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0;
string mailboxName = name.Substring(0, name.IndexOf("@")); diskspace.DiskSpace = userStats.BytesSize;
string domainName = name.Substring(name.IndexOf("@") + 1); itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating mail account '{0}' size", item.Name));
string mailboxPath = Path.Combine(DomainsPath, String.Format("{0}\\Users\\{1}", domainName, mailboxName));
Log.WriteStart(String.Format("Calculating '{0}' folder size", mailboxPath));
// calculate disk space
ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0;
diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath);
itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' folder size", mailboxPath));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -1570,29 +1570,23 @@ namespace WebsitePanel.Providers.Mail
{ {
try try
{ {
svcUserAdmin users = new svcUserAdmin();
PrepareProxy(users);
// get mailbox size StatInfoResult userStats = users.GetUserStats(AdminUsername, AdminPassword, item.Name, DateTime.Now, DateTime.Now);
string name = item.Name; if (!userStats.Result)
{
// try to get SmarterMail postoffices path throw new Exception(userStats.Message);
string poPath = DomainsPath; }
if (poPath == null)
continue;
string mailboxName = name.Substring(0, name.IndexOf("@"));
string domainName = name.Substring(name.IndexOf("@") + 1);
string mailboxPath = Path.Combine(DomainsPath, String.Format("{0}\\Users\\{1}", domainName, mailboxName));
Log.WriteStart(String.Format("Calculating '{0}' folder size", mailboxPath));
Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
// calculate disk space // calculate disk space
ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace(); ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
diskspace.ItemId = item.Id; diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0; //diskspace.DiskSpace = 0;
diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath); diskspace.DiskSpace = userStats.BytesSize;
itemsDiskspace.Add(diskspace); itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' folder size", mailboxPath)); Log.WriteEnd(String.Format("Calculating mail account '{0}' size", item.Name));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -200,29 +200,23 @@ namespace WebsitePanel.Providers.Mail
{ {
try try
{ {
svcUserAdmin users = new svcUserAdmin();
PrepareProxy(users);
// get mailbox size StatInfoResult userStats = users.GetUserStats(AdminUsername, AdminPassword, item.Name, DateTime.Now, DateTime.Now);
string name = item.Name; if (!userStats.Result)
{
// try to get SmarterMail postoffices path throw new Exception(userStats.Message);
string poPath = DomainsPath; }
if (poPath == null)
continue;
string mailboxName = name.Substring(0, name.IndexOf("@"));
string domainName = name.Substring(name.IndexOf("@") + 1);
string mailboxPath = Path.Combine(DomainsPath, String.Format("{0}\\Users\\{1}", domainName, mailboxName));
Log.WriteStart(String.Format("Calculating '{0}' folder size", mailboxPath));
Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
// calculate disk space // calculate disk space
ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace(); ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
diskspace.ItemId = item.Id; diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0; //diskspace.DiskSpace = 0;
diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath); diskspace.DiskSpace = userStats.BytesSize;
itemsDiskspace.Add(diskspace); itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' folder size", mailboxPath)); Log.WriteEnd(String.Format("Calculating mail account '{0}' size", item.Name));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -200,29 +200,23 @@ namespace WebsitePanel.Providers.Mail
{ {
try try
{ {
svcUserAdmin users = new svcUserAdmin();
PrepareProxy(users);
// get mailbox size StatInfoResult userStats = users.GetUserStats(AdminUsername, AdminPassword, item.Name, DateTime.Now, DateTime.Now);
string name = item.Name; if (!userStats.Result)
{
throw new Exception(userStats.Message);
}
// try to get SmarterMail postoffices path Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
string poPath = DomainsPath; // calculate disk space
if (poPath == null) ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
continue; diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0;
string mailboxName = name.Substring(0, name.IndexOf("@")); diskspace.DiskSpace = userStats.BytesSize;
string domainName = name.Substring(name.IndexOf("@") + 1); itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating mail account '{0}' size", item.Name));
string mailboxPath = Path.Combine(DomainsPath, String.Format("{0}\\Users\\{1}", domainName, mailboxName));
Log.WriteStart(String.Format("Calculating '{0}' folder size", mailboxPath));
// calculate disk space
ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0;
diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath);
itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' folder size", mailboxPath));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -200,29 +200,23 @@ namespace WebsitePanel.Providers.Mail
{ {
try try
{ {
svcUserAdmin users = new svcUserAdmin();
PrepareProxy(users);
// get mailbox size StatInfoResult userStats = users.GetUserStats(AdminUsername, AdminPassword, item.Name, DateTime.Now, DateTime.Now);
string name = item.Name; if (!userStats.Result)
{
// try to get SmarterMail postoffices path throw new Exception(userStats.Message);
string poPath = DomainsPath; }
if (poPath == null)
continue;
string mailboxName = name.Substring(0, name.IndexOf("@"));
string domainName = name.Substring(name.IndexOf("@") + 1);
string mailboxPath = Path.Combine(DomainsPath, String.Format("{0}\\Users\\{1}", domainName, mailboxName));
Log.WriteStart(String.Format("Calculating '{0}' folder size", mailboxPath));
Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
// calculate disk space // calculate disk space
ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace(); ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace();
diskspace.ItemId = item.Id; diskspace.ItemId = item.Id;
//diskspace.DiskSpace = 0; //diskspace.DiskSpace = 0;
diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath); diskspace.DiskSpace = userStats.BytesSize;
itemsDiskspace.Add(diskspace); itemsDiskspace.Add(diskspace);
Log.WriteEnd(String.Format("Calculating '{0}' folder size", mailboxPath)); Log.WriteEnd(String.Format("Calculating mail account '{0}' size", item.Name));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -39,9 +39,6 @@
// //
// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // This source code was auto-generated by wsdl, Version=2.0.50727.3038.
// //
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Exchange { namespace WebsitePanel.Providers.Exchange {
using System.Xml.Serialization; using System.Xml.Serialization;
using System.Web.Services; using System.Web.Services;
@ -49,6 +46,8 @@ namespace WebsitePanel.Providers.Exchange {
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using WebsitePanel.Providers.HostedSolution;
/// <remarks/> /// <remarks/>
@ -1545,7 +1544,9 @@ namespace WebsitePanel.Providers.Exchange {
int maxReceiveMessageSizeKB, int maxReceiveMessageSizeKB,
bool enabledLitigationHold, bool enabledLitigationHold,
long recoverabelItemsSpace, long recoverabelItemsSpace,
long recoverabelItemsWarning) { long recoverabelItemsWarning,
string litigationHoldUrl,
string litigationHoldMsg) {
this.Invoke("SetMailboxAdvancedSettings", new object[] { this.Invoke("SetMailboxAdvancedSettings", new object[] {
organizationId, organizationId,
accountName, accountName,
@ -1563,7 +1564,9 @@ namespace WebsitePanel.Providers.Exchange {
maxReceiveMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, enabledLitigationHold,
recoverabelItemsSpace, recoverabelItemsSpace,
recoverabelItemsWarning}); recoverabelItemsWarning,
litigationHoldUrl,
litigationHoldMsg});
} }
/// <remarks/> /// <remarks/>
@ -1585,6 +1588,8 @@ namespace WebsitePanel.Providers.Exchange {
bool enabledLitigationHold, bool enabledLitigationHold,
long recoverabelItemsSpace, long recoverabelItemsSpace,
long recoverabelItemsWarning, long recoverabelItemsWarning,
string litigationHoldUrl,
string litigationHoldMsg,
System.AsyncCallback callback, System.AsyncCallback callback,
object asyncState) { object asyncState) {
return this.BeginInvoke("SetMailboxAdvancedSettings", new object[] { return this.BeginInvoke("SetMailboxAdvancedSettings", new object[] {
@ -1604,7 +1609,9 @@ namespace WebsitePanel.Providers.Exchange {
maxReceiveMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, enabledLitigationHold,
recoverabelItemsSpace, recoverabelItemsSpace,
recoverabelItemsWarning}, callback, asyncState); recoverabelItemsWarning,
litigationHoldUrl,
litigationHoldMsg}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
@ -1630,8 +1637,10 @@ namespace WebsitePanel.Providers.Exchange {
int maxReceiveMessageSizeKB, int maxReceiveMessageSizeKB,
bool enabledLitigationHold, bool enabledLitigationHold,
long recoverabelItemsSpace, long recoverabelItemsSpace,
long recoverabelItemsWarning) { long recoverabelItemsWarning,
this.SetMailboxAdvancedSettingsAsync(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, null); string litigationHoldUrl,
string litigationHoldMsg) {
this.SetMailboxAdvancedSettingsAsync(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, litigationHoldUrl, litigationHoldMsg, null);
} }
/// <remarks/> /// <remarks/>
@ -1653,6 +1662,8 @@ namespace WebsitePanel.Providers.Exchange {
bool enabledLitigationHold, bool enabledLitigationHold,
long recoverabelItemsSpace, long recoverabelItemsSpace,
long recoverabelItemsWarning, long recoverabelItemsWarning,
string litigationHoldUrl,
string litigationHoldMsg,
object userState) { object userState) {
if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) { if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) {
this.SetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxAdvancedSettingsOperationCompleted); this.SetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxAdvancedSettingsOperationCompleted);
@ -1674,7 +1685,9 @@ namespace WebsitePanel.Providers.Exchange {
maxReceiveMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, enabledLitigationHold,
recoverabelItemsSpace, recoverabelItemsSpace,
recoverabelItemsWarning}, this.SetMailboxAdvancedSettingsOperationCompleted, userState); recoverabelItemsWarning,
litigationHoldUrl,
litigationHoldMsg}, this.SetMailboxAdvancedSettingsOperationCompleted, userState);
} }
private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) { private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) {

View file

@ -26,7 +26,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -48,11 +47,11 @@ namespace WebsitePanel.Providers.HostedSolution {
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using WebsitePanel.Providers.Common; using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.ResultObjects;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
@ -90,6 +89,8 @@ namespace WebsitePanel.Providers.HostedSolution {
private System.Threading.SendOrPostCallback GetSamAccountNameByUserPrincipalNameOperationCompleted; private System.Threading.SendOrPostCallback GetSamAccountNameByUserPrincipalNameOperationCompleted;
private System.Threading.SendOrPostCallback DoesSamAccountNameExistOperationCompleted;
/// <remarks/> /// <remarks/>
public Organizations() { public Organizations() {
this.Url = "http://localhost:9003/Organizations.asmx"; this.Url = "http://localhost:9003/Organizations.asmx";
@ -134,6 +135,9 @@ namespace WebsitePanel.Providers.HostedSolution {
/// <remarks/> /// <remarks/>
public event GetSamAccountNameByUserPrincipalNameCompletedEventHandler GetSamAccountNameByUserPrincipalNameCompleted; public event GetSamAccountNameByUserPrincipalNameCompletedEventHandler GetSamAccountNameByUserPrincipalNameCompleted;
/// <remarks/>
public event DoesSamAccountNameExistCompletedEventHandler DoesSamAccountNameExistCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -901,6 +905,48 @@ namespace WebsitePanel.Providers.HostedSolution {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DoesSamAccountNameExist", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool DoesSamAccountNameExist(string accountName) {
object[] results = this.Invoke("DoesSamAccountNameExist", new object[] {
accountName});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDoesSamAccountNameExist(string accountName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DoesSamAccountNameExist", new object[] {
accountName}, callback, asyncState);
}
/// <remarks/>
public bool EndDoesSamAccountNameExist(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void DoesSamAccountNameExistAsync(string accountName) {
this.DoesSamAccountNameExistAsync(accountName, null);
}
/// <remarks/>
public void DoesSamAccountNameExistAsync(string accountName, object userState) {
if ((this.DoesSamAccountNameExistOperationCompleted == null)) {
this.DoesSamAccountNameExistOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDoesSamAccountNameExistOperationCompleted);
}
this.InvokeAsync("DoesSamAccountNameExist", new object[] {
accountName}, this.DoesSamAccountNameExistOperationCompleted, userState);
}
private void OnDoesSamAccountNameExistOperationCompleted(object arg) {
if ((this.DoesSamAccountNameExistCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DoesSamAccountNameExistCompleted(this, new DoesSamAccountNameExistCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -1090,4 +1136,30 @@ namespace WebsitePanel.Providers.HostedSolution {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DoesSamAccountNameExistCompletedEventHandler(object sender, DoesSamAccountNameExistCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DoesSamAccountNameExistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DoesSamAccountNameExistCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
} }

View file

@ -435,14 +435,14 @@ namespace WebsitePanel.Server
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB long issueWarningKB, long prohibitSendKB, long prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB
, bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning) , bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg)
{ {
try try
{ {
LogStart("SetMailboxAdvancedSettings"); LogStart("SetMailboxAdvancedSettings");
ES.SetMailboxAdvancedSettings(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, ES.SetMailboxAdvancedSettings(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync,
issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB,
enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning); enabledLitigationHold, recoverabelItemsSpace, recoverabelItemsWarning, litigationHoldUrl, litigationHoldMsg);
LogEnd("SetMailboxAdvancedSettings"); LogEnd("SetMailboxAdvancedSettings");
} }
catch (Exception ex) catch (Exception ex)

View file

@ -162,5 +162,12 @@ namespace WebsitePanel.Server
{ {
return Organization.GetSamAccountNameByUserPrincipalName(organizationId, userPrincipalName); return Organization.GetSamAccountNameByUserPrincipalName(organizationId, userPrincipalName);
} }
[WebMethod, SoapHeader("settings")]
public bool DoesSamAccountNameExist(string accountName)
{
return Organization.DoesSamAccountNameExist(accountName);
}
} }
} }

View file

@ -1,125 +1,108 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<configuration> <configuration>
<!-- Custom configuration sections --> <!-- Custom configuration sections -->
<configSections> <configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/> <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/>
<section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server"/> <section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server"/>
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/> <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
</configSections> </configSections>
<appSettings> <appSettings>
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/> <add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
<add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false" /> <add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false"/>
<add key="WebsitePanel.Exchange.enableSP2abp" value="false" /> <add key="WebsitePanel.Exchange.enableSP2abp" value="false"/>
<add key="SCVMMServerName" value=""/> <add key="SCVMMServerName" value=""/>
<add key="SCVMMServerPort" value=""/> <add key="SCVMMServerPort" value=""/>
</appSettings> </appSettings>
<system.diagnostics> <system.diagnostics>
<switches> <switches>
<add name="Log" value="2"/> <add name="Log" value="2"/>
<!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose --> <!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose -->
</switches> </switches>
<trace autoflush="true"> <trace autoflush="true">
<listeners> <listeners>
<add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel"/> <add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel"/>
<!-- Writes log to the file <!-- Writes log to the file
<add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" /> <add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" />
--> -->
<remove name="Default"/> <remove name="Default"/>
</listeners> </listeners>
</trace> </trace>
</system.diagnostics> </system.diagnostics>
<!-- Caching Configuration --> <!-- Caching Configuration -->
<cachingConfiguration defaultCacheManager="Default Cache Manager"> <cachingConfiguration defaultCacheManager="Default Cache Manager">
<backingStores> <backingStores>
<add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching"/> <add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching"/>
</backingStores> </backingStores>
<cacheManagers> <cacheManagers>
<add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory"/> <add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory"/>
</cacheManagers> </cacheManagers>
</cachingConfiguration> </cachingConfiguration>
<!-- WebsitePanel Configuration --> <!-- WebsitePanel Configuration -->
<websitepanel.server> <websitepanel.server>
<!-- Security settings --> <!-- Security settings -->
<security> <security>
<!-- Perform security check --> <!-- Perform security check -->
<enabled value="true"/> <enabled value="true"/>
<!-- Server password --> <!-- Server password -->
<password value="W6ph5Mm5Pz8GgiULbPgzG37mj9g="/> <password value="W6ph5Mm5Pz8GgiULbPgzG37mj9g="/>
</security> </security>
</websitepanel.server> </websitepanel.server>
<system.web> <system.web>
<!-- Disable any authentication --> <!-- Disable any authentication -->
<authentication mode="None"/> <authentication mode="None"/>
<!-- Correct HTTP runtime settings --> <!-- Correct HTTP runtime settings -->
<httpRuntime executionTimeout="3600" maxRequestLength="16384"/> <httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
<!-- Set globalization settings --> <!-- Set globalization settings -->
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/> <globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
<!-- Web Services settings --> <!-- Web Services settings -->
<webServices> <webServices>
<protocols> <protocols>
<remove name="HttpPost"/> <remove name="HttpPost"/>
<remove name="HttpPostLocalhost"/> <remove name="HttpPostLocalhost"/>
<remove name="HttpGet"/> <remove name="HttpGet"/>
</protocols> </protocols>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/> <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
</webServices> </webServices>
<compilation debug="true" /> <compilation debug="true" targetFramework="4.0"/>
</system.web> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<!-- WSE 3.0 settings --> </system.web>
<microsoft.web.services3> <!-- WSE 3.0 settings -->
<diagnostics> <microsoft.web.services3>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/> <diagnostics>
</diagnostics> <trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
<messaging> </diagnostics>
<maxMessageLength value="-1"/> <messaging>
<mtom serverMode="optional" clientMode="On"/> <maxMessageLength value="-1"/>
</messaging> <mtom serverMode="optional" clientMode="On"/>
<security> </messaging>
<securityTokenManager> <security>
<add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/> <securityTokenManager>
</securityTokenManager> <add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/>
<timeToleranceInSeconds value="86400"/> </securityTokenManager>
</security> <timeToleranceInSeconds value="86400"/>
<policy fileName="WsePolicyCache.Config"/> </security>
</microsoft.web.services3> <policy fileName="WsePolicyCache.Config"/>
<system.serviceModel> </microsoft.web.services3>
<bindings> <system.serviceModel>
<wsHttpBinding> <bindings>
<binding name="WSHttpBinding_IVirtualMachineManagementService" <wsHttpBinding>
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" <binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" <security mode="Message">
useDefaultWebProxy="true" allowCookies="false"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> </security>
<reliableSession ordered="true" inactivityTimeout="00:10:00" </binding>
enabled="false" /> <binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<security mode="Message"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<transport clientCredentialType="Windows" proxyCredentialType="None" <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
realm="" /> <security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true" <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
algorithmSuite="Default" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security> </security>
</binding> </binding>
<binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" </wsHttpBinding>
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="10485760"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings> </bindings>
</system.serviceModel> </system.serviceModel>
</configuration> </configuration>

View file

@ -17,7 +17,7 @@
<OldToolsVersion>4.0</OldToolsVersion> <OldToolsVersion>4.0</OldToolsVersion>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress> <UseIISExpress>false</UseIISExpress>
</PropertyGroup> </PropertyGroup>
@ -53,11 +53,6 @@
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath> <HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Web.PlatformInstaller.WebDeployShim, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Web.PlatformInstaller.WebDeployShim.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath> <HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
@ -72,6 +67,7 @@
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" /> <Reference Include="System.ServiceProcess" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" /> <Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" /> <Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />

View file

@ -5073,6 +5073,12 @@
<data name="Quota.Exchange2007.EnablePlansEditing" xml:space="preserve"> <data name="Quota.Exchange2007.EnablePlansEditing" xml:space="preserve">
<value>Enable Mailbox Plans Editing</value> <value>Enable Mailbox Plans Editing</value>
</data> </data>
<data name="Quota.Exchange2007.AllowLitigationHold" xml:space="preserve">
<value>Allow Litigation Hold</value>
</data>
<data name="Quota.Exchange2007.RecoverableItemsSpace" xml:space="preserve">
<value>Recoverable Items Storage, MB</value>
</data>
<data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve"> <data name="Error.LYNC_DELETE_DOMAIN" xml:space="preserve">
<value>Error deleting organization domain name. See audit log for more details.</value> <value>Error deleting organization domain name. See audit log for more details.</value>
</data> </data>

View file

@ -240,4 +240,10 @@
<data name="secLitigationHold.Text" xml:space="preserve"> <data name="secLitigationHold.Text" xml:space="preserve">
<value>Litigation Hold</value> <value>Litigation Hold</value>
</data> </data>
<data name="lblLitigationHoldMsg.Text" xml:space="preserve">
<value>Litigation Hold Message:</value>
</data>
<data name="lblLitigationHoldUrl.Text" xml:space="preserve">
<value>Litigation Hold Url:</value>
</data>
</root> </root>

View file

@ -172,8 +172,12 @@ namespace WebsitePanel.Portal.CRM
return; return;
} }
OrganizationResult res = ES.Services.CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3], EnterpriseServer.esCRM CRM = ES.Services.CRM;
CRM.Timeout = 7200000; //# Set longer timeout
OrganizationResult res = CRM.CreateOrganization(org.Id, cuurrencyData[0], cuurrencyData[1], cuurrencyData[2], cuurrencyData[3],
administrator.GetAccountId(), ddlCollation.SelectedValue); administrator.GetAccountId(), ddlCollation.SelectedValue);
messageBox.ShowMessage(res, "CreateCrmOrganization", "HostedCRM"); messageBox.ShowMessage(res, "CreateCrmOrganization", "HostedCRM");

View file

@ -64,11 +64,14 @@ namespace WebsitePanel.Portal
ShowErrorMessage("DOMAIN_GET_DOMAIN", ex); ShowErrorMessage("DOMAIN_GET_DOMAIN", ex);
} }
if (PanelSecurity.LoggedUser.Role == UserRole.User) DomainType type = GetDomainType(Request["DomainType"]);
if ((PanelSecurity.LoggedUser.Role == UserRole.User) & (type != DomainType.SubDomain))
{ {
if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR)) if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR))
this.DisableControls = true; this.DisableControls = true;
} }
} }
private void BindControls() private void BindControls()

View file

@ -210,4 +210,10 @@
<data name="secLitigationHold.Text" xml:space="preserve"> <data name="secLitigationHold.Text" xml:space="preserve">
<value>Litigation Hold</value> <value>Litigation Hold</value>
</data> </data>
<data name="lblLitigationHoldMsg.Text" xml:space="preserve">
<value>Litigation Hold Message:</value>
</data>
<data name="lblLitigationHoldUrl.Text" xml:space="preserve">
<value>Litigation Hold Url:</value>
</data>
</root> </root>

View file

@ -163,9 +163,9 @@
<value>Enable Litigation Hold</value> <value>Enable Litigation Hold</value>
</data> </data>
<data name="locLitigationHoldSpace.Text" xml:space="preserve"> <data name="locLitigationHoldSpace.Text" xml:space="preserve">
<value>Litigation Hold Space:</value> <value>Litigation Hold Storage:</value>
</data> </data>
<data name="secLitigationHoldSettings.Text" xml:space="preserve"> <data name="secLitigationHoldSettings.Text" xml:space="preserve">
<value>Litigation Hold Settings</value> <value>Litigation Hold</value>
</data> </data>
</root> </root>

View file

@ -207,4 +207,7 @@
<data name="Unlimited.Text" xml:space="preserve"> <data name="Unlimited.Text" xml:space="preserve">
<value>Unlimited</value> <value>Unlimited</value>
</data> </data>
<data name="lnkExchangeLitigationHold.Text" xml:space="preserve">
<value>Litigation Hold Storage (Mb):</value>
</data>
</root> </root>

View file

@ -206,6 +206,16 @@
<wsp:SizeBox id="recoverableItemsWarning" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="true" RequireValidatorEnabled="true"/> <wsp:SizeBox id="recoverableItemsWarning" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="true" RequireValidatorEnabled="true"/>
</td> </td>
</tr> </tr>
<tr>
<td class="SubHead" style="width:150px;"><asp:Label ID="lblLitigationHoldUrl" runat="server" meta:resourcekey="lblLitigationHoldUrl" Text="Url:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtLitigationHoldUrl" runat="server" Width="200" CssClass="NormalTextBox" MaxLength="255"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" valign=top><asp:Label ID="lblLitigationHoldMsg" runat="server" meta:resourcekey="lblLitigationHoldMsg" Text="Page Content:"></asp:Label></td>
<td class="Normal" valign=top>
<asp:TextBox ID="txtLitigationHoldMsg" runat="server" Rows="10" TextMode="MultiLine" Width="100%" CssClass="NormalTextBox" Wrap="False" MaxLength="511"></asp:TextBox></td>
</tr>
</table> </table>
</asp:Panel> </asp:Panel>

View file

@ -63,6 +63,8 @@ namespace WebsitePanel.Portal.ExchangeServer
chkEnableLitigationHold.Checked = plan.AllowLitigationHold; chkEnableLitigationHold.Checked = plan.AllowLitigationHold;
recoverableItemsSpace.QuotaValue = plan.RecoverableItemsSpace; recoverableItemsSpace.QuotaValue = plan.RecoverableItemsSpace;
recoverableItemsWarning.ValueKB = plan.RecoverableItemsWarningPct; recoverableItemsWarning.ValueKB = plan.RecoverableItemsWarningPct;
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
@ -198,6 +200,9 @@ namespace WebsitePanel.Portal.ExchangeServer
plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue; plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue;
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB; plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100; if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID, int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
plan); plan);

View file

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

View file

@ -69,11 +69,12 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Panel> </asp:Panel>
<wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secGeneral" Text="General"></wsp:CollapsiblePanel> <wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secLitigationHoldSettings" Text="Litigation Hold"></wsp:CollapsiblePanel>
<asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="LitigationHoldUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="LitigationHoldUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<table> <table>
<!--
<tr> <tr>
<td></td> <td></td>
<td> <td>
@ -82,6 +83,7 @@
<br /> <br />
</td> </td>
</tr> </tr>
-->
<tr> <tr>
<td class="FormLabel150"><asp:Localize ID="locLitigationHoldSpace" runat="server" meta:resourcekey="locLitigationHoldSpace" Text="Litigation Hold Space:"></asp:Localize></td> <td class="FormLabel150"><asp:Localize ID="locLitigationHoldSpace" runat="server" meta:resourcekey="locLitigationHoldSpace" Text="Litigation Hold Space:"></asp:Localize></td>
<td> <td>

View file

@ -102,7 +102,7 @@ namespace WebsitePanel.Portal.ExchangeServer
secCalendarSettings.Visible = ((account.AccountType == ExchangeAccountType.Equipment) | (account.AccountType == ExchangeAccountType.Room)); secCalendarSettings.Visible = ((account.AccountType == ExchangeAccountType.Equipment) | (account.AccountType == ExchangeAccountType.Room));
chkEnableLitigationHold.Checked = mailbox.EnableLitigationHold; secLitigationHoldSettings.Visible = mailbox.EnableLitigationHold;
litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024); litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024);
litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024)); litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024));

View file

@ -25,6 +25,7 @@
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // 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 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View file

@ -118,6 +118,15 @@
<wsp:QuotaViewer ID="exchangeStorageStats" QuotaTypeId="2" runat="server" DisplayGauge="true" /> <wsp:QuotaViewer ID="exchangeStorageStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td> </td>
</tr> </tr>
<tr class="OrgStatsRow" id="rowExchangeLitigationHold" runat="server">
<td align="right" nowrap>
<asp:HyperLink ID="lnkExchangeLitigationHold" runat="server" meta:resourcekey="lnkExchangeLitigationHold"></asp:HyperLink>
</td>
<td>
<wsp:QuotaViewer ID="exchangeLitigationHoldStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
</asp:Panel> </asp:Panel>
<asp:Panel runat="server" ID="besStatsPanel"> <asp:Panel runat="server" ID="besStatsPanel">

View file

@ -43,7 +43,7 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
private void BindExchangeStats(bool hideItems) private void BindExchangeStats(bool hideItems, PackageContext cntx)
{ {
OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics exchangeTenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics exchangeTenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
@ -63,6 +63,10 @@ namespace WebsitePanel.Portal.ExchangeServer
lnkFolders.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "public_folders", lnkFolders.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "public_folders",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());
lnkExchangeLitigationHold.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "storage_usage",
"SpaceID=" + PanelSecurity.PackageId.ToString());
mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes; mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes;
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes; mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes; if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
@ -103,6 +107,19 @@ namespace WebsitePanel.Portal.ExchangeServer
foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders; foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders;
if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders; if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders;
} }
if ((!hideItems) && (Utils.CheckQouta(Quotas.EXCHANGE2007_ALLOWLITIGATIONHOLD, cntx)))
{
exchangeLitigationHoldStats.QuotaUsedValue = exchangeOrgStats.UsedLitigationHoldSpace;
exchangeLitigationHoldStats.QuotaValue = exchangeOrgStats.AllocatedLitigationHoldSpace;
if (exchangeOrgStats.AllocatedLitigationHoldSpace != -1)
{
exchangeLitigationHoldStats.QuotaAvailable = exchangeTenantStats.AllocatedLitigationHoldSpace - exchangeTenantStats.UsedLitigationHoldSpace;
}
}
else
this.rowExchangeLitigationHold.Style.Add("display", "none");
} }
private void BindOrgStats() private void BindOrgStats()
@ -160,7 +177,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (cntx.Groups.ContainsKey(ResourceGroups.Exchange)) if (cntx.Groups.ContainsKey(ResourceGroups.Exchange))
{ {
exchangeStatsPanel.Visible = true; exchangeStatsPanel.Visible = true;
BindExchangeStats(hideItems); BindExchangeStats(hideItems, cntx);
} }
else else
exchangeStatsPanel.Visible = false; exchangeStatsPanel.Visible = false;

View file

@ -328,6 +328,33 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer exchangeStorageStats; protected global::WebsitePanel.Portal.QuotaViewer exchangeStorageStats;
/// <summary>
/// rowExchangeLitigationHold 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 rowExchangeLitigationHold;
/// <summary>
/// lnkExchangeLitigationHold 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 lnkExchangeLitigationHold;
/// <summary>
/// exchangeLitigationHoldStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer exchangeLitigationHoldStats;
/// <summary> /// <summary>
/// besStatsPanel control. /// besStatsPanel control.
/// </summary> /// </summary>

View file

@ -0,0 +1,64 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CRM2011_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.CRM2011_Settings" %>
<%@ Register Src="../UserControls/SelectIPAddress.ascx" TagName="SelectIPAddress" TagPrefix="wsp" %>
<table>
<tr>
<td class="SubHead" width="200" nowrap>Sql Server</td>
<td>
<asp:TextBox runat="server" ID="txtSqlServer" MaxLength="256" Width="200px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSqlServer" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Reporting URL </td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" Width="200px" ID="txtReportingService" MaxLength="256" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtReportingService" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Web Application Server Domain</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" Width="200px" ID="txtDomainName" MaxLength="256" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDomainName" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Web Application Domain Scheme</td>
<td class="Normal" width="100%">
<asp:DropDownList runat="server" ID="ddlSchema">
<asp:ListItem Text="http" Value="http" />
<asp:ListItem Text="https" Value="https" />
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>CRM Website IP</td>
<td class="Normal" width="100%">
<wsp:SelectIPAddress ID="ddlCrmIpAddress" runat="server" ServerIdParam="ServerID" AllowEmptySelection="false" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>CRM Website Port</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" ID="txtPort" Width="200px" />
<asp:RangeValidator runat="server" ControlToValidate="txtPort" Display="dynamic" ErrorMessage="*" Type="String" MinimumValue="0" MaximumValue="9" />
</td>
</tr>
<tr>
<td class="SubHead" width="200" nowrap>Deployment web service</td>
<td class="Normal" width="100%">
<asp:TextBox runat="server" ID="txtAppRootDomain" Width="200px" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtAppRootDomain" ErrorMessage="*" />
</td>
</tr>
</table>

View file

@ -0,0 +1,99 @@
// Copyright (c) 2011, 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.Common;
namespace WebsitePanel.Portal.ProviderControls
{
public partial class CRM2011_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
{
txtReportingService.Text = settings[Constants.ReportingServer];
txtSqlServer.Text = settings[Constants.SqlServer];
txtDomainName.Text = settings[Constants.IFDWebApplicationRootDomain];
txtPort.Text = settings[Constants.Port];
txtAppRootDomain.Text = settings[Constants.AppRootDomain];
int selectedAddressid = FindAddressByText(settings[Constants.CRMWebsiteIP]);
ddlCrmIpAddress.AddressId = (selectedAddressid > 0) ? selectedAddressid : 0;
ddlSchema.SelectedValue = settings[Constants.UrlSchema];
}
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
{
settings[Constants.ReportingServer] = txtReportingService.Text;
settings[Constants.SqlServer] = txtSqlServer.Text;
settings[Constants.IFDWebApplicationRootDomain] = txtDomainName.Text;
settings[Constants.Port] = txtPort.Text;
settings[Constants.AppRootDomain] = txtAppRootDomain.Text;
if (ddlCrmIpAddress.AddressId > 0)
{
IPAddressInfo address = ES.Services.Servers.GetIPAddress(ddlCrmIpAddress.AddressId);
if (String.IsNullOrEmpty(address.ExternalIP))
{
settings[Constants.CRMWebsiteIP] = address.InternalIP;
}
else
{
settings[Constants.CRMWebsiteIP] = address.ExternalIP;
}
}
else
{
settings[Constants.CRMWebsiteIP] = String.Empty;
}
settings[Constants.UrlSchema] = ddlSchema.SelectedValue;
}
private static int FindAddressByText(string address)
{
foreach (IPAddressInfo addressInfo in ES.Services.Servers.GetIPAddresses(IPAddressPool.General, PanelRequest.ServerId))
{
if (addressInfo.InternalIP == address || addressInfo.ExternalIP == address)
{
return addressInfo.AddressId;
}
}
return 0;
}
}
}

View file

@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <автоматически создаваемое>
// Этот код создан программой.
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </автоматически создаваемое>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.ProviderControls {
public partial class CRM2011_Settings {
/// <summary>
/// txtSqlServer элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSqlServer;
/// <summary>
/// RequiredFieldValidator1 элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// txtReportingService элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtReportingService;
/// <summary>
/// txtDomainName элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtDomainName;
/// <summary>
/// RequiredFieldValidator2 элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// ddlSchema элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSchema;
/// <summary>
/// ddlCrmIpAddress элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::WebsitePanel.Portal.SelectIPAddress ddlCrmIpAddress;
/// <summary>
/// txtPort элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPort;
/// <summary>
/// txtAppRootDomain элемент управления.
/// </summary>
/// <remarks>
/// Автоматически создаваемое поле.
/// Для изменения переместите объявление поля из файла конструктора в файл кода программной части.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtAppRootDomain;
}
}

View file

@ -241,6 +241,16 @@
<wsp:SizeBox id="recoverableItemsWarning" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="true" RequireValidatorEnabled="true"/> <wsp:SizeBox id="recoverableItemsWarning" runat="server" ValidationGroup="CreateMailboxPlan" DisplayUnitsKB="false" DisplayUnitsMB="false" DisplayUnitsPct="true" RequireValidatorEnabled="true"/>
</td> </td>
</tr> </tr>
<tr>
<td class="FormLabel200" align="right"><asp:Label ID="lblLitigationHoldUrl" runat="server" meta:resourcekey="lblLitigationHoldUrl" Text="Url:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtLitigationHoldUrl" runat="server" Width="200" CssClass="NormalTextBox" MaxLength="255"></asp:TextBox></td>
</tr>
<tr>
<td class="FormLabel200" align="right"><asp:Label ID="lblLitigationHoldMsg" runat="server" meta:resourcekey="lblLitigationHoldMsg" Text="Page Content:"></asp:Label></td>
<td class="Normal" valign=top>
<asp:TextBox ID="txtLitigationHoldMsg" runat="server" Rows="10" TextMode="MultiLine" Width="100%" CssClass="NormalTextBox" Wrap="False" MaxLength="511"></asp:TextBox></td>
</tr>
</table> </table>
</asp:Panel> </asp:Panel>

View file

@ -124,6 +124,9 @@ namespace WebsitePanel.Portal
plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue; plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue;
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB; plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100; if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) if (PanelSecurity.SelectedUser.Role == UserRole.Administrator)
plan.MailboxPlanType = (int)ExchangeMailboxPlanType.Administrator; plan.MailboxPlanType = (int)ExchangeMailboxPlanType.Administrator;
@ -225,6 +228,9 @@ namespace WebsitePanel.Portal
chkEnableLitigationHold.Checked = false; chkEnableLitigationHold.Checked = false;
recoverableItemsSpace.QuotaValue = 0; recoverableItemsSpace.QuotaValue = 0;
recoverableItemsWarning.ValueKB = -1; recoverableItemsWarning.ValueKB = -1;
txtLitigationHoldMsg.Text = string.Empty;
txtLitigationHoldUrl.Text = string.Empty;
btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true; btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true;
@ -277,6 +283,8 @@ namespace WebsitePanel.Portal
chkEnableLitigationHold.Checked = plan.AllowLitigationHold; chkEnableLitigationHold.Checked = plan.AllowLitigationHold;
recoverableItemsSpace.QuotaValue = plan.RecoverableItemsSpace; recoverableItemsSpace.QuotaValue = plan.RecoverableItemsSpace;
recoverableItemsWarning.ValueKB = plan.RecoverableItemsWarningPct; recoverableItemsWarning.ValueKB = plan.RecoverableItemsWarningPct;
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true; btnUpdateMailboxPlan.Enabled = (string.IsNullOrEmpty(txtMailboxPlan.Text)) ? false : true;
@ -383,6 +391,8 @@ namespace WebsitePanel.Portal
plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue; plan.RecoverableItemsSpace = recoverableItemsSpace.QuotaValue;
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB; plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100; if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
if (PanelSecurity.SelectedUser.Role == UserRole.Administrator) if (PanelSecurity.SelectedUser.Role == UserRole.Administrator)

View file

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

View file

@ -53,7 +53,20 @@ namespace WebsitePanel.Portal
private HeliconApeStatus HeliconApeStatus private HeliconApeStatus HeliconApeStatus
{ {
get { return (HeliconApeStatus)ViewState["HeliconApeStatus"]; } get
{
if (null == ViewState["HeliconApeStatus"])
{
HeliconApeStatus nullstatus = new HeliconApeStatus();
return nullstatus;
}
else
{
return (HeliconApeStatus)ViewState["HeliconApeStatus"];
}
}
set { ViewState["HeliconApeStatus"] = value; } set { ViewState["HeliconApeStatus"] = value; }
} }
@ -91,17 +104,23 @@ namespace WebsitePanel.Portal
// Render a warning message about the automatic site's settings change // Render a warning message about the automatic site's settings change
if (!HeliconApeStatus.IsEnabled && site.IIs7) if (site.IIs7)
{ {
// Ensure the message is displayed only when neccessary if (!HeliconApeStatus.IsEnabled)
if (site.EnableWindowsAuthentication || !site.AspNetInstalled.EndsWith("I") || site.SecuredFoldersInstalled)
{ {
// TODO: show warning, do not force to enable integrated pool // Ensure the message is displayed only when neccessary
string warningStr = GetLocalizedString("EnableFoldersIIs7Warning.Text"); if (site.EnableWindowsAuthentication || !site.AspNetInstalled.EndsWith("I") || site.SecuredFoldersInstalled)
// Render a warning only if specified {
if (!String.IsNullOrEmpty(warningStr)) // TODO: show warning, do not force to enable integrated pool
btnToggleHeliconApe.OnClientClick = String.Format("return confirm('{0}')", warningStr); string warningStr = GetLocalizedString("EnableFoldersIIs7Warning.Text");
// Render a warning only if specified
if (!String.IsNullOrEmpty(warningStr))
btnToggleHeliconApe.OnClientClick = String.Format("return confirm('{0}')", warningStr);
}
} }
} }
// toggle // toggle
ToggleControls(); ToggleControls();

View file

@ -318,6 +318,13 @@
<Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.designer.cs"> <Compile Include="Lync\UserControls\LyncUserPlanSelector.ascx.designer.cs">
<DependentUpon>LyncUserPlanSelector.ascx</DependentUpon> <DependentUpon>LyncUserPlanSelector.ascx</DependentUpon>
</Compile> </Compile>
<Compile Include="ProviderControls\CRM2011_Settings.ascx.cs">
<DependentUpon>CRM2011_Settings.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ProviderControls\CRM2011_Settings.ascx.designer.cs">
<DependentUpon>CRM2011_Settings.ascx</DependentUpon>
</Compile>
<Compile Include="ProviderControls\hMailServer5_EditAccount.ascx.cs"> <Compile Include="ProviderControls\hMailServer5_EditAccount.ascx.cs">
<DependentUpon>hMailServer5_EditAccount.ascx</DependentUpon> <DependentUpon>hMailServer5_EditAccount.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -3823,6 +3830,7 @@
<Content Include="ExchangeServer\OrganizationDomainNames.ascx" /> <Content Include="ExchangeServer\OrganizationDomainNames.ascx" />
<Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" /> <Content Include="ExchangeServer\ExchangeAddMailboxPlan.ascx" />
<Content Include="Lync\UserControls\LyncUserSettings.ascx" /> <Content Include="Lync\UserControls\LyncUserSettings.ascx" />
<Content Include="ProviderControls\CRM2011_Settings.ascx" />
<Content Include="ServersEditWebPlatformInstaller.ascx" /> <Content Include="ServersEditWebPlatformInstaller.ascx" />
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" /> <Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
<Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" /> <Content Include="ExchangeServer\UserControls\AccountsListWithPermissions.ascx" />

View file

@ -3,7 +3,7 @@
<Version>2.1.0</Version> <Version>2.1.0</Version>
<FileVersion>$(BUILD_NUMBER)</FileVersion> <FileVersion>$(BUILD_NUMBER)</FileVersion>
<VersionLabel>$(BUILD_NUMBER)</VersionLabel> <VersionLabel>$(BUILD_NUMBER)</VersionLabel>
<ReleaseDate>2012-1-11</ReleaseDate> <ReleaseDate>2012-01-22</ReleaseDate>
<BuildConfiguration></BuildConfiguration> <BuildConfiguration></BuildConfiguration>
<RootFolder>..</RootFolder> <RootFolder>..</RootFolder>
<TrunkFolder>$(RootFolder)\WebsitePanel</TrunkFolder> <TrunkFolder>$(RootFolder)\WebsitePanel</TrunkFolder>

View file

@ -1 +1 @@
%windir%\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe build.xml /target:BuildWebPlatformInstallerFeed /p:BuildConfiguration=Debug /p:Version="2.1.0" /p:FileVersion="2.1.0.1" /p:VersionLabel="2.1.0.1" /v:n /fileLogger /m %windir%\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe build.xml /target:Deploy /p:BuildConfiguration=Debug /p:Version="2.1.0" /p:FileVersion="2.1.0.1" /p:VersionLabel="2.1.0.1" /v:n /fileLogger /m

View file

@ -1 +1 @@
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:BuildWebPlatformInstallerFeed /p:BuildConfiguration=Release /p:Version="2.1.0" /p:FileVersion="2.1.0.1" /p:VersionLabel="2.1.0.1" /v:n /fileLogger /m %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Deploy /p:BuildConfiguration=Release /p:Version="2.1.0" /p:FileVersion="2.1.0.1" /p:VersionLabel="2.1.0.1" /v:n /fileLogger /m