MERGE: buildtoolsv1 vs. main
This commit is contained in:
commit
2b45a5d223
330 changed files with 10414 additions and 2877 deletions
|
@ -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.269
|
// Runtime Version:4.0.30319.17929
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Studio settings -->
|
<!-- Studio settings -->
|
||||||
<settings>
|
<settings>
|
||||||
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
||||||
<add key="Web.Service" value="http://www.websitepanel.net/Services/InstallerService-Beta.asmx" />
|
<add key="Web.Service" value="" />
|
||||||
<add key="Web.AutoCheck" value="False" />
|
<add key="Web.AutoCheck" value="False" />
|
||||||
<add key="Web.Proxy.UseProxy" value="false" />
|
<add key="Web.Proxy.UseProxy" value="false" />
|
||||||
<add key="Web.Proxy.Address" value="" />
|
<add key="Web.Proxy.Address" value="" />
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Studio settings -->
|
<!-- Studio settings -->
|
||||||
<settings>
|
<settings>
|
||||||
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
||||||
<add key="Web.Service" value="http://www.websitepanel.net/Services/InstallerService-Beta.asmx" />
|
<add key="Web.Service" value="" />
|
||||||
<add key="Web.AutoCheck" value="False" />
|
<add key="Web.AutoCheck" value="False" />
|
||||||
<add key="Web.Proxy.UseProxy" value="false" />
|
<add key="Web.Proxy.UseProxy" value="false" />
|
||||||
<add key="Web.Proxy.Address" value="" />
|
<add key="Web.Proxy.Address" value="" />
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- Studio settings -->
|
<!-- Studio settings -->
|
||||||
<settings>
|
<settings>
|
||||||
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
|
||||||
<add key="Web.Service" value="http://www.websitepanel.net/Services/InstallerService-Beta.asmx" />
|
<add key="Web.Service" value="" />
|
||||||
<add key="Web.AutoCheck" value="False" />
|
<add key="Web.AutoCheck" value="False" />
|
||||||
<add key="Web.Proxy.UseProxy" value="false" />
|
<add key="Web.Proxy.UseProxy" value="false" />
|
||||||
<add key="Web.Proxy.Address" value="" />
|
<add key="Web.Proxy.Address" value="" />
|
||||||
|
|
|
@ -1,3 +1,31 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
namespace WebsitePanel.Installer
|
namespace WebsitePanel.Installer
|
||||||
{
|
{
|
||||||
partial class ApplicationForm
|
partial class ApplicationForm
|
||||||
|
@ -209,7 +237,7 @@ namespace WebsitePanel.Installer
|
||||||
this.MinimumSize = new System.Drawing.Size(640, 480);
|
this.MinimumSize = new System.Drawing.Size(640, 480);
|
||||||
this.Name = "ApplicationForm";
|
this.Name = "ApplicationForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "WebsitePanel Installer (Beta)";
|
this.Text = "WebsitePanel Installer";
|
||||||
this.Shown += new System.EventHandler(this.OnApplicationFormShown);
|
this.Shown += new System.EventHandler(this.OnApplicationFormShown);
|
||||||
this.statusBar.ResumeLayout(false);
|
this.statusBar.ResumeLayout(false);
|
||||||
this.statusBar.PerformLayout();
|
this.statusBar.PerformLayout();
|
||||||
|
|
Binary file not shown.
|
@ -31,7 +31,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
return UpdateBase(obj,
|
return UpdateBase(obj,
|
||||||
minimalInstallerVersion: "2.0.0",
|
minimalInstallerVersion: "2.0.0",
|
||||||
versionToUpgrade: "1.2.1",
|
versionToUpgrade: "1.2.1,2.0.0",
|
||||||
updateSql: true);
|
updateSql: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
return UpdateBase(obj,
|
return UpdateBase(obj,
|
||||||
minimalInstallerVersion: "2.0.0",
|
minimalInstallerVersion: "2.0.0",
|
||||||
versionsToUpgrade: "1.2.1",
|
versionsToUpgrade: "1.2.1,2.0.0",
|
||||||
updateSql: false,
|
updateSql: false,
|
||||||
versionSpecificAction: new InstallAction(ActionTypes.ConfigureSecureSessionModuleInWebConfig));
|
versionSpecificAction: new InstallAction(ActionTypes.ConfigureSecureSessionModuleInWebConfig));
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace WebsitePanel.Setup
|
||||||
{
|
{
|
||||||
return Server.UpdateBase(obj,
|
return Server.UpdateBase(obj,
|
||||||
minimalInstallerVersion: "2.0.0",
|
minimalInstallerVersion: "2.0.0",
|
||||||
versionToUpgrade: "1.2.1",
|
versionToUpgrade: "1.2.1,2.0.0",
|
||||||
updateSql: false);
|
updateSql: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,6 +605,10 @@ namespace WebsitePanel.Setup
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int value = (int)regkey.GetValue("ASPNET", 0);
|
int value = (int)regkey.GetValue("ASPNET", 0);
|
||||||
|
|
||||||
|
if (value != 1)
|
||||||
|
value = (int)regkey.GetValue("ASPNET45", 0);
|
||||||
|
|
||||||
return value == 1;
|
return value == 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,12 +325,16 @@ namespace WebsitePanel.Setup
|
||||||
|
|
||||||
if (webServer != null)
|
if (webServer != null)
|
||||||
{
|
{
|
||||||
var modules = doc.CreateElement(iis6 ? "httpModules" : "modules");
|
string modulesNodeName = iis6 ? "httpModules" : "modules";
|
||||||
webServer.AppendChild(modules);
|
if (webServer.SelectSingleNode(modulesNodeName + "/add[@name='SecureSession']") == null)
|
||||||
var sessionModule = doc.CreateElement("add");
|
{
|
||||||
sessionModule.SetAttribute("name", "SecureSession");
|
var modules = doc.CreateElement(modulesNodeName);
|
||||||
sessionModule.SetAttribute("type", "WebsitePanel.WebPortal.SecureSessionModule");
|
webServer.AppendChild(modules);
|
||||||
modules.AppendChild(sessionModule);
|
var sessionModule = doc.CreateElement("add");
|
||||||
|
sessionModule.SetAttribute("name", "SecureSession");
|
||||||
|
sessionModule.SetAttribute("type", "WebsitePanel.WebPortal.SecureSessionModule");
|
||||||
|
modules.AppendChild(sessionModule);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update /system.web/httpRuntime element
|
// update /system.web/httpRuntime element
|
||||||
|
@ -343,10 +347,10 @@ namespace WebsitePanel.Setup
|
||||||
// <add key="SessionValidationKey" value="XXXXXX" />
|
// <add key="SessionValidationKey" value="XXXXXX" />
|
||||||
//</appSettings>
|
//</appSettings>
|
||||||
var appSettings = doc.SelectSingleNode("configuration/appSettings");
|
var appSettings = doc.SelectSingleNode("configuration/appSettings");
|
||||||
if (appSettings != null)
|
if (appSettings != null && appSettings.SelectSingleNode("add[@key='SessionValidationKey']") == null)
|
||||||
{
|
{
|
||||||
var sessionKey = doc.CreateElement("add");
|
var sessionKey = doc.CreateElement("add");
|
||||||
sessionKey.SetAttribute("name", "SessionValidationKey");
|
sessionKey.SetAttribute("key", "SessionValidationKey");
|
||||||
sessionKey.SetAttribute("value", StringUtils.GenerateRandomString(16));
|
sessionKey.SetAttribute("value", StringUtils.GenerateRandomString(16));
|
||||||
appSettings.AppendChild(sessionKey);
|
appSettings.AppendChild(sessionKey);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6220,7 +6220,7 @@ GO
|
||||||
|
|
||||||
|
|
||||||
CREATE PROCEDURE [dbo].[GetItemIdByOrganizationId]
|
CREATE PROCEDURE [dbo].[GetItemIdByOrganizationId]
|
||||||
@OrganizationId nvarchar(10)
|
@OrganizationId nvarchar(128)
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
@ -6508,6 +6508,7 @@ CREATE TABLE [dbo].[ExchangeOrganizationDomains](
|
||||||
[ItemID] [int] NOT NULL,
|
[ItemID] [int] NOT NULL,
|
||||||
[DomainID] [int] NULL,
|
[DomainID] [int] NULL,
|
||||||
[IsHost] [bit] NULL,
|
[IsHost] [bit] NULL,
|
||||||
|
[DomainTypeID] [int] NOT NULL,
|
||||||
CONSTRAINT [PK_ExchangeOrganizationDomains] PRIMARY KEY CLUSTERED
|
CONSTRAINT [PK_ExchangeOrganizationDomains] PRIMARY KEY CLUSTERED
|
||||||
(
|
(
|
||||||
[OrganizationDomainID] ASC
|
[OrganizationDomainID] ASC
|
||||||
|
@ -6634,7 +6635,8 @@ AS
|
||||||
SELECT
|
SELECT
|
||||||
ED.DomainID,
|
ED.DomainID,
|
||||||
D.DomainName,
|
D.DomainName,
|
||||||
ED.IsHost
|
ED.IsHost,
|
||||||
|
ED.DomainTypeID
|
||||||
FROM
|
FROM
|
||||||
ExchangeOrganizationDomains AS ED
|
ExchangeOrganizationDomains AS ED
|
||||||
INNER JOIN Domains AS D ON ED.DomainID = D.DomainID
|
INNER JOIN Domains AS D ON ED.DomainID = D.DomainID
|
||||||
|
@ -23549,7 +23551,7 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName]
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (3, 3, N'MSFTP60', N'Microsoft FTP Server 6.0', N'WebsitePanel.Providers.FTP.MsFTP, WebsitePanel.Providers.FTP.IIs60', N'MSFTP60', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (3, 3, N'MSFTP60', N'Microsoft FTP Server 6.0', N'WebsitePanel.Providers.FTP.MsFTP, WebsitePanel.Providers.FTP.IIs60', N'MSFTP60', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (4, 4, N'MailEnable', N'MailEnable Server 1.x - 4.x', N'WebsitePanel.Providers.Mail.MailEnable, WebsitePanel.Providers.Mail.MailEnable', N'MailEnable', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (4, 4, N'MailEnable', N'MailEnable Server 1.x - 7.x', N'WebsitePanel.Providers.Mail.MailEnable, WebsitePanel.Providers.Mail.MailEnable', N'MailEnable', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (5, 5, N'MSSQL', N'Microsoft SQL Server 2000', N'WebsitePanel.Providers.Database.MsSqlServer, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (5, 5, N'MSSQL', N'Microsoft SQL Server 2000', N'WebsitePanel.Providers.Database.MsSqlServer, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL)
|
||||||
GO
|
GO
|
||||||
|
@ -23619,11 +23621,11 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName]
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (63, 4, N'hMailServer5', N'hMailServer 5.x', N'WebsitePanel.Providers.Mail.hMailServer5, WebsitePanel.Providers.Mail.hMailServer5', N'hMailServer5', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (63, 4, N'hMailServer5', N'hMailServer 5.x', N'WebsitePanel.Providers.Mail.hMailServer5, WebsitePanel.Providers.Mail.hMailServer5', N'hMailServer5', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (64, 4, N'SmarterMail', N'SmarterMail 7.x', N'WebsitePanel.Providers.Mail.SmarterMail7, WebsitePanel.Providers.Mail.SmarterMail7', N'SmarterMail60', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (64, 4, N'SmarterMail', N'SmarterMail 7.x - 8.x', N'WebsitePanel.Providers.Mail.SmarterMail7, WebsitePanel.Providers.Mail.SmarterMail7', N'SmarterMail60', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (65, 4, N'SmarterMail', N'SmarterMail 9.x', N'WebsitePanel.Providers.Mail.SmarterMail9, WebsitePanel.Providers.Mail.SmarterMail9', N'SmarterMail60', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (65, 4, N'SmarterMail', N'SmarterMail 9.x', N'WebsitePanel.Providers.Mail.SmarterMail9, WebsitePanel.Providers.Mail.SmarterMail9', N'SmarterMail60', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail60', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail60', NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (100, 1, N'Windows2008', N'Windows Server 2008', N'WebsitePanel.Providers.OS.Windows2008, WebsitePanel.Providers.OS.Windows2008', N'Windows2008', NULL)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (100, 1, N'Windows2008', N'Windows Server 2008', N'WebsitePanel.Providers.OS.Windows2008, WebsitePanel.Providers.OS.Windows2008', N'Windows2008', NULL)
|
||||||
GO
|
GO
|
||||||
|
@ -45799,6 +45801,29 @@ GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE PROCEDURE [dbo].ChangeExchangeAcceptedDomainType
|
||||||
|
(
|
||||||
|
@ItemID int,
|
||||||
|
@DomainID int,
|
||||||
|
@DomainTypeID int
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
UPDATE ExchangeOrganizationDomains
|
||||||
|
SET DomainTypeID=@DomainTypeID
|
||||||
|
WHERE ItemID=ItemID AND DomainID=@DomainID
|
||||||
|
RETURN
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -46064,6 +46089,8 @@ ALTER TABLE [dbo].[ExchangeOrganizationDomains] CHECK CONSTRAINT [FK_ExchangeOrg
|
||||||
GO
|
GO
|
||||||
ALTER TABLE [dbo].[ExchangeOrganizationDomains] ADD CONSTRAINT [DF_ExchangeOrganizationDomains_IsHost] DEFAULT ((0)) FOR [IsHost]
|
ALTER TABLE [dbo].[ExchangeOrganizationDomains] ADD CONSTRAINT [DF_ExchangeOrganizationDomains_IsHost] DEFAULT ((0)) FOR [IsHost]
|
||||||
GO
|
GO
|
||||||
|
ALTER TABLE [dbo].[ExchangeOrganizationDomains] ADD CONSTRAINT [DF_ExchangeOrganizationDomains_DomainTypeID] DEFAULT ((0)) FOR [DomainTypeID]
|
||||||
|
GO
|
||||||
ALTER TABLE [dbo].[PrivateIPAddresses] WITH CHECK ADD CONSTRAINT [FK_PrivateIPAddresses_ServiceItems] FOREIGN KEY([ItemID])
|
ALTER TABLE [dbo].[PrivateIPAddresses] WITH CHECK ADD CONSTRAINT [FK_PrivateIPAddresses_ServiceItems] FOREIGN KEY([ItemID])
|
||||||
REFERENCES [dbo].[ServiceItems] ([ItemID])
|
REFERENCES [dbo].[ServiceItems] ([ItemID])
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,178 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
|
||||||
<head>
|
|
||||||
<title>WebsitePanel - Readme</title>
|
|
||||||
<style type="text/css">
|
|
||||||
.style1 {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>
|
|
||||||
WebsitePanel - Readme</h1>
|
|
||||||
<p>
|
|
||||||
WebsitePanel is a hosting control panel for Windows servers.</p>
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
License</h2>
|
|
||||||
<p>
|
|
||||||
WebsitePanel is released under BSD license. Please see LICENSE.txt file in the
|
|
||||||
root folder of this project.</p>
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
Project Structure</h2>
|
|
||||||
<p>
|
|
||||||
The project has the following folders structure:</p>
|
|
||||||
<ul>
|
|
||||||
<li><strong>\Trunk</strong> - project version currently in development<ul>
|
|
||||||
<li><strong>\Sources</strong> - project source codes.</li>
|
|
||||||
<li><strong>\Lib</strong> - all referenced 3rd-party assemblies required to build
|
|
||||||
the solution are placed in this folder.</li>
|
|
||||||
<li><strong>\Database</strong> - the folder contains SQL scripts for creating
|
|
||||||
initial database structure and its update to the current version.<ul>
|
|
||||||
<li><strong>install_db.sql</strong> - SQL script to create full database structure
|
|
||||||
for the <em>previous</em> release.</li>
|
|
||||||
<li><strong>update_db.sql</strong> - SQL script to update database structure for the
|
|
||||||
revious release to the current one.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><strong>\Docs</strong> - project documentation<ul>
|
|
||||||
<li><strong>\Developer</strong> - technical documentation (specs, diagrams, POCs,
|
|
||||||
etc.) for developers working on the project</li>
|
|
||||||
<li><strong>\User</strong> - user-related documentation (user guides, how-tows,
|
|
||||||
etc.) for end-users using the product</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><strong>\Build</strong> - folder containing solution assemblies that
|
|
||||||
are referenced from other projects</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><strong>\Releases</strong> - contains all project releases</li>
|
|
||||||
<li><strong>\Branches</strong> - contains project branches for proof-of-concepts,
|
|
||||||
new development, bug fixing, etc.</li>
|
|
||||||
<li><strong>LICENSE.txt</strong> - project license</li>
|
|
||||||
<li><strong>Readme.htm</strong> - the file you are reading right now</li>
|
|
||||||
<li><strong>ReleaseNotes.htm</strong> - project release notes</li>
|
|
||||||
</ul>
|
|
||||||
<h2>
|
|
||||||
Build How-To</h2>
|
|
||||||
<h3>
|
|
||||||
Downloading 3rd-Party Libraries</h3>
|
|
||||||
<p class="style1">
|
|
||||||
SimpleDNS API</p>
|
|
||||||
<p>
|
|
||||||
SDNSAPI.dll is required to build "WebsitePanel.Providers.DNS.SimpleDNS50"
|
|
||||||
project.</p>
|
|
||||||
<p>
|
|
||||||
Download "Simple DNS Plus API for .NET and COM" library from "Downloads" section
|
|
||||||
on <a href="http://www.simpledns.com">www.simpledns.com</a> web site web site (at the
|
|
||||||
time of writing direct link to this library is
|
|
||||||
<a href="http://www.simpledns.com/outbox/sdnsapi-setup.exe">
|
|
||||||
http://www.simpledns.com/outbox/sdnsapi-setup.exe</a>). Install the library and
|
|
||||||
then copy SDNSAPI.dll (located in "C:\Program Files (x86)\Simple DNS Plus API
|
|
||||||
for .NET and COM" by default) from its installation folder to "Lib" folder of
|
|
||||||
WebsitePanel project.</p>
|
|
||||||
<p class="style1">
|
|
||||||
MySQL .NET Connector</p>
|
|
||||||
<p>
|
|
||||||
MySQL .NET Connector is required to build
|
|
||||||
"WebsitePanel.Providers.Database.MySql" project.</p>
|
|
||||||
<p>
|
|
||||||
Go to <a href="http://www.mysql.com">www.mysql.com</a> web site and download the
|
|
||||||
latest release of "MySQL .NET Connector" library from there (at the time of
|
|
||||||
writing it is located at <a href="http://dev.mysql.com/downloads/connector/net/">
|
|
||||||
http://dev.mysql.com/downloads/connector/net/</a>). Install MySQL connector and
|
|
||||||
then copy "MySQL.Data.dll" assembly from its installation folder to "Lib" folder
|
|
||||||
of WebsitePanel project.</p>
|
|
||||||
<p class="style1">
|
|
||||||
OrderBox (Directi API)</p>
|
|
||||||
<p>
|
|
||||||
Certain libraries are required to compile "WebsitePanel.Plugins.Directi" project
|
|
||||||
of Enterprise Server solution.</p>
|
|
||||||
<p>
|
|
||||||
Open <a href="http://40083.myorderbox.com/kb/servlet/KBServlet/faq589.html">
|
|
||||||
http://40083.myorderbox.com/kb/servlet/KBServlet/faq589.html</a> page and
|
|
||||||
download the following files:</p>
|
|
||||||
<ul>
|
|
||||||
<li>NET_CoreExamples_vX.zip</li>
|
|
||||||
|
|
||||||
<li>NET_DomainsExamples_vX.zip</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
Unpack both archives to some temporary location and then copy the following
|
|
||||||
files to "Lib" folder of WebsitePanel project:</p>
|
|
||||||
<ul>
|
|
||||||
<li>OrderBoxCoreLib.dll</li>
|
|
||||||
<li>OrderBoxDomainsLib.dll</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Set the Reference Paths to 3rd-Party Libraries</h3>
|
|
||||||
<p>After placing the required 3rd-Party Libraries into "Lib" folder
|
|
||||||
of WebsitePanel project, open WebsitePanel.Server solution (WebsitePanel.Server.sln)
|
|
||||||
and set ReferencePath of "WebsitePanel.Providers.Database.MySQL" and "WebsitePanel.Providers.DNS.SimpleDNS50" projects
|
|
||||||
to the absolute path of the "Lib" folder. See "Reference Path Is Incorrect" paragraph of
|
|
||||||
<a href="http://msdn.microsoft.com/en-us/library/ayds71se%28v=VS.100%29.aspx" target="_blank">Troubleshooting Broken References</a>
|
|
||||||
article for help.<br />
|
|
||||||
Do the same for "WebsitePanel.Plugins.Directi" project of WebsitePanel.EnterpriseServer solution (WebsitePanel.EnterpriseServer.sln).</p>
|
|
||||||
|
|
||||||
<h3>
|
|
||||||
Building Solutions</h3>
|
|
||||||
<p>
|
|
||||||
Build WebsitePanel solutions in the following order:</p>
|
|
||||||
<ul>
|
|
||||||
<li>WebsitePanel.Server.sln</li>
|
|
||||||
<li>WebsitePanel.EnterpriseServer.sln</li>
|
|
||||||
<li>WebsitePanel.WebPortal.sln</li>
|
|
||||||
</ul>
|
|
||||||
<h3>
|
|
||||||
Creating Database</h3>
|
|
||||||
<p>
|
|
||||||
In order to run WebsitePanel Enterprise Server it's required to create SQL
|
|
||||||
Server database to hold its internal data.</p>
|
|
||||||
<ol>
|
|
||||||
<li>Using SQL Server Management Studio or any other database tool create a database
|
|
||||||
called "WebsitePanel".</li>
|
|
||||||
<li>Execute "install_db.sql" script containing DDL and initial data from "\Database"
|
|
||||||
folder of WebsitePanel project against created database.</li>
|
|
||||||
<li>Create "WebsitePanel" SQL user account and grant it "db_owner" rights on
|
|
||||||
"WebsitePanel" database.</li>
|
|
||||||
<li>Open "web.config" file in the root of Enterprise Server application and update
|
|
||||||
CryptoKey (appSettings/add/WebsitePanel.CryptoKey element) value there. It might
|
|
||||||
be arbitrary non-empty string.</li>
|
|
||||||
<li>Run WebsitePanel.PasswordEncoder tool available in "Tools" folder and generate
|
|
||||||
hash for "serveradmin" account password using CryptoKey and "Encrypt" button.</li>
|
|
||||||
<li>Update "Password" column in "Users" database table with generated hash for the
|
|
||||||
record with UserID = 1 ("serveradmin" account).</li>
|
|
||||||
<li>In Enterprise Server's web.config update database connection string with proper
|
|
||||||
settings in order to connect to WebsitePanel database.</li>
|
|
||||||
</ol>
|
|
||||||
<h3>
|
|
||||||
Configuring Web Applications</h3>
|
|
||||||
<p>
|
|
||||||
It's assumed below that root of WebsitePanel project is pointing to "C:\Projects\WebsitePanel"
|
|
||||||
folder.</p>
|
|
||||||
<ul>
|
|
||||||
<li>Create "WebsitePanel Server" web site (with 127.0.0.1:9003 binding) using IIS Management Tool with the root
|
|
||||||
folder pointing to "C:\Projects\WebsitePanel\Trunk\Sources\WebsitePanel.Server".</li>
|
|
||||||
<li>Create new user account called "WebsitePanelServer" and update process identity
|
|
||||||
with it for "WebsitePanel Server" application pool. This user account must have
|
|
||||||
required privileges to manage computer resources (by default be a member of
|
|
||||||
local "Administrators" group) and also must be a member of "IIS_IUSRS" (IIS 7).</li>
|
|
||||||
<li>Create "WebsitePanel Enterprise Server" web site (with 127.0.0.1:9002
|
|
||||||
binding) using IIS Management Tool with
|
|
||||||
the root folder pointing to "C:\Projects\WebsitePanel\Trunk\Sources\WebsitePanel.EnterpriseServer".</li>
|
|
||||||
<li>Create "WebsitePanel Web Portal" web site (with <all unassigned>:9001
|
|
||||||
binding) using IIS Management Tool with the
|
|
||||||
root folder pointing to "C:\Projects\WebsitePanel\Trunk\Sources\WebsitePanel.WebPortal".</li>
|
|
||||||
<li>Open "App_Data\SiteSettings.config" file in "WebsitePanel.WebPortal" folder and
|
|
||||||
update URL to Enterprise Server (http://127.0.0.1:9002 by default).</li>
|
|
||||||
<li>Open web.config in the root of WebsitePanel.Server application and update
|
|
||||||
"server access password" ("websitepanel.server/security/password" element). You
|
|
||||||
should be able to generate password SHA1 hash using WebsitePanel.PasswordEncoder
|
|
||||||
tool.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,208 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>WebsitePanel - Release Notes</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
WebsitePanel - Release Notes</h1>
|
|
||||||
<p>
|
|
||||||
<strong>July 14, 2011 - v1.2.0</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added: Support for managing private Hyper-V cloud solution implemented with System
|
|
||||||
Center Virtual Machine Manager 2008 R2, System Center Operations Manager 2007 and
|
|
||||||
Dynamic Data Center Toolkit v3 (Beta) (contributed by Austen Knowledge Group)</li>
|
|
||||||
<li>Added: Support of Helicon Ape module for securing files & folders on web-site level
|
|
||||||
(contributed by <a href="http://www.helicontech.com/" target="_blank">HeliconTech</a>)</li>
|
|
||||||
<li>Added: Support for Razor files extensions (*.cshtml, *.vbhtml) in File Manager</li>
|
|
||||||
<li>Added: "Notify Overused Databases" scheduled task (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: Display size for MySQL databases on Edit Database page (contributed by <a
|
|
||||||
href="http://social.msdn.microsoft.com/profile/yoda-ict" target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: SSL Management (contributed by <a href="http://social.msdn.microsoft.com/profile/onionman/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/threads"
|
|
||||||
target="_blank">OnionMan</a>)</li>
|
|
||||||
<li>Added: Domain aliases changed to allow using existing DNS domains to setup aliases
|
|
||||||
and pointers (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: "Announcements" posting mode for Mail Lists in hMail Server Service Provider</li>
|
|
||||||
<li>Added: Personal Information and Signature sections added in hMail Mail Account settings</li>
|
|
||||||
<li>Added: SMTP authentication for Mail Lists in hMail Server Provider</li>
|
|
||||||
<li>Updated: Project code base migrated to .NET Framework 4</li>
|
|
||||||
<li>Fixed: Minor corrections in default landing page supplied by WebsitePanel for newly
|
|
||||||
created web sites (contributed by <a href="http://social.msdn.microsoft.com/profile/jegor"
|
|
||||||
target="_blank">jegor</a>)</li>
|
|
||||||
<li>Fixed: Customer's first and last names with localized characters are not properly
|
|
||||||
rendered on some pages</li>
|
|
||||||
<li>Fixed: Issue with unlimited mailbox quotas in SmarterMail 7 service provider</li>
|
|
||||||
<li>Fixed: Dynamics CRM 4 rollup updates are not applied for new organizations being
|
|
||||||
created through WebsitePanel</li>
|
|
||||||
<li>Fixed: Original deployment error messages with sensitive information are shown to
|
|
||||||
a user instead of a generic error message in MS Web App Gallery module</li>
|
|
||||||
<li>Fixed: Dedicated IP Addresses are incorrectly distributed via Virtual Servers</li>
|
|
||||||
<li>Fixed: SQL User is unable to login with "Browse Database" feature if its password
|
|
||||||
has '=' character (contributed by <a href="http://social.msdn.microsoft.com/profile/webio"
|
|
||||||
target="_blank">webio</a>)</li>
|
|
||||||
<li>Fixed: Wrong default button on "Create New Exchange 2010 Organization" page</li>
|
|
||||||
<li>Fixed: Missing required validation for Forwarding field on Edit Mailbox Account
|
|
||||||
properties page (contributed by <a href="http://social.msdn.microsoft.com/profile/webio"
|
|
||||||
target="_blank">webio</a>)</li>
|
|
||||||
<li>Fixed: Adjust "maxRequestLength" attribute in "httpRuntime" element in WSP Enterprise
|
|
||||||
Server & Server web.config files to support large files uploading</li>
|
|
||||||
<li>Fixed: Missing information whether Administrator password is set or not in hMail
|
|
||||||
Provider Settings</li>
|
|
||||||
<li>Fixed: Issue with setting up a correct type handler for WebsitePanel.IisModules.SecureFolders
|
|
||||||
HTTP authentication module in IIS 7 (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Fixed: Issue with Mail List members removed after clicking “Save List” button in
|
|
||||||
hMail Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when a domain alias could not be enabled for hMail Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when forwarding address is incorrectly set for a mail account in hMail
|
|
||||||
Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when integrity check is not performed if to add a contact in Hosted
|
|
||||||
Exchange Service Provider</li>
|
|
||||||
<li>Fixed: Issue when a user is unable to remove subscribers from the list or group
|
|
||||||
In Merak Mail Service Provider</li>
|
|
||||||
</ul>
|
|
||||||
<h1>
|
|
||||||
WebsitePanel - Release Notes</h1>
|
|
||||||
<p>
|
|
||||||
<strong>March 15, 2011 - v1.2.0 (Beta)</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added: Support for managing private Hyper-V cloud solution implemented with System Center Virtual Machine Manager 2008 R2, System Center Operations Manager 2007 and Dynamic Data Center Toolkit v3 (Beta) (contributed by Austen Knowledge Group)</li>
|
|
||||||
<li>Added: Support of Helicon Ape module for securing files & folders on web-site level (contributed by <a href="http://www.helicontech.com/" target="_blank">HeliconTech</a>)</li>
|
|
||||||
<li>Added: Support for Razor files extensions (*.cshtml, *.vbhtml) in File Manager</li>
|
|
||||||
<li>Added: "Notify Overused Databases" scheduled task (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict" target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: Display size for MySQL databases on Edit Database page (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict" target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Updated: Project code base migrated to .NET Framework 4</li>
|
|
||||||
<li>Fixed: Minor corrections in default landing page supplied by WebsitePanel for newly created web sites (contributed by <a href="http://social.msdn.microsoft.com/profile/jegor" target="_blank">jegor</a>)</li>
|
|
||||||
<li>Fixed: Customer's first and last names with localized characters are not properly rendered on some pages</li>
|
|
||||||
<li>Fixed: Issue with unlimited mailbox quotas in SmarterMail 7 service provider</li>
|
|
||||||
<li>Fixed: Dynamics CRM 4 rollup updates are not applied for new organizations being created through WebsitePanel</li>
|
|
||||||
<li>Fixed: Original deployment error messages with sensitive information are shown to a user instead of a generic error message in MS Web App Gallery module</li>
|
|
||||||
<li>Fixed: Dedicated IP Addresses are incorrectly distributed via Virtual Servers</li>
|
|
||||||
<li>Fixed: SQL User is unable to login with "Browse Database" feature if its password has '=' character (contributed by <a href="http://social.msdn.microsoft.com/profile/webio" target="_blank">webio</a>)</li>
|
|
||||||
<li>Fixed: Wrong default button on "Create New Exchange 2010 Organization" page</li>
|
|
||||||
<li>Fixed: Missing required validation for Forwarding field on Edit Mailbox Account properties page (contributed by <a href="http://social.msdn.microsoft.com/profile/webio"
|
|
||||||
target="_blank">webio</a>)</li>
|
|
||||||
<li>Fixed: Adjust "maxRequestLength" attribute in "httpRuntime" element in WSP Enterprise Server & Server web.config files to support large files uploading</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
<strong>December 9, 2010 - v1.1.1 (Beta)</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added: SSL Management (contributed by <a href="http://social.msdn.microsoft.com/profile/onionman/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/threads"
|
|
||||||
target="_blank">OnionMan</a>)</li>
|
|
||||||
<li>Added: Domain aliases changed to allow using existing DNS
|
|
||||||
domains to setup aliases and pointers (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: "Announcements" posting mode for Mail Lists in hMail Server Service Provider</li>
|
|
||||||
<li>Added: Personal Information and Signature sections added in hMail Mail Account settings</li>
|
|
||||||
<li>Added: SMTP authentication for Mail Lists in hMail Server Provider</li>
|
|
||||||
<li>Fixed: Missing information whether Administrator password is set or not in hMail
|
|
||||||
Provider Settings</li>
|
|
||||||
<li>Fixed: Issue with setting up a correct type handler for WebsitePanel.IisModules.SecureFolders
|
|
||||||
HTTP authentication module in IIS 7 (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Fixed: Issue with Mail List members removed after clicking “Save List” button in
|
|
||||||
hMail Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when a domain alias could not be enabled for hMail Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when forwarding address is incorrectly set for a mail account in hMail
|
|
||||||
Server Service Provider</li>
|
|
||||||
<li>Fixed: Issue when integrity check is not performed if to add a contact in Hosted
|
|
||||||
Exchange Service Provider</li>
|
|
||||||
<li>Fixed: Issue when a user is unable to remove subscribers from the list or group
|
|
||||||
In Merak Mail Service Provider</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
<strong>November 17, 2010 - v1.1.0</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added Exchange 2010 SP1 Hosting Mode module</li>
|
|
||||||
<li>Added SharePoint 2010 module (contributed by <a href="http://social.msdn.microsoft.com/profile/webio/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/threads"
|
|
||||||
target="_blank">Webio</a>)</li>
|
|
||||||
<li>Added SmarterMail 7 module (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added SmarterStats 6 module (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: Addition to get the correct domain name inside the TaskManager (contributed
|
|
||||||
by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Added: Workaround for Global Address list to show up after Exchange 2010 SP1 installation
|
|
||||||
without /hosting switch. This workaround is not switched on by default; to switch
|
|
||||||
it on, please follow the instructions provided in this <a href="http://social.msdn.microsoft.com/Forums/en-US/wspsupport/thread/342db243-a74b-4374-a848-d9edfbc7f072"
|
|
||||||
target="_blank">post</a>.</li>
|
|
||||||
<li>Added: WebsitePanel.IISModules (<a href="http://iismodules.codeplex.com/" target="_blank">http://iismodules.codeplex.com</a>)</li>
|
|
||||||
<li>Added: meta:resourcekey to BillingCyclesEditCycle.ascx and BillingCyclesAddCycle.ascx</li>
|
|
||||||
<li>Updated WSP Portal web.config in 1.1 upgrade script to enable custom error</li>
|
|
||||||
<li>Fixed: MDaemon alias import fails: Directory hardcoded in the module (contributed
|
|
||||||
by <a href="https://sourceforge.net/tracker/?func=detail&atid=1330292&aid=3032904&group_id=316247"
|
|
||||||
target="_blank">mcrook</a>)</li>
|
|
||||||
<li>Fixed: When updating Exchange account general settings an empty account password
|
|
||||||
is stored into WSP database (contributed by <a href="http://social.msdn.microsoft.com/profile/webio/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/threads"
|
|
||||||
target="_blank">Webio</a>)</li>
|
|
||||||
<li>Fixed: Bug with mail aliases (MDaemon) (contributed by <a href="https://sourceforge.net/tracker/?func=detail&atid=1330292&aid=3032904&group_id=316247"
|
|
||||||
target="_blank">mcrook</a>)</li>
|
|
||||||
<li>Fixed: SmarterMail 7: Max mailbox size -1 (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2"
|
|
||||||
target="_blank">yoda-ict</a>)</li>
|
|
||||||
<li>Fixed: Not showing emails (MDaemon ODBC database) (contributed by <a href="https://sourceforge.net/tracker/?func=detail&atid=1330292&aid=3032904&group_id=316247"
|
|
||||||
target="_blank">mcrook</a>)</li>
|
|
||||||
<li>Fixed: Show apps for all languages in Microsoft Web App Gallery module</li>
|
|
||||||
<li>Fixed: Microsoft Web Application Gallery 1.0.1 module - images missing when apps
|
|
||||||
catalog or an individual app page is displayed</li>
|
|
||||||
<li>Fixed: Exchange 2010 SP1 Beta module unable to create organization when plan quotas
|
|
||||||
are set to unlimited</li>
|
|
||||||
<li>Fixed: Customer login account gets error while clicking on "Export report" button
|
|
||||||
under Disk Space Report</li>
|
|
||||||
<li>Fixed: Microsoft SQL 2008 user creation with some characters fails</li>
|
|
||||||
<li>Fixed: Unable to restore Microsoft SQL Server 2008 R2 databases</li>
|
|
||||||
<li>Fixed: Zip Files Error in File Manager and related modules: cannot zip 65535 files
|
|
||||||
or greater</li>
|
|
||||||
<li>Fixed: Localization Toolkit Import is not working</li>
|
|
||||||
<li>Fixed: Problems calculating disk space for Exchange-enabled spaces</li>
|
|
||||||
<li>Fixed: Negative value is allowed in "Max Mailbox Size, MB" field when
|
|
||||||
create or edit a mail box</li>
|
|
||||||
<li>Fixed: Service provider properties are not updated/Missing UpdateServiceProperties
|
|
||||||
stored procedure in the database when do a fresh install</li>
|
|
||||||
<li>Fixed: Exchange 2010 SP1 Hosted Edition provider renamed to Exchange 2010 SP1 Hosting
|
|
||||||
Mode</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
<strong>September 3, 2010 - v1.0.2</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added Exchange 2010 SP1 Module Beta</li>
|
|
||||||
<li>Added SharePoint 2010 Module Beta (contributed by <a href="http://social.msdn.microsoft.com/profile/webio/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/threads">
|
|
||||||
Webio</a>)</li>
|
|
||||||
<li>Added SmarterMail 7 Module Beta (contributed by <a href="http://social.msdn.microsoft.com/profile/yoda-ict/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/wspdiscuss/thread/0053f21c-f7ee-4e97-8fd5-0e84cb046cc2">
|
|
||||||
yoda-ict</a>)</li>
|
|
||||||
<li>Added Exchange Import Tool for WSP 1.0 - WSP 1.0.2</li>
|
|
||||||
<li>Added “Disable Mailbox Size Edit” quota for “Mail” group</li>
|
|
||||||
<li>Fixed: Zip Files Error: cannot zip 65535 files or greater</li>
|
|
||||||
<li>Fixed: Microsoft Web Application Gallery 1.0.1 images missing bug</li>
|
|
||||||
<li>Fixed: Bug in Mail Aliases for Mdaemon (patch provided by <a href="https://sourceforge.net/tracker/?func=detail&atid=1330292&aid=3032904&group_id=316247">
|
|
||||||
mcrook</a>)</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
<strong>July 8, 2010 - v1.0.1</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Added Windows 7 and Windows Vista support.</li>
|
|
||||||
<li>Added "All unassigned" support for web site bindings.</li>
|
|
||||||
<li>"Instant Alias" is allowed in DNS-less hosting spaces.</li>
|
|
||||||
<li>Improved "Web App Gallery" module:<ul>
|
|
||||||
<li>all application packs are shown, but only those ones with satisfying requirements
|
|
||||||
could be installed</li>
|
|
||||||
<li>application packs are filtered by language and sorted alphabetically</li>
|
|
||||||
<li>added caching for applications graphics</li>
|
|
||||||
<li>re-designed application installation page</li>
|
|
||||||
<li>improved handling of databases and database users</li>
|
|
||||||
<li>improved errors reporting</li>
|
|
||||||
<li>temporary web site URL is displayed on completion screen</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>Added for "IIS 7" provider an ability to specify paths to ASP.NET and
|
|
||||||
ASP ISAPIs.</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
<strong>April 16, 2010 - v1.0</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>Initial release of WebsitePanel under BSD license.</li>
|
|
||||||
</ul>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,11 +1,11 @@
|
||||||
Windows Registry Editor Version 5.00
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\MEACPTransportAgent]
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\WSPTransportAgent]
|
||||||
"MaxSize"=dword:00080000
|
"MaxSize"=dword:00080000
|
||||||
"AutoBackupLogFiles"=dword:00000000
|
"AutoBackupLogFiles"=dword:00000000
|
||||||
"Retention"=dword:00000000
|
"Retention"=dword:00000000
|
||||||
|
|
||||||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\MEACPTransportAgent\MEACPTransportAgent]
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\WSPTransportAgent\WSPTransportAgent]
|
||||||
"EventMessageFile"=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,\
|
"EventMessageFile"=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,\
|
||||||
00,73,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,\
|
00,73,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,\
|
||||||
4e,00,45,00,54,00,5c,00,46,00,72,00,61,00,6d,00,65,00,77,00,6f,00,72,00,6b,\
|
4e,00,45,00,54,00,5c,00,46,00,72,00,61,00,6d,00,65,00,77,00,6f,00,72,00,6b,\
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
WSP Transport Agent Installation
|
||||||
|
================================
|
||||||
|
|
||||||
|
Perform the following steps:
|
||||||
|
|
||||||
|
A) Copy the files WSPTransportAgent.dll and WSPTransportAgent.dll.config to "C:\Program Files\Microsoft\Exchange Server\V14\Public"
|
||||||
|
B) Import the WSPTransportAgent.reg to create the event source
|
||||||
|
C) Use the registry editor and provide the "NETWORK SERVICE" Full Control on the following Key
|
||||||
|
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\WSPTransportAgent
|
||||||
|
D) Run the following powershell command in the exchange management shell:
|
||||||
|
Install-TransportAgent "WSPTransportAgent" -TransportAgentFactory WSPTransportAgent.WSPRoutingAgentFactory -AssemblyPath "C:\Program Files\Microsoft\Exchange Server\V14\Public\WSPTransportAgent.dll"
|
||||||
|
E) Enable-TransportAgent "WSPTransportAgent"
|
||||||
|
F) Restart-Service MSExchangeTransport
|
|
@ -100,6 +100,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
Global.TempDomain = serviceSettings["TempDomain"];
|
Global.TempDomain = serviceSettings["TempDomain"];
|
||||||
ServerInfo serverInfo = ServerController.GetServerById(serviceInfo.ServerId);
|
ServerInfo serverInfo = ServerController.GetServerById(serviceInfo.ServerId);
|
||||||
Global.ADRootDomain = serverInfo.ADRootDomain;
|
Global.ADRootDomain = serverInfo.ADRootDomain;
|
||||||
|
Global.NetBiosDomain = ActiveDirectoryUtils.GetNETBIOSDomainName(Global.ADRootDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnBrowseOU(object sender, EventArgs e)
|
private void OnBrowseOU(object sender, EventArgs e)
|
||||||
|
|
|
@ -58,6 +58,13 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
set { aDRootDomain = value; }
|
set { aDRootDomain = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string netBiosDomain;
|
||||||
|
public static string NetBiosDomain
|
||||||
|
{
|
||||||
|
get { return netBiosDomain; }
|
||||||
|
set { netBiosDomain = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public static PackageInfo Space;
|
public static PackageInfo Space;
|
||||||
public static string TempDomain;
|
public static string TempDomain;
|
||||||
|
|
||||||
|
|
|
@ -757,15 +757,19 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
if (EmailAddressExists(email))
|
if (EmailAddressExists(email))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (AccountExists(accountName))
|
if (AccountExists(accountName))
|
||||||
throw new Exception(string.Format("Account {0} already exists", accountName));
|
throw new Exception(string.Format("Account {0} already exists", accountName));
|
||||||
|
|
||||||
string displayName = (string)entry.Properties["displayName"].Value;
|
string displayName = (string)entry.Properties["displayName"].Value;
|
||||||
|
|
||||||
|
string samName = (string)entry.Properties["sAMAccountName"].Value;
|
||||||
|
// this should really NEVER happen - an AD account without sAMAccountName?!
|
||||||
|
if (string.IsNullOrEmpty(samName))
|
||||||
|
throw new Exception("SAMAccountName is not specified");
|
||||||
|
// add Netbios-Domainname before samAccountName - format in the database
|
||||||
|
samName = Global.NetBiosDomain + "\\" + samName;
|
||||||
|
|
||||||
int userId = AddOrganizationUser(itemId, accountName, displayName, email, string.Empty);
|
int userId = AddOrganizationUser(itemId, accountName, displayName, email, samName, string.Empty);
|
||||||
AddAccountEmailAddress(userId, email);
|
AddAccountEmailAddress(userId, email);
|
||||||
|
|
||||||
//account type
|
//account type
|
||||||
|
@ -796,7 +800,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, string.Empty, string.Empty);
|
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty);
|
||||||
|
|
||||||
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
||||||
|
|
||||||
|
@ -847,7 +851,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
if (email != null && email.ToLower().StartsWith("smtp:"))
|
if (email != null && email.ToLower().StartsWith("smtp:"))
|
||||||
email = email.Substring(5);
|
email = email.Substring(5);
|
||||||
|
|
||||||
|
// no sAMAccountName for contacts - so String.Empty is OK
|
||||||
int accountId = AddAccount(itemId, ExchangeAccountType.Contact, accountName, displayName, email, false, 0, string.Empty, null);
|
int accountId = AddAccount(itemId, ExchangeAccountType.Contact, accountName, displayName, email, false, 0, string.Empty, null);
|
||||||
|
|
||||||
Log.WriteEnd("Contact imported");
|
Log.WriteEnd("Contact imported");
|
||||||
|
@ -886,7 +890,14 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
if (EmailAddressExists(email))
|
if (EmailAddressExists(email))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||||
|
|
||||||
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName, displayName, email, false, 0, string.Empty, null);
|
string samName = (string)entry.Properties["sAMAccountName"].Value;
|
||||||
|
// this should really NEVER happen - an AD group without sAMAccountName?!
|
||||||
|
if (string.IsNullOrEmpty(samName))
|
||||||
|
throw new Exception("SAMAccountName is not specified");
|
||||||
|
// add Netbios-Domainname before samAccountName - format in the database
|
||||||
|
samName = Global.NetBiosDomain + "\\" + samName;
|
||||||
|
|
||||||
|
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName, displayName, email, false, 0, samName, null);
|
||||||
AddAccountEmailAddress(accountId, email);
|
AddAccountEmailAddress(accountId, email);
|
||||||
|
|
||||||
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
||||||
|
@ -938,10 +949,10 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword),0, string.Empty);
|
mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword),0, string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string accountPassword)
|
private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string samAccountName, string accountPassword)
|
||||||
{
|
{
|
||||||
return DataProvider.AddExchangeAccount(itemId, (int)ExchangeAccountType.User, accountName, displayName, email, false, string.Empty,
|
return DataProvider.AddExchangeAccount(itemId, (int)ExchangeAccountType.User, accountName, displayName, email, false, string.Empty,
|
||||||
string.Empty, CryptoUtils.Encrypt(accountPassword),0 , string.Empty);
|
samAccountName, CryptoUtils.Encrypt(accountPassword), 0 , string.Empty);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.269
|
// Runtime Version:4.0.30319.17929
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
|
|
@ -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.269
|
' Runtime Version:4.0.30319.17929
|
||||||
'
|
'
|
||||||
' 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.
|
||||||
|
|
|
@ -114,6 +114,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public const int ERROR_WEB_SITE_IP_ADDRESS_NOT_SPECIFIED = -607;
|
public const int ERROR_WEB_SITE_IP_ADDRESS_NOT_SPECIFIED = -607;
|
||||||
public const int ERROR_WEB_SITE_SHARED_IP_ADDRESS_NOT_SPECIFIED = -608;
|
public const int ERROR_WEB_SITE_SHARED_IP_ADDRESS_NOT_SPECIFIED = -608;
|
||||||
public const int ERROR_WEB_SHARED_SSL_QUOTA_LIMIT = -609;
|
public const int ERROR_WEB_SHARED_SSL_QUOTA_LIMIT = -609;
|
||||||
|
public const int ERROR_GLOBALDNS_FOR_DEDICATEDIP = -610;
|
||||||
|
public const int ERROR_PUBLICSHAREDIP_FOR_SHAREDIP = -611;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Mail
|
#region Mail
|
||||||
|
@ -322,6 +324,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public const int ERROR_USERS_RESOURCE_QUOTA_LIMIT = -2707;
|
public const int ERROR_USERS_RESOURCE_QUOTA_LIMIT = -2707;
|
||||||
public const int CURRENT_USER_IS_CRM_USER = -2708;
|
public const int CURRENT_USER_IS_CRM_USER = -2708;
|
||||||
public const int CURRENT_USER_IS_OCS_USER = -2709;
|
public const int CURRENT_USER_IS_OCS_USER = -2709;
|
||||||
|
public const int CURRENT_USER_IS_LYNC_USER = -2710;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
string emailAddress;
|
string emailAddress;
|
||||||
bool isPrimary;
|
bool isPrimary;
|
||||||
|
bool iSuserPrincipalName;
|
||||||
|
|
||||||
public string EmailAddress
|
public string EmailAddress
|
||||||
{
|
{
|
||||||
|
@ -48,5 +49,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
get { return this.isPrimary; }
|
get { return this.isPrimary; }
|
||||||
set { this.isPrimary = value; }
|
set { this.isPrimary = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsUserPrincipalName
|
||||||
|
{
|
||||||
|
get { return iSuserPrincipalName; }
|
||||||
|
set { iSuserPrincipalName = value; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ order by rg.groupOrder
|
||||||
public const string OS_MINIMUMTASKINTERVAL = "OS.MinimumTaskInterval"; // Minimum Tasks Interval, minutes
|
public const string OS_MINIMUMTASKINTERVAL = "OS.MinimumTaskInterval"; // Minimum Tasks Interval, minutes
|
||||||
public const string OS_APPINSTALLER = "OS.AppInstaller"; // Applications Installer
|
public const string OS_APPINSTALLER = "OS.AppInstaller"; // Applications Installer
|
||||||
public const string OS_EXTRAAPPLICATIONS = "OS.ExtraApplications"; // Extra Application Packs
|
public const string OS_EXTRAAPPLICATIONS = "OS.ExtraApplications"; // Extra Application Packs
|
||||||
public const string OS_ALLOWTENANTCREATEDOMAINS = "OS.AllowTenantCreateDomains"; // Allow tenant to create top level domains
|
public const string OS_NOTALLOWTENANTCREATEDOMAINS = "OS.AllowTenantCreateDomains"; // Do not Allow tenant to create top level domains
|
||||||
public const string WEB_SITES = "Web.Sites"; // Web Sites
|
public const string WEB_SITES = "Web.Sites"; // Web Sites
|
||||||
public const string WEB_ASPNET11 = "Web.AspNet11"; // ASP.NET 1.1
|
public const string WEB_ASPNET11 = "Web.AspNet11"; // ASP.NET 1.1
|
||||||
public const string WEB_ASPNET20 = "Web.AspNet20"; // ASP.NET 2.0
|
public const string WEB_ASPNET20 = "Web.AspNet20"; // ASP.NET 2.0
|
||||||
|
@ -79,6 +79,8 @@ order by rg.groupOrder
|
||||||
public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories
|
public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories
|
||||||
public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management
|
public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management
|
||||||
public const string WEB_SSL = "Web.SSL"; //SSL
|
public const string WEB_SSL = "Web.SSL"; //SSL
|
||||||
|
public const string WEB_ALLOWIPADDRESSMODESWITCH = "Web.AllowIPAddressModeSwitch"; //Allow to switch IP Address Mode
|
||||||
|
public const string WEB_ENABLEHOSTNAMESUPPORT = "Web.EnableHostNameSupport"; //Enable to specify hostnames upon site creation
|
||||||
public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts
|
public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts
|
||||||
public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts
|
public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts
|
||||||
public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings
|
public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings
|
||||||
|
@ -148,6 +150,7 @@ order by rg.groupOrder
|
||||||
public const string ORGANIZATIONS = "HostedSolution.Organizations";
|
public const string ORGANIZATIONS = "HostedSolution.Organizations";
|
||||||
public const string ORGANIZATION_USERS = "HostedSolution.Users";
|
public const string ORGANIZATION_USERS = "HostedSolution.Users";
|
||||||
public const string ORGANIZATION_DOMAINS = "HostedSolution.Domains";
|
public const string ORGANIZATION_DOMAINS = "HostedSolution.Domains";
|
||||||
|
public const string ORGANIZATION_ALLOWCHANGEUPN = "HostedSolution.AllowChangeUPN";
|
||||||
public const string CRM_USERS = "HostedCRM.Users";
|
public const string CRM_USERS = "HostedCRM.Users";
|
||||||
public const string CRM_ORGANIZATION = "HostedCRM.Organization";
|
public const string CRM_ORGANIZATION = "HostedCRM.Organization";
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
private int domainId;
|
private int domainId;
|
||||||
private int packageId;
|
private int packageId;
|
||||||
private int zoneItemId;
|
private int zoneItemId;
|
||||||
|
private int domainItemId;
|
||||||
private string domainName;
|
private string domainName;
|
||||||
private bool hostingAllowed;
|
private bool hostingAllowed;
|
||||||
private int webSiteId;
|
private int webSiteId;
|
||||||
|
@ -68,6 +69,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
set { zoneItemId = value; }
|
set { zoneItemId = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int DomainItemId
|
||||||
|
{
|
||||||
|
get { return domainItemId; }
|
||||||
|
set { domainItemId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public string DomainName
|
public string DomainName
|
||||||
{
|
{
|
||||||
get { return domainName; }
|
get { return domainName; }
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.6387
|
// Runtime Version:2.0.50727.6400
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
@ -53,7 +53,6 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <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()]
|
||||||
|
@ -85,6 +84,8 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetLyncUserGeneralSettingsOperationCompleted;
|
private System.Threading.SendOrPostCallback GetLyncUserGeneralSettingsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetLyncUserGeneralSettingsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SetUserLyncPlanOperationCompleted;
|
private System.Threading.SendOrPostCallback SetUserLyncPlanOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted;
|
private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted;
|
||||||
|
@ -134,6 +135,9 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetLyncUserGeneralSettingsCompletedEventHandler GetLyncUserGeneralSettingsCompleted;
|
public event GetLyncUserGeneralSettingsCompletedEventHandler GetLyncUserGeneralSettingsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetLyncUserGeneralSettingsCompletedEventHandler SetLyncUserGeneralSettingsCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SetUserLyncPlanCompletedEventHandler SetUserLyncPlanCompleted;
|
public event SetUserLyncPlanCompletedEventHandler SetUserLyncPlanCompleted;
|
||||||
|
|
||||||
|
@ -680,6 +684,56 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetLyncUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri) {
|
||||||
|
object[] results = this.Invoke("SetLyncUserGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
sipAddress,
|
||||||
|
lineUri});
|
||||||
|
return ((LyncUserResult)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetLyncUserGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
sipAddress,
|
||||||
|
lineUri}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public LyncUserResult EndSetLyncUserGeneralSettings(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((LyncUserResult)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetLyncUserGeneralSettingsAsync(int itemId, int accountId, string sipAddress, string lineUri) {
|
||||||
|
this.SetLyncUserGeneralSettingsAsync(itemId, accountId, sipAddress, lineUri, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetLyncUserGeneralSettingsAsync(int itemId, int accountId, string sipAddress, string lineUri, object userState) {
|
||||||
|
if ((this.SetLyncUserGeneralSettingsOperationCompleted == null)) {
|
||||||
|
this.SetLyncUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetLyncUserGeneralSettingsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetLyncUserGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
sipAddress,
|
||||||
|
lineUri}, this.SetLyncUserGeneralSettingsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetLyncUserGeneralSettingsOperationCompleted(object arg) {
|
||||||
|
if ((this.SetLyncUserGeneralSettingsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetLyncUserGeneralSettingsCompleted(this, new SetLyncUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserLyncPlan", 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/SetUserLyncPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) {
|
public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) {
|
||||||
|
@ -1177,6 +1231,32 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetLyncUserGeneralSettingsCompletedEventHandler(object sender, SetLyncUserGeneralSettingsCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class SetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal SetLyncUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public LyncUserResult Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((LyncUserResult)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void SetUserLyncPlanCompletedEventHandler(object sender, SetUserLyncPlanCompletedEventArgs e);
|
public delegate void SetUserLyncPlanCompletedEventHandler(object sender, SetUserLyncPlanCompletedEventArgs e);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.6387
|
// Runtime Version:2.0.50727.6400
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
@ -85,6 +85,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
|
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetOrganizationDomainsOperationCompleted;
|
private System.Threading.SendOrPostCallback GetOrganizationDomainsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted;
|
private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted;
|
||||||
|
@ -101,6 +103,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
|
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetUserPrincipalNameOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted;
|
private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback DeleteUserOperationCompleted;
|
private System.Threading.SendOrPostCallback DeleteUserOperationCompleted;
|
||||||
|
@ -145,6 +151,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
|
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event ChangeOrganizationDomainTypeCompletedEventHandler ChangeOrganizationDomainTypeCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetOrganizationDomainsCompletedEventHandler GetOrganizationDomainsCompleted;
|
public event GetOrganizationDomainsCompletedEventHandler GetOrganizationDomainsCompleted;
|
||||||
|
|
||||||
|
@ -169,6 +178,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
|
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetUserPrincipalNameCompletedEventHandler SetUserPrincipalNameCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetUserPasswordCompletedEventHandler SetUserPasswordCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SearchAccountsCompletedEventHandler SearchAccountsCompleted;
|
public event SearchAccountsCompletedEventHandler SearchAccountsCompleted;
|
||||||
|
|
||||||
|
@ -180,20 +195,22 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", 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/CreateOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public int CreateOrganization(int packageId, string organizationID, string organizationName) {
|
public int CreateOrganization(int packageId, string organizationID, string organizationName, string domainName) {
|
||||||
object[] results = this.Invoke("CreateOrganization", new object[] {
|
object[] results = this.Invoke("CreateOrganization", new object[] {
|
||||||
packageId,
|
packageId,
|
||||||
organizationID,
|
organizationID,
|
||||||
organizationName});
|
organizationName,
|
||||||
|
domainName});
|
||||||
return ((int)(results[0]));
|
return ((int)(results[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, string domainName, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("CreateOrganization", new object[] {
|
return this.BeginInvoke("CreateOrganization", new object[] {
|
||||||
packageId,
|
packageId,
|
||||||
organizationID,
|
organizationID,
|
||||||
organizationName}, callback, asyncState);
|
organizationName,
|
||||||
|
domainName}, callback, asyncState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -203,19 +220,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName) {
|
public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName) {
|
||||||
this.CreateOrganizationAsync(packageId, organizationID, organizationName, null);
|
this.CreateOrganizationAsync(packageId, organizationID, organizationName, domainName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, object userState) {
|
public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, string domainName, object userState) {
|
||||||
if ((this.CreateOrganizationOperationCompleted == null)) {
|
if ((this.CreateOrganizationOperationCompleted == null)) {
|
||||||
this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted);
|
this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted);
|
||||||
}
|
}
|
||||||
this.InvokeAsync("CreateOrganization", new object[] {
|
this.InvokeAsync("CreateOrganization", new object[] {
|
||||||
packageId,
|
packageId,
|
||||||
organizationID,
|
organizationID,
|
||||||
organizationName}, this.CreateOrganizationOperationCompleted, userState);
|
organizationName,
|
||||||
|
domainName}, this.CreateOrganizationOperationCompleted, userState);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCreateOrganizationOperationCompleted(object arg) {
|
private void OnCreateOrganizationOperationCompleted(object arg) {
|
||||||
|
@ -686,6 +704,53 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ChangeOrganizationDomainType", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public int ChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) {
|
||||||
|
object[] results = this.Invoke("ChangeOrganizationDomainType", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId,
|
||||||
|
newDomainType});
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("ChangeOrganizationDomainType", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId,
|
||||||
|
newDomainType}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int EndChangeOrganizationDomainType(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType) {
|
||||||
|
this.ChangeOrganizationDomainTypeAsync(itemId, domainId, newDomainType, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void ChangeOrganizationDomainTypeAsync(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType, object userState) {
|
||||||
|
if ((this.ChangeOrganizationDomainTypeOperationCompleted == null)) {
|
||||||
|
this.ChangeOrganizationDomainTypeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeOrganizationDomainTypeOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("ChangeOrganizationDomainType", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId,
|
||||||
|
newDomainType}, this.ChangeOrganizationDomainTypeOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnChangeOrganizationDomainTypeOperationCompleted(object arg) {
|
||||||
|
if ((this.ChangeOrganizationDomainTypeCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.ChangeOrganizationDomainTypeCompleted(this, new ChangeOrganizationDomainTypeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDomains", 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/GetOrganizationDomains", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public OrganizationDomainName[] GetOrganizationDomains(int itemId) {
|
public OrganizationDomainName[] GetOrganizationDomains(int itemId) {
|
||||||
|
@ -1280,6 +1345,103 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) {
|
||||||
|
object[] results = this.Invoke("SetUserPrincipalName", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
userPrincipalName,
|
||||||
|
inherit});
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetUserPrincipalName", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
userPrincipalName,
|
||||||
|
inherit}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int EndSetUserPrincipalName(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit) {
|
||||||
|
this.SetUserPrincipalNameAsync(itemId, accountId, userPrincipalName, inherit, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit, object userState) {
|
||||||
|
if ((this.SetUserPrincipalNameOperationCompleted == null)) {
|
||||||
|
this.SetUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrincipalNameOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetUserPrincipalName", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
userPrincipalName,
|
||||||
|
inherit}, this.SetUserPrincipalNameOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetUserPrincipalNameOperationCompleted(object arg) {
|
||||||
|
if ((this.SetUserPrincipalNameCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetUserPrincipalNameCompleted(this, new SetUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public int SetUserPassword(int itemId, int accountId, string password) {
|
||||||
|
object[] results = this.Invoke("SetUserPassword", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
password});
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetUserPassword(int itemId, int accountId, string password, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetUserPassword", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
password}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int EndSetUserPassword(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((int)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetUserPasswordAsync(int itemId, int accountId, string password) {
|
||||||
|
this.SetUserPasswordAsync(itemId, accountId, password, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetUserPasswordAsync(int itemId, int accountId, string password, object userState) {
|
||||||
|
if ((this.SetUserPasswordOperationCompleted == null)) {
|
||||||
|
this.SetUserPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPasswordOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetUserPassword", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
password}, this.SetUserPasswordOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetUserPasswordOperationCompleted(object arg) {
|
||||||
|
if ((this.SetUserPasswordCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetUserPasswordCompleted(this, new SetUserPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", 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/SearchAccounts", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) {
|
public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) {
|
||||||
|
@ -1710,6 +1872,32 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void ChangeOrganizationDomainTypeCompletedEventHandler(object sender, ChangeOrganizationDomainTypeCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class ChangeOrganizationDomainTypeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal ChangeOrganizationDomainTypeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((int)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e);
|
public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e);
|
||||||
|
@ -1918,6 +2106,58 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetUserPrincipalNameCompletedEventHandler(object sender, SetUserPrincipalNameCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class SetUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal SetUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((int)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetUserPasswordCompletedEventHandler(object sender, SetUserPasswordCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class SetUserPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal SetUserPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public int Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((int)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e);
|
public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C57D3F9F-7BA0-4D38-A159-B6EDA5C19B13}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C57D3F9F-7BA0-4D38-A159-B6EDA5C19B13}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\Database\install_db.sql = ..\Database\install_db.sql
|
|
||||||
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
||||||
..\..\Readme.htm = ..\..\Readme.htm
|
..\..\Readme.htm = ..\..\Readme.htm
|
||||||
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Web;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer {
|
namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
public struct IPAddress {
|
public struct IPAddress : IComparable {
|
||||||
public Int128 Address;
|
public Int128 Address;
|
||||||
public bool V6 { get; private set; }
|
public bool V6 { get; private set; }
|
||||||
public bool V4 { get { return !V6 || Null; } }
|
public bool V4 { get { return !V6 || Null; } }
|
||||||
|
@ -68,10 +68,19 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
if (Null)
|
if (Null)
|
||||||
return "";
|
return "";
|
||||||
var s = new System.Text.StringBuilder();
|
var s = new System.Text.StringBuilder();
|
||||||
if (!V6) {
|
if (!V6)
|
||||||
var ipl = (long)Address;
|
{
|
||||||
s.Append(String.Format("{0}.{1}.{2}.{3}", (ipl >> 24) & 0xFFL, (ipl >> 16) & 0xFFL, (ipl >> 8) & 0xFFL, (ipl & 0xFFL)));
|
var ipl = Address;
|
||||||
} else if (!IsMask) {
|
if (IsMask)
|
||||||
|
{
|
||||||
|
int digits = 32 - Cidr;
|
||||||
|
ipl = (Int128.MaxValue << 1) | 0x1; // remove left sign bit
|
||||||
|
ipl = ipl << digits;
|
||||||
|
}
|
||||||
|
s.Append(String.Format("{0}.{1}.{2}.{3}", (ipl >> 24) & 0xFFL, (ipl >> 16) & 0xFFL, (ipl >> 8) & 0xFFL, (ipl & 0xFFL)));
|
||||||
|
}
|
||||||
|
else if (!IsMask)
|
||||||
|
{
|
||||||
|
|
||||||
var vals = new List<int>();
|
var vals = new List<int>();
|
||||||
int i;
|
int i;
|
||||||
|
@ -127,6 +136,30 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
public static bool operator >(IPAddress a, IPAddress b) { return a.Address > b.Address; }
|
public static bool operator >(IPAddress a, IPAddress b) { return a.Address > b.Address; }
|
||||||
public static bool operator <=(IPAddress a, IPAddress b) { return a.Address <= b.Address; }
|
public static bool operator <=(IPAddress a, IPAddress b) { return a.Address <= b.Address; }
|
||||||
public static bool operator >=(IPAddress a, IPAddress b) { return a.Address >= b.Address; }
|
public static bool operator >=(IPAddress a, IPAddress b) { return a.Address >= b.Address; }
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
if (obj is IPAddress)
|
||||||
|
{
|
||||||
|
var b = (IPAddress)obj;
|
||||||
|
return this.Address == b.Address && this.Null == b.Null && (this.Null || !(this.IsSubnet && b.IsSubnet || this.IsMask && b.IsMask) || this.Cidr == b.Cidr);
|
||||||
|
}
|
||||||
|
else if (obj is long)
|
||||||
|
{
|
||||||
|
var b = (long)obj;
|
||||||
|
return this.Address == b;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return this.Address.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public static IPAddress operator +(IPAddress a, IPAddress b) {
|
public static IPAddress operator +(IPAddress a, IPAddress b) {
|
||||||
if (a.IsSubnet || b.IsSubnet || a.V6 != b.V6) throw new ArgumentException("Arithmetic with subnets or mixed v4 & v6 addresses not supported.");
|
if (a.IsSubnet || b.IsSubnet || a.V6 != b.V6) throw new ArgumentException("Arithmetic with subnets or mixed v4 & v6 addresses not supported.");
|
||||||
|
@ -149,7 +182,7 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
public static IPAddress operator &(IPAddress a, IPAddress b) {
|
public static IPAddress operator &(IPAddress a, IPAddress b) {
|
||||||
if (a.V6 != b.V6) throw new ArgumentException("Arithmetic with mixed v4 & v6 addresses not supported.");
|
if (a.V6 != b.V6) throw new ArgumentException("Arithmetic with mixed v4 & v6 addresses not supported.");
|
||||||
return new IPAddress { Address = a.Address | b.Address, Cidr = a.V4 ? 32 : 128, Null = false, V6 = a.V6, IsSubnet = false };
|
return new IPAddress { Address = a.Address & b.Address, Cidr = a.V4 ? 32 : 128, Null = false, V6 = a.V6, IsSubnet = false };
|
||||||
}
|
}
|
||||||
public static IPAddress operator ~(IPAddress a) {
|
public static IPAddress operator ~(IPAddress a) {
|
||||||
if (a.Null) return new IPAddress { Address = 0, Null = true, Cidr = a.V4 ? 32 : 128, V6 = true, IsSubnet = false };
|
if (a.Null) return new IPAddress { Address = 0, Null = true, Cidr = a.V4 ? 32 : 128, V6 = true, IsSubnet = false };
|
||||||
|
@ -157,7 +190,20 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static implicit operator IPAddress(NullIPAddress a) { return new IPAddress { Null = true, Address = 0, Cidr = -1 }; }
|
public static implicit operator IPAddress(NullIPAddress a) { return new IPAddress { Null = true, Address = 0, Cidr = -1 }; }
|
||||||
}
|
|
||||||
|
public int CompareTo(object obj)
|
||||||
|
{
|
||||||
|
var a = this.Address;
|
||||||
|
var b = ((IPAddress)obj).Address;
|
||||||
|
|
||||||
|
if (a < b)
|
||||||
|
return 1;
|
||||||
|
else if (a > b)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class NullIPAddress { }
|
public class NullIPAddress { }
|
||||||
|
|
||||||
|
|
|
@ -785,14 +785,35 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
new SqlParameter("@domainId", domainId));
|
new SqlParameter("@domainId", domainId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IDataReader GetDomainByName(int actorId, string domainName)
|
public static IDataReader GetDomainByName(int actorId, string domainName, bool searchOnDomainPointer, bool isDomainPointer)
|
||||||
{
|
{
|
||||||
return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure,
|
return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure,
|
||||||
ObjectQualifier + "GetDomainByName",
|
ObjectQualifier + "GetDomainByName",
|
||||||
new SqlParameter("@ActorId", actorId),
|
new SqlParameter("@ActorId", actorId),
|
||||||
new SqlParameter("@domainName", domainName));
|
new SqlParameter("@domainName", domainName),
|
||||||
|
new SqlParameter("@SearchOnDomainPointer", searchOnDomainPointer),
|
||||||
|
new SqlParameter("@IsDomainPointer", isDomainPointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static DataSet GetDomainsByZoneId(int actorId, int zoneId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||||
|
ObjectQualifier + "GetDomainsByZoneID",
|
||||||
|
new SqlParameter("@ActorId", actorId),
|
||||||
|
new SqlParameter("@ZoneID", zoneId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DataSet GetDomainsByDomainItemId(int actorId, int domainId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
|
||||||
|
ObjectQualifier + "GetDomainsByDomainItemId",
|
||||||
|
new SqlParameter("@ActorId", actorId),
|
||||||
|
new SqlParameter("@DomainID", domainId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static int CheckDomain(int packageId, string domainName, bool isDomainPointer)
|
public static int CheckDomain(int packageId, string domainName, bool isDomainPointer)
|
||||||
{
|
{
|
||||||
SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int);
|
SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int);
|
||||||
|
@ -808,6 +829,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return Convert.ToInt32(prmId.Value);
|
return Convert.ToInt32(prmId.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static int CheckDomainUsedByHostedOrganization(string domainName)
|
||||||
|
{
|
||||||
|
SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int);
|
||||||
|
prmId.Direction = ParameterDirection.Output;
|
||||||
|
|
||||||
|
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
|
||||||
|
ObjectQualifier + "CheckDomainUsedByHostedOrganization",
|
||||||
|
prmId,
|
||||||
|
new SqlParameter("@domainName", domainName));
|
||||||
|
|
||||||
|
return Convert.ToInt32(prmId.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int AddDomain(int actorId, int packageId, int zoneItemId, string domainName,
|
public static int AddDomain(int actorId, int packageId, int zoneItemId, string domainName,
|
||||||
bool hostingAllowed, int webSiteId, int mailDomainId, bool isSubDomain, bool isInstantAlias, bool isDomainPointer)
|
bool hostingAllowed, int webSiteId, int mailDomainId, bool isSubDomain, bool isInstantAlias, bool isDomainPointer)
|
||||||
{
|
{
|
||||||
|
@ -832,7 +869,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateDomain(int actorId, int domainId, int zoneItemId,
|
public static void UpdateDomain(int actorId, int domainId, int zoneItemId,
|
||||||
bool hostingAllowed, int webSiteId, int mailDomainId)
|
bool hostingAllowed, int webSiteId, int mailDomainId, int domainItemId)
|
||||||
{
|
{
|
||||||
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
|
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
|
||||||
ObjectQualifier + "UpdateDomain",
|
ObjectQualifier + "UpdateDomain",
|
||||||
|
@ -841,7 +878,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
new SqlParameter("@ZoneItemId", zoneItemId),
|
new SqlParameter("@ZoneItemId", zoneItemId),
|
||||||
new SqlParameter("@HostingAllowed", hostingAllowed),
|
new SqlParameter("@HostingAllowed", hostingAllowed),
|
||||||
new SqlParameter("@WebSiteId", webSiteId),
|
new SqlParameter("@WebSiteId", webSiteId),
|
||||||
new SqlParameter("@MailDomainId", mailDomainId));
|
new SqlParameter("@MailDomainId", mailDomainId),
|
||||||
|
new SqlParameter("@DomainItemId", domainItemId));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DeleteDomain(int actorId, int domainId)
|
public static void DeleteDomain(int actorId, int domainId)
|
||||||
|
@ -2153,6 +2191,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ChangeExchangeAcceptedDomainType(int itemId, int domainId, int domainTypeId)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"ChangeExchangeAcceptedDomainType",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@DomainID", domainId),
|
||||||
|
new SqlParameter("@DomainTypeID", domainTypeId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static IDataReader GetExchangeOrganizationStatistics(int itemId)
|
public static IDataReader GetExchangeOrganizationStatistics(int itemId)
|
||||||
{
|
{
|
||||||
return SqlHelper.ExecuteReader(
|
return SqlHelper.ExecuteReader(
|
||||||
|
@ -2304,6 +2354,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void UpdateExchangeAccountUserPrincipalName(int accountId, string userPrincipalName)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"UpdateExchangeAccountUserPrincipalName",
|
||||||
|
new SqlParameter("@AccountID", accountId),
|
||||||
|
new SqlParameter("@UserPrincipalName", userPrincipalName));
|
||||||
|
}
|
||||||
|
|
||||||
public static IDataReader GetExchangeAccount(int itemId, int accountId)
|
public static IDataReader GetExchangeAccount(int itemId, int accountId)
|
||||||
{
|
{
|
||||||
return SqlHelper.ExecuteReader(
|
return SqlHelper.ExecuteReader(
|
||||||
|
@ -2549,6 +2609,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static IDataReader GetExchangeOrganization(int itemId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetExchangeOrganization",
|
||||||
|
new SqlParameter("@ItemID", itemId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId)
|
||||||
{
|
{
|
||||||
SqlHelper.ExecuteNonQuery(
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
@ -3211,7 +3283,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
#region Lync
|
#region Lync
|
||||||
|
|
||||||
public static void AddLyncUser(int accountId, int lyncUserPlanId)
|
public static void AddLyncUser(int accountId, int lyncUserPlanId, string sipAddress)
|
||||||
{
|
{
|
||||||
SqlHelper.ExecuteNonQuery(ConnectionString,
|
SqlHelper.ExecuteNonQuery(ConnectionString,
|
||||||
CommandType.StoredProcedure,
|
CommandType.StoredProcedure,
|
||||||
|
@ -3219,10 +3291,24 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
new[]
|
new[]
|
||||||
{
|
{
|
||||||
new SqlParameter("@AccountID", accountId),
|
new SqlParameter("@AccountID", accountId),
|
||||||
new SqlParameter("@LyncUserPlanID", lyncUserPlanId)
|
new SqlParameter("@LyncUserPlanID", lyncUserPlanId),
|
||||||
|
new SqlParameter("@SipAddress", sipAddress)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void UpdateLyncUser(int accountId, string sipAddress)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"UpdateLyncUser",
|
||||||
|
new[]
|
||||||
|
{
|
||||||
|
new SqlParameter("@AccountID", accountId),
|
||||||
|
new SqlParameter("@SipAddress", sipAddress)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static bool CheckLyncUserExists(int accountId)
|
public static bool CheckLyncUserExists(int accountId)
|
||||||
{
|
{
|
||||||
int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists",
|
int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists",
|
||||||
|
@ -3230,6 +3316,25 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return res > 0;
|
return res > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool LyncUserExists(int accountId, string sipAddress)
|
||||||
|
{
|
||||||
|
SqlParameter outParam = new SqlParameter("@Exists", SqlDbType.Bit);
|
||||||
|
outParam.Direction = ParameterDirection.Output;
|
||||||
|
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"LyncUserExists",
|
||||||
|
new SqlParameter("@AccountID", accountId),
|
||||||
|
new SqlParameter("@SipAddress", sipAddress),
|
||||||
|
outParam
|
||||||
|
);
|
||||||
|
|
||||||
|
return Convert.ToBoolean(outParam.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
|
public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
|
||||||
{
|
{
|
||||||
SqlParameter[] sqlParams = new SqlParameter[]
|
SqlParameter[] sqlParams = new SqlParameter[]
|
||||||
|
@ -3402,7 +3507,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
public static int GetPackageIdByName(string Name)
|
public static int GetPackageIdByName(string Name)
|
||||||
{
|
{
|
||||||
// get Helicon Zoo provider
|
|
||||||
int packageId = -1;
|
int packageId = -1;
|
||||||
List<ProviderInfo> providers = ServerController.GetProviders();
|
List<ProviderInfo> providers = ServerController.GetProviders();
|
||||||
foreach (ProviderInfo providerInfo in providers)
|
foreach (ProviderInfo providerInfo in providers)
|
||||||
|
@ -3414,10 +3518,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-1 == packageId)
|
//if (-1 == packageId)
|
||||||
{
|
//{
|
||||||
throw new Exception("Provider not found");
|
// throw new Exception("Provider not found");
|
||||||
}
|
//}
|
||||||
|
|
||||||
return packageId;
|
return packageId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
public static int AddZone(int packageId, int serviceId, string zoneName)
|
public static int AddZone(int packageId, int serviceId, string zoneName)
|
||||||
{
|
{
|
||||||
return AddZone(packageId, serviceId, zoneName, true);
|
return AddZone(packageId, serviceId, zoneName, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem)
|
public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem, bool ignoreGlobalDNSRecords)
|
||||||
{
|
{
|
||||||
// get DNS provider
|
// get DNS provider
|
||||||
DNSServer dns = GetDNSServer(serviceId);
|
DNSServer dns = GetDNSServer(serviceId);
|
||||||
|
@ -148,13 +148,17 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
zoneRecords.Add(ns);
|
zoneRecords.Add(ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all other records
|
if (!ignoreGlobalDNSRecords)
|
||||||
zoneRecords.AddRange(BuildDnsResourceRecords(records, "", zoneName, ""));
|
{
|
||||||
|
// add all other records
|
||||||
|
zoneRecords.AddRange(BuildDnsResourceRecords(records, "", zoneName, ""));
|
||||||
|
}
|
||||||
|
|
||||||
// add zone records
|
// add zone records
|
||||||
dns.AddZoneRecords(zoneName, zoneRecords.ToArray());
|
dns.AddZoneRecords(zoneName, zoneRecords.ToArray());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// add secondary zones
|
// add secondary zones
|
||||||
foreach (int secondaryId in secondaryServiceIds)
|
foreach (int secondaryId in secondaryServiceIds)
|
||||||
{
|
{
|
||||||
|
@ -202,6 +206,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return zoneItemId;
|
return zoneItemId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int DeleteZone(int zoneItemId)
|
public static int DeleteZone(int zoneItemId)
|
||||||
{
|
{
|
||||||
// delete DNS zone if applicable
|
// delete DNS zone if applicable
|
||||||
|
@ -283,8 +288,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (record.RecordType == "A" || record.RecordType == "AAAA")
|
if (record.RecordType == "A" || record.RecordType == "AAAA")
|
||||||
{
|
{
|
||||||
|
// If the service IP address and the DNS records external address are empty / null SimpleDNS will fail to properly create the zone record
|
||||||
|
if (String.IsNullOrEmpty(serviceIP) && String.IsNullOrEmpty(record.ExternalIP) && String.IsNullOrEmpty(record.RecordData))
|
||||||
|
continue;
|
||||||
|
|
||||||
rr.RecordData = String.IsNullOrEmpty(record.RecordData) ? record.ExternalIP : record.RecordData;
|
rr.RecordData = String.IsNullOrEmpty(record.RecordData) ? record.ExternalIP : record.RecordData;
|
||||||
rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "ip", record.ExternalIP);
|
rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "ip", string.IsNullOrEmpty(serviceIP) ? record.ExternalIP : serviceIP);
|
||||||
|
rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "domain_name", string.IsNullOrEmpty(domainName) ? string.Empty : domainName);
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(rr.RecordData) && !String.IsNullOrEmpty(serviceIP))
|
if (String.IsNullOrEmpty(rr.RecordData) && !String.IsNullOrEmpty(serviceIP))
|
||||||
rr.RecordData = serviceIP;
|
rr.RecordData = serviceIP;
|
||||||
|
@ -315,7 +325,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
zoneRecords.Add(rr);
|
zoneRecords.Add(rr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return zoneRecords;
|
return zoneRecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +452,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (!dns.ZoneExists(itemName))
|
if (!dns.ZoneExists(itemName))
|
||||||
{
|
{
|
||||||
// create primary and secondary zones
|
// create primary and secondary zones
|
||||||
AddZone(packageId, serviceId, itemName, false);
|
AddZone(packageId, serviceId, itemName, false, false);
|
||||||
|
|
||||||
// restore records
|
// restore records
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord));
|
XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord));
|
||||||
|
|
|
@ -446,11 +446,31 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
hubTransportRole.AddAuthoritativeDomain(domain.DomainName);
|
hubTransportRole.AddAuthoritativeDomain(domain.DomainName);
|
||||||
}
|
}
|
||||||
|
if (domain.DomainType != ExchangeAcceptedDomainType.Authoritative)
|
||||||
|
{
|
||||||
|
hubTransportRole.ChangeAcceptedDomainType(domain.DomainName, domain.DomainType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
authDomainCreated = true;
|
authDomainCreated = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (OrganizationDomainName d in domains)
|
||||||
|
{
|
||||||
|
DomainInfo domain = ServerController.GetDomain(d.DomainId);
|
||||||
|
|
||||||
|
//Add the service records
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.BlackBerry, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.OCS, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 4) Add the address book policy (Exchange 2010 SP2
|
// 4) Add the address book policy (Exchange 2010 SP2
|
||||||
//
|
//
|
||||||
|
@ -747,7 +767,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// load account
|
// load account
|
||||||
ExchangeAccount account = GetAccount(itemId, accountId);
|
ExchangeAccount account = GetAccount(itemId, accountId);
|
||||||
|
|
||||||
return exchange.GetMailboxStatistics(account.AccountName);
|
return exchange.GetMailboxStatistics(account.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1221,6 +1241,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
string CounterStr = "00000";
|
string CounterStr = "00000";
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
|
|
||||||
|
if (!AccountExists(accountName)) return accountName;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
accountName = genSamLogin(name, CounterStr);
|
accountName = genSamLogin(name, CounterStr);
|
||||||
|
@ -1293,8 +1316,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0)
|
if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0)
|
||||||
{
|
{
|
||||||
email.IsPrimary = true;
|
email.IsPrimary = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0)
|
||||||
|
{
|
||||||
|
email.IsUserPrincipalName = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return emails.ToArray();
|
return emails.ToArray();
|
||||||
|
@ -1412,6 +1440,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Add the service records
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -1424,7 +1461,63 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int ChangeAcceptedDomainType(int itemId, int domainId, ExchangeAcceptedDomainType domainType)
|
||||||
|
{
|
||||||
|
// check account
|
||||||
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||||
|
if (accountCheck < 0) return accountCheck;
|
||||||
|
|
||||||
|
// place log record
|
||||||
|
TaskManager.StartTask("EXCHANGE", "CHANGE_DOMAIN_TYPE");
|
||||||
|
TaskManager.TaskParameters["Domain ID"] = domainId;
|
||||||
|
TaskManager.TaskParameters["Domain Type"] = domainType.ToString();
|
||||||
|
TaskManager.ItemId = itemId;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
Organization org = (Organization)PackageController.GetPackageItem(itemId);
|
||||||
|
if (org == null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// load domain
|
||||||
|
DomainInfo domain = ServerController.GetDomain(domainId);
|
||||||
|
if (domain == null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
int[] hubTransportServiceIds;
|
||||||
|
int[] clientAccessServiceIds;
|
||||||
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
|
GetExchangeServices(exchangeServiceId, out hubTransportServiceIds, out clientAccessServiceIds);
|
||||||
|
|
||||||
|
foreach (int id in hubTransportServiceIds)
|
||||||
|
{
|
||||||
|
ExchangeServer hubTransportRole = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
hubTransportRole = GetExchangeServer(id, org.ServiceId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
hubTransportRole.ChangeAcceptedDomainType(domain.DomainName, domainType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static int DeleteAuthoritativeDomain(int itemId, int domainId)
|
public static int DeleteAuthoritativeDomain(int itemId, int domainId)
|
||||||
{
|
{
|
||||||
|
@ -1449,6 +1542,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if(domain == null)
|
if(domain == null)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (DataProvider.CheckDomainUsedByHostedOrganization(domain.DomainName) == 1)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
// delete domain on Exchange
|
// delete domain on Exchange
|
||||||
int[] hubTransportServiceIds;
|
int[] hubTransportServiceIds;
|
||||||
|
@ -1474,6 +1571,17 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Add the service records
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.RemoveServiceDNSRecords(org.PackageId, ResourceGroups.Exchange, domain, "", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -1594,6 +1702,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId);
|
ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId);
|
||||||
if (maxDiskSpace != -1)
|
if (maxDiskSpace != -1)
|
||||||
{
|
{
|
||||||
|
if (plan.MailboxSizeMB == -1)
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
||||||
|
|
||||||
if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace))
|
if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
||||||
}
|
}
|
||||||
|
@ -1711,10 +1822,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// delete mailbox
|
// delete mailbox
|
||||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||||
exchange.DisableMailbox(account.AccountName);
|
exchange.DisableMailbox(account.UserPrincipalName);
|
||||||
|
|
||||||
account.AccountType = ExchangeAccountType.User;
|
account.AccountType = ExchangeAccountType.User;
|
||||||
account.MailEnabledPublicFolder = false;
|
account.MailEnabledPublicFolder = false;
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
DataProvider.DeleteUserEmailAddresses(account.AccountId, account.PrimaryEmailAddress);
|
DataProvider.DeleteUserEmailAddresses(account.AccountId, account.PrimaryEmailAddress);
|
||||||
|
|
||||||
|
@ -1760,7 +1872,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// delete mailbox
|
// delete mailbox
|
||||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||||
exchange.DeleteMailbox(account.AccountName);
|
exchange.DeleteMailbox(account.UserPrincipalName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1835,7 +1947,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
return exchange.GetMailboxGeneralSettings(account.AccountName);
|
return exchange.GetMailboxGeneralSettings(account.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1882,7 +1994,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
hideAddressBook = true;
|
hideAddressBook = true;
|
||||||
|
|
||||||
exchange.SetMailboxGeneralSettings(
|
exchange.SetMailboxGeneralSettings(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
hideAddressBook,
|
hideAddressBook,
|
||||||
disabled);
|
disabled);
|
||||||
|
|
||||||
|
@ -1954,7 +2066,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxEmailAddresses(
|
exchange.SetMailboxEmailAddresses(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2010,7 +2122,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxPrimaryEmailAddress(
|
exchange.SetMailboxPrimaryEmailAddress(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
emailAddress);
|
emailAddress);
|
||||||
|
|
||||||
if (DataProvider.CheckOCSUserExists(account.AccountId))
|
if (DataProvider.CheckOCSUserExists(account.AccountId))
|
||||||
|
@ -2020,7 +2132,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ocs.SetUserPrimaryUri(instanceId, emailAddress);
|
ocs.SetUserPrimaryUri(instanceId, emailAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DataProvider.CheckLyncUserExists(account.AccountId))
|
||||||
|
{
|
||||||
|
LyncController.SetLyncUserGeneralSettings(itemId, accountId, emailAddress, null);
|
||||||
|
}
|
||||||
|
|
||||||
// save account
|
// save account
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2054,7 +2172,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
List<string> toDelete = new List<string>();
|
List<string> toDelete = new List<string>();
|
||||||
foreach (string emailAddress in emailAddresses)
|
foreach (string emailAddress in emailAddresses)
|
||||||
{
|
{
|
||||||
if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0)
|
if ((String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) &
|
||||||
|
(String.Compare(account.UserPrincipalName, emailAddress, true) != 0))
|
||||||
toDelete.Add(emailAddress);
|
toDelete.Add(emailAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2071,7 +2190,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxEmailAddresses(
|
exchange.SetMailboxEmailAddresses(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2112,7 +2231,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2157,7 +2276,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxMailFlowSettings(account.AccountName,
|
exchange.SetMailboxMailFlowSettings(account.UserPrincipalName,
|
||||||
enableForwarding,
|
enableForwarding,
|
||||||
forwardingAccountName,
|
forwardingAccountName,
|
||||||
forwardToBoth,
|
forwardToBoth,
|
||||||
|
@ -2205,7 +2324,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2248,6 +2367,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
else account.MailboxManagerActions &= ~action;
|
else account.MailboxManagerActions &= ~action;
|
||||||
|
|
||||||
// update account
|
// update account
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2412,7 +2532,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2454,7 +2574,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxPermissions(org.OrganizationId, account.AccountName, sendAsaccounts, fullAccessAcounts);
|
exchange.SetMailboxPermissions(org.OrganizationId, account.UserPrincipalName, sendAsaccounts, fullAccessAcounts);
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2512,10 +2632,25 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId);
|
ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId);
|
||||||
|
|
||||||
if (maxDiskSpace != -1)
|
if (maxDiskSpace != -1)
|
||||||
{
|
{
|
||||||
if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace))
|
if (plan.MailboxSizeMB == -1)
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
||||||
|
|
||||||
|
ExchangeAccount exchangeAccount = GetAccount(itemId, accountId);
|
||||||
|
if (exchangeAccount.MailboxPlanId > 0)
|
||||||
|
{
|
||||||
|
ExchangeMailboxPlan oldPlan = GetExchangeMailboxPlan(itemId, exchangeAccount.MailboxPlanId);
|
||||||
|
|
||||||
|
if (((quotaUsed - oldPlan.MailboxSizeMB) + plan.MailboxSizeMB) > (maxDiskSpace))
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace))
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
|
@ -2524,7 +2659,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
exchange.SetMailboxAdvancedSettings(
|
exchange.SetMailboxAdvancedSettings(
|
||||||
org.OrganizationId,
|
org.OrganizationId,
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
plan.EnablePOP,
|
plan.EnablePOP,
|
||||||
plan.EnableIMAP,
|
plan.EnableIMAP,
|
||||||
plan.EnableOWA,
|
plan.EnableOWA,
|
||||||
|
@ -2569,6 +2704,17 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
else
|
else
|
||||||
ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans);
|
ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans);
|
||||||
|
|
||||||
|
|
||||||
|
ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId));
|
||||||
|
|
||||||
|
if (ExchangeOrg != null)
|
||||||
|
{
|
||||||
|
foreach (ExchangeMailboxPlan p in mailboxPlans)
|
||||||
|
{
|
||||||
|
p.IsDefault = (p.MailboxPlanId == ExchangeOrg.ExchangeMailboxPlanID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return mailboxPlans;
|
return mailboxPlans;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -3058,6 +3204,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// update account
|
// update account
|
||||||
account.DisplayName = displayName;
|
account.DisplayName = displayName;
|
||||||
account.PrimaryEmailAddress = emailAddress;
|
account.PrimaryEmailAddress = emailAddress;
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3386,6 +3533,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// update account
|
// update account
|
||||||
account.DisplayName = displayName;
|
account.DisplayName = displayName;
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3606,6 +3754,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
addressLists.ToArray());
|
addressLists.ToArray());
|
||||||
|
|
||||||
// save account
|
// save account
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4008,6 +4157,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
account.AccountName = accountName;
|
account.AccountName = accountName;
|
||||||
account.MailEnabledPublicFolder = true;
|
account.MailEnabledPublicFolder = true;
|
||||||
account.PrimaryEmailAddress = email;
|
account.PrimaryEmailAddress = email;
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
// register e-mail
|
// register e-mail
|
||||||
|
@ -4060,6 +4210,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// update and save account
|
// update and save account
|
||||||
account.MailEnabledPublicFolder = false;
|
account.MailEnabledPublicFolder = false;
|
||||||
account.PrimaryEmailAddress = "";
|
account.PrimaryEmailAddress = "";
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
|
|
||||||
|
@ -4179,6 +4330,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
// rename original folder
|
// rename original folder
|
||||||
account.DisplayName = newFullName;
|
account.DisplayName = newFullName;
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
// rename nested folders
|
// rename nested folders
|
||||||
|
@ -4396,6 +4548,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
emailAddress);
|
emailAddress);
|
||||||
|
|
||||||
// save account
|
// save account
|
||||||
|
account.AccountPassword = null;
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4613,7 +4766,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
return exchange.GetMobileDevices(account.AccountName);
|
return exchange.GetMobileDevices(account.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -249,7 +249,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
OrganizationResult serverRes =
|
OrganizationResult serverRes =
|
||||||
crm.CreateOrganization(orgId, org.OrganizationId, org.Name, baseCurrencyCode, baseCurrencyName,
|
crm.CreateOrganization(orgId, org.OrganizationId, org.Name, baseCurrencyCode, baseCurrencyName,
|
||||||
baseCurrencySymbol, user.AccountName, user.FirstName, user.LastName, user.PrimaryEmailAddress,
|
baseCurrencySymbol, user.SamAccountName, user.FirstName, user.LastName, user.PrimaryEmailAddress,
|
||||||
collation);
|
collation);
|
||||||
|
|
||||||
if (!serverRes.IsSuccess)
|
if (!serverRes.IsSuccess)
|
||||||
|
|
|
@ -198,8 +198,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
||||||
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue));
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue));
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(org.LyncTenantId))
|
if (string.IsNullOrEmpty(org.LyncTenantId))
|
||||||
{
|
{
|
||||||
|
@ -208,6 +208,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
DomainInfo domain = ServerController.GetDomain(org.DefaultDomain);
|
||||||
|
|
||||||
|
//Add the service records
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.Lync, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PackageController.UpdatePackageItem(org);
|
PackageController.UpdatePackageItem(org);
|
||||||
|
|
||||||
bReloadConfiguration = true;
|
bReloadConfiguration = true;
|
||||||
|
@ -216,7 +228,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
|
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
|
||||||
|
|
||||||
if (!lync.CreateUser(org.OrganizationId, user.PrimaryEmailAddress, plan))
|
if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan))
|
||||||
{
|
{
|
||||||
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
|
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
|
||||||
return res;
|
return res;
|
||||||
|
@ -238,7 +250,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DataProvider.AddLyncUser(accountId, lyncUserPlanId);
|
DataProvider.AddLyncUser(accountId, lyncUserPlanId, user.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -306,7 +318,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
usr = OrganizationController.GetAccount(itemId, accountId);
|
usr = OrganizationController.GetAccount(itemId, accountId);
|
||||||
|
|
||||||
if (usr != null)
|
if (usr != null)
|
||||||
user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.PrimaryEmailAddress);
|
user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName);
|
||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
|
@ -329,6 +341,77 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri)
|
||||||
|
{
|
||||||
|
LyncUserResult res = TaskManager.StartResultTask<LyncUserResult>("LYNC", "SET_LYNC_USER_GENERAL_SETTINGS");
|
||||||
|
|
||||||
|
LyncUser user = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Organization org = (Organization)PackageController.GetPackageItem(itemId);
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
throw new ApplicationException(
|
||||||
|
string.Format("Organization is null. ItemId={0}", itemId));
|
||||||
|
}
|
||||||
|
|
||||||
|
int lyncServiceId = GetLyncServiceID(org.PackageId);
|
||||||
|
LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId);
|
||||||
|
|
||||||
|
OrganizationUser usr;
|
||||||
|
usr = OrganizationController.GetAccount(itemId, accountId);
|
||||||
|
|
||||||
|
if (usr != null)
|
||||||
|
user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName);
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
LyncUserPlan plan = ObjectUtils.FillObjectFromDataReader<LyncUserPlan>(DataProvider.GetLyncUserPlanByAccountId(accountId));
|
||||||
|
|
||||||
|
if (plan != null)
|
||||||
|
{
|
||||||
|
user.LyncUserPlanId = plan.LyncUserPlanId;
|
||||||
|
user.LyncUserPlanName = plan.LyncUserPlanName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(sipAddress))
|
||||||
|
{
|
||||||
|
if (sipAddress != usr.UserPrincipalName)
|
||||||
|
{
|
||||||
|
if (DataProvider.LyncUserExists(accountId, sipAddress))
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(res, LyncErrorCodes.ADDRESS_ALREADY_USED);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
user.SipAddress = sipAddress;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(lineUri)) user.LineUri = lineUri;
|
||||||
|
|
||||||
|
lync.SetLyncUserGeneralSettings(org.OrganizationId, usr.UserPrincipalName, user);
|
||||||
|
|
||||||
|
DataProvider.UpdateLyncUser(accountId, sipAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(res, LyncErrorCodes.FAILED_SET_SETTINGS, ex);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.IsSuccess = true;
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static int DeleteOrganization(int itemId)
|
public static int DeleteOrganization(int itemId)
|
||||||
{
|
{
|
||||||
// check account
|
// check account
|
||||||
|
@ -391,7 +474,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
OrganizationUser user;
|
OrganizationUser user;
|
||||||
user = OrganizationController.GetAccount(itemId, accountId);
|
user = OrganizationController.GetAccount(itemId, accountId);
|
||||||
|
|
||||||
if (!lync.SetLyncUserPlan(org.OrganizationId, user.PrimaryEmailAddress, plan))
|
if (!lync.SetLyncUserPlan(org.OrganizationId, user.UserPrincipalName, plan))
|
||||||
{
|
{
|
||||||
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
|
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER);
|
||||||
return res;
|
return res;
|
||||||
|
@ -419,7 +502,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LyncUsersPagedResult GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count)
|
public static LyncUsersPagedResult GetLyncUsers(int itemId)
|
||||||
|
{
|
||||||
|
return GetLyncUsersPaged(itemId, string.Empty, string.Empty, 0, int.MaxValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int count)
|
||||||
{
|
{
|
||||||
LyncUsersPagedResult res = TaskManager.StartResultTask<LyncUsersPagedResult>("LYNC", "GET_LYNC_USERS");
|
LyncUsersPagedResult res = TaskManager.StartResultTask<LyncUsersPagedResult>("LYNC", "GET_LYNC_USERS");
|
||||||
|
|
||||||
|
@ -501,7 +589,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
user = OrganizationController.GetAccount(itemId, accountId);
|
user = OrganizationController.GetAccount(itemId, accountId);
|
||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
lync.DeleteUser(user.PrimaryEmailAddress);
|
lync.DeleteUser(user.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -548,6 +636,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
else
|
else
|
||||||
LyncController.GetLyncUserPlansByUser(0, user, ref plans);
|
LyncController.GetLyncUserPlansByUser(0, user, ref plans);
|
||||||
|
|
||||||
|
|
||||||
|
ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId));
|
||||||
|
|
||||||
|
if (ExchangeOrg != null)
|
||||||
|
{
|
||||||
|
foreach (LyncUserPlan p in plans)
|
||||||
|
{
|
||||||
|
p.IsDefault = (p.LyncUserPlanId == ExchangeOrg.LyncUserPlanID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return plans;
|
return plans;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -572,12 +672,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
if ((Packages != null) & (Packages.Count > 0))
|
if ((Packages != null) & (Packages.Count > 0))
|
||||||
{
|
{
|
||||||
orgs = ExchangeServerController.GetExchangeOrganizations(Packages[0].PackageId, false);
|
orgs = ExchangeServerController.GetExchangeOrganizationsInternal(Packages[0].PackageId, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
orgs = ExchangeServerController.GetExchangeOrganizations(1, false);
|
orgs = ExchangeServerController.GetExchangeOrganizationsInternal(1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int OrgId = -1;
|
int OrgId = -1;
|
||||||
|
@ -825,8 +925,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
||||||
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue),
|
||||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue));
|
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue));
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(org.LyncTenantId))
|
if (string.IsNullOrEmpty(org.LyncTenantId))
|
||||||
{
|
{
|
||||||
|
@ -839,7 +939,20 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
lync = GetLyncServer(lyncServiceId, org.ServiceId);
|
lync = GetLyncServer(lyncServiceId, org.ServiceId);
|
||||||
|
|
||||||
lync.AddFederationDomain(org.OrganizationId, domainName, proxyFqdn);
|
bool bDomainExists = false;
|
||||||
|
LyncFederationDomain[] domains = GetFederationDomains(itemId);
|
||||||
|
foreach (LyncFederationDomain d in domains)
|
||||||
|
{
|
||||||
|
if (d.DomainName.ToLower() == domainName.ToLower())
|
||||||
|
{
|
||||||
|
bDomainExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bDomainExists)
|
||||||
|
lync.AddFederationDomain(org.OrganizationId, domainName.ToLower(), proxyFqdn);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,20 +84,23 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
private static OCSEdgeServer[] GetEdgeServers(string edgeServices)
|
private static OCSEdgeServer[] GetEdgeServers(string edgeServices)
|
||||||
{
|
{
|
||||||
List<OCSEdgeServer> list = new List<OCSEdgeServer>();
|
List<OCSEdgeServer> list = new List<OCSEdgeServer>();
|
||||||
string[] services = edgeServices.Split(';');
|
if (!string.IsNullOrEmpty(edgeServices))
|
||||||
foreach (string current in services)
|
|
||||||
{
|
{
|
||||||
string[] data = current.Split(',');
|
string[] services = edgeServices.Split(';');
|
||||||
try
|
foreach (string current in services)
|
||||||
{
|
{
|
||||||
int serviceId = int.Parse(data[1]);
|
string[] data = current.Split(',');
|
||||||
OCSEdgeServer ocs = new OCSEdgeServer();
|
try
|
||||||
ServiceProviderProxy.Init(ocs, serviceId);
|
{
|
||||||
list.Add(ocs);
|
int serviceId = int.Parse(data[1]);
|
||||||
}
|
OCSEdgeServer ocs = new OCSEdgeServer();
|
||||||
catch(Exception ex)
|
ServiceProviderProxy.Init(ocs, serviceId);
|
||||||
{
|
list.Add(ocs);
|
||||||
TaskManager.WriteError(ex);
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,8 @@ using WebsitePanel.Providers.HostedSolution;
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
using WebsitePanel.Providers.SharePoint;
|
using WebsitePanel.Providers.SharePoint;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using WebsitePanel.Providers.OCS;
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
@ -281,7 +283,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
TaskManager.WriteError(ex);
|
TaskManager.WriteError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static int CreateOrganization(int packageId, string organizationId, string organizationName)
|
public static int CreateOrganization(int packageId, string organizationId, string organizationName, string domainName)
|
||||||
{
|
{
|
||||||
int itemId;
|
int itemId;
|
||||||
int errorCode;
|
int errorCode;
|
||||||
|
@ -291,6 +293,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("ORGANIZATION", "CREATE_ORG", organizationName);
|
TaskManager.StartTask("ORGANIZATION", "CREATE_ORG", organizationName);
|
||||||
TaskManager.TaskParameters["Organization ID"] = organizationId;
|
TaskManager.TaskParameters["Organization ID"] = organizationId;
|
||||||
|
TaskManager.TaskParameters["DomainName"] = domainName;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -311,7 +314,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return BusinessErrorCodes.ERROR_ORG_ID_EXISTS;
|
return BusinessErrorCodes.ERROR_ORG_ID_EXISTS;
|
||||||
|
|
||||||
//create temporary domain name;
|
//create temporary domain name;
|
||||||
string domainName = CreateTemporyDomainName(serviceId, organizationId);
|
if (string.IsNullOrEmpty(domainName))
|
||||||
|
{
|
||||||
|
string tmpDomainName = CreateTemporyDomainName(serviceId, organizationId);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(tmpDomainName)) domainName = tmpDomainName;
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(domainName))
|
if (string.IsNullOrEmpty(domainName))
|
||||||
{
|
{
|
||||||
|
@ -330,6 +338,17 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DomainInfo domain = ServerController.GetDomain(domainId);
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.HostedOrganizations, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(org.PackageId, ResourceGroups.HostedCRM, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PackageContext cntx = PackageController.GetPackageContext(packageId);
|
PackageContext cntx = PackageController.GetPackageContext(packageId);
|
||||||
|
|
||||||
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE] != null)
|
if (cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE] != null)
|
||||||
|
@ -361,60 +380,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
PackageController.AddPackageItem(orgDomain);
|
PackageController.AddPackageItem(orgDomain);
|
||||||
|
|
||||||
|
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES] != null)
|
|
||||||
{
|
|
||||||
// 5) Create default mailbox plans
|
|
||||||
// load user info
|
|
||||||
UserInfo user = PackageController.GetPackageOwner(org.PackageId);
|
|
||||||
|
|
||||||
// get settings
|
|
||||||
UserSettings userSettings = UserController.GetUserSettings(user.UserId, "ExchangeMailboxPlansPolicy");
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_MAILBOXPLANS]))
|
|
||||||
{
|
|
||||||
|
|
||||||
List<ExchangeMailboxPlan> list = new List<ExchangeMailboxPlan>();
|
|
||||||
|
|
||||||
XmlSerializer serializer = new XmlSerializer(list.GetType());
|
|
||||||
|
|
||||||
StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_MAILBOXPLANS]);
|
|
||||||
|
|
||||||
list = (List<ExchangeMailboxPlan>)serializer.Deserialize(reader);
|
|
||||||
|
|
||||||
foreach (ExchangeMailboxPlan p in list)
|
|
||||||
{
|
|
||||||
ExchangeServerController.AddExchangeMailboxPlan(itemId, p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cntx.Quotas[Quotas.LYNC_USERS] != null)
|
|
||||||
{
|
|
||||||
// 5) Create default mailbox plans
|
|
||||||
// load user info
|
|
||||||
UserInfo user = PackageController.GetPackageOwner(org.PackageId);
|
|
||||||
|
|
||||||
// get settings
|
|
||||||
UserSettings userSettings = UserController.GetUserSettings(user.UserId, "LyncUserPlansPolicy");
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS]))
|
|
||||||
{
|
|
||||||
|
|
||||||
List<LyncUserPlan> list = new List<LyncUserPlan>();
|
|
||||||
|
|
||||||
XmlSerializer serializer = new XmlSerializer(list.GetType());
|
|
||||||
|
|
||||||
StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS]);
|
|
||||||
|
|
||||||
list = (List<LyncUserPlan>)serializer.Deserialize(reader);
|
|
||||||
|
|
||||||
foreach (LyncUserPlan p in list)
|
|
||||||
{
|
|
||||||
LyncController.AddLyncUserPlan(itemId, p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -462,6 +427,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (domain == null)
|
if (domain == null)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(org.GlobalAddressList))
|
||||||
|
{
|
||||||
|
if (DataProvider.CheckDomainUsedByHostedOrganization(domain.DomainName) == 1)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// unregister domain
|
// unregister domain
|
||||||
DataProvider.DeleteExchangeOrganizationDomain(itemId, domainId);
|
DataProvider.DeleteExchangeOrganizationDomain(itemId, domainId);
|
||||||
|
|
||||||
|
@ -553,7 +526,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LyncUsersPagedResult res = LyncController.GetLyncUsers(itemId, string.Empty, string.Empty, 0, int.MaxValue);
|
LyncUsersPagedResult res = LyncController.GetLyncUsers(itemId);
|
||||||
|
|
||||||
if (res.IsSuccess)
|
if (res.IsSuccess)
|
||||||
{
|
{
|
||||||
|
@ -1042,6 +1015,37 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int ChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType)
|
||||||
|
{
|
||||||
|
// check account
|
||||||
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||||
|
if (accountCheck < 0) return accountCheck;
|
||||||
|
|
||||||
|
// place log record
|
||||||
|
TaskManager.StartTask("ORGANIZATION", "CHANGE_DOMAIN_TYPE", domainId);
|
||||||
|
TaskManager.ItemId = itemId;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// change accepted domain type on Exchange
|
||||||
|
int checkResult = ExchangeServerController.ChangeAcceptedDomainType(itemId, domainId, newDomainType);
|
||||||
|
|
||||||
|
|
||||||
|
// change accepted domain type in DB
|
||||||
|
int domainTypeId= (int) newDomainType;
|
||||||
|
DataProvider.ChangeExchangeAcceptedDomainType(itemId, domainId, domainTypeId);
|
||||||
|
|
||||||
|
return checkResult;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static int AddOrganizationDomain(int itemId, string domainName)
|
public static int AddOrganizationDomain(int itemId, string domainName)
|
||||||
{
|
{
|
||||||
|
@ -1130,6 +1134,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServerController.AddAuthoritativeDomain(itemId, domain.DomainId);
|
ExchangeServerController.AddAuthoritativeDomain(itemId, domain.DomainId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OrganizationStatistics orgStatsExchange = ExchangeServerController.GetOrganizationStatistics(itemId);
|
||||||
|
|
||||||
|
if (orgStatsExchange.AllocatedMailboxes == 0)
|
||||||
|
{
|
||||||
|
ExchangeAcceptedDomainType newDomainType = ExchangeAcceptedDomainType.InternalRelay;
|
||||||
|
ChangeOrganizationDomainType(org.ServiceId, domain.DomainId, newDomainType);
|
||||||
|
}
|
||||||
|
|
||||||
if (org.IsOCSOrganization)
|
if (org.IsOCSOrganization)
|
||||||
{
|
{
|
||||||
OCSController.AddDomain(domain.DomainName, itemId);
|
OCSController.AddDomain(domain.DomainName, itemId);
|
||||||
|
@ -1324,11 +1336,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
||||||
{
|
{
|
||||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(upn, org.OrganizationId);
|
accountName = sAMAccountName;
|
||||||
|
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(sAMAccountName, org.OrganizationId);
|
||||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||||
|
|
||||||
userId = AddOrganizationUser(itemId, upn, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
userId = AddOrganizationUser(itemId, sAMAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||||
accountName = upn;
|
|
||||||
|
|
||||||
// register email address
|
// register email address
|
||||||
AddAccountEmailAddress(userId, email);
|
AddAccountEmailAddress(userId, email);
|
||||||
|
@ -1420,7 +1432,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||||
|
|
||||||
userId = AddOrganizationUser(itemId, accountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
userId = AddOrganizationUser(itemId, retUser.SamAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||||
|
|
||||||
AddAccountEmailAddress(userId, email);
|
AddAccountEmailAddress(userId, email);
|
||||||
|
|
||||||
|
@ -1449,6 +1461,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
string CounterStr = "00000";
|
string CounterStr = "00000";
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
|
|
||||||
|
if (!AccountExists(accountName)) return accountName;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
accountName = genSamLogin(name, CounterStr);
|
accountName = genSamLogin(name, CounterStr);
|
||||||
|
@ -1505,8 +1520,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (DataProvider.CheckOCSUserExists(accountId))
|
if (DataProvider.CheckOCSUserExists(accountId))
|
||||||
{
|
{
|
||||||
return BusinessErrorCodes.CURRENT_USER_IS_OCS_USER; ;
|
return BusinessErrorCodes.CURRENT_USER_IS_OCS_USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DataProvider.CheckLyncUserExists(accountId))
|
||||||
|
{
|
||||||
|
return BusinessErrorCodes.CURRENT_USER_IS_LYNC_USER;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// load organization
|
// load organization
|
||||||
Organization org = GetOrganization(itemId);
|
Organization org = GetOrganization(itemId);
|
||||||
if (org == null)
|
if (org == null)
|
||||||
|
@ -1652,7 +1674,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (accountCheck < 0) return accountCheck;
|
if (accountCheck < 0) return accountCheck;
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL");
|
TaskManager.StartTask("ORGANIZATION", "UPDATE_USER_GENERAL");
|
||||||
TaskManager.ItemId = itemId;
|
TaskManager.ItemId = itemId;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -1717,7 +1739,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (!String.IsNullOrEmpty(password))
|
if (!String.IsNullOrEmpty(password))
|
||||||
account.AccountPassword = CryptoUtils.Encrypt(password);
|
account.AccountPassword = CryptoUtils.Encrypt(password);
|
||||||
else
|
else
|
||||||
account.AccountPassword = string.Empty;
|
account.AccountPassword = null;
|
||||||
|
|
||||||
UpdateAccount(account);
|
UpdateAccount(account);
|
||||||
|
|
||||||
|
@ -1734,6 +1756,162 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit)
|
||||||
|
{
|
||||||
|
|
||||||
|
// check account
|
||||||
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||||
|
if (accountCheck < 0) return accountCheck;
|
||||||
|
|
||||||
|
|
||||||
|
// place log record
|
||||||
|
TaskManager.StartTask("ORGANIZATION", "SET_USER_USERPRINCIPALNAME");
|
||||||
|
TaskManager.ItemId = itemId;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// load organization
|
||||||
|
Organization org = GetOrganization(itemId);
|
||||||
|
if (org == null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// check package
|
||||||
|
int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive);
|
||||||
|
if (packageCheck < 0) return packageCheck;
|
||||||
|
|
||||||
|
// load account
|
||||||
|
OrganizationUser user = GetUserGeneralSettings(itemId, accountId);
|
||||||
|
|
||||||
|
if (user.UserPrincipalName != userPrincipalName)
|
||||||
|
{
|
||||||
|
bool userPrincipalNameOwned = false;
|
||||||
|
ExchangeEmailAddress[] emails = ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId);
|
||||||
|
|
||||||
|
foreach (ExchangeEmailAddress mail in emails)
|
||||||
|
{
|
||||||
|
if (mail.EmailAddress == userPrincipalName)
|
||||||
|
{
|
||||||
|
userPrincipalNameOwned = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!userPrincipalNameOwned)
|
||||||
|
{
|
||||||
|
if (EmailAddressExists(userPrincipalName))
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||||
|
|
||||||
|
orgProxy.SetUserPrincipalName(org.OrganizationId,
|
||||||
|
user.AccountName,
|
||||||
|
userPrincipalName.ToLower());
|
||||||
|
|
||||||
|
DataProvider.UpdateExchangeAccountUserPrincipalName(accountId, userPrincipalName.ToLower());
|
||||||
|
|
||||||
|
if (inherit)
|
||||||
|
{
|
||||||
|
if (user.AccountType == ExchangeAccountType.Mailbox)
|
||||||
|
{
|
||||||
|
ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, userPrincipalName.ToLower());
|
||||||
|
ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, userPrincipalName.ToLower());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (user.IsLyncUser)
|
||||||
|
{
|
||||||
|
if (!DataProvider.LyncUserExists(accountId, userPrincipalName.ToLower()))
|
||||||
|
{
|
||||||
|
LyncController.SetLyncUserGeneralSettings(itemId, accountId, userPrincipalName.ToLower(), null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (user.IsOCSUser)
|
||||||
|
{
|
||||||
|
OCSServer ocs = GetOCSProxy(itemId);
|
||||||
|
string instanceId = DataProvider.GetOCSUserInstanceID(user.AccountId);
|
||||||
|
ocs.SetUserPrimaryUri(instanceId, userPrincipalName.ToLower());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int SetUserPassword(int itemId, int accountId, string password)
|
||||||
|
{
|
||||||
|
|
||||||
|
// check account
|
||||||
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||||
|
if (accountCheck < 0) return accountCheck;
|
||||||
|
|
||||||
|
// place log record
|
||||||
|
TaskManager.StartTask("ORGANIZATION", "SET_USER_PASSWORD");
|
||||||
|
TaskManager.ItemId = itemId;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
Organization org = GetOrganization(itemId);
|
||||||
|
if (org == null)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// check package
|
||||||
|
int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive);
|
||||||
|
if (packageCheck < 0) return packageCheck;
|
||||||
|
|
||||||
|
// load account
|
||||||
|
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
|
||||||
|
|
||||||
|
string accountName = GetAccountName(account.AccountName);
|
||||||
|
|
||||||
|
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||||
|
|
||||||
|
orgProxy.SetUserPassword( org.OrganizationId,
|
||||||
|
accountName,
|
||||||
|
password);
|
||||||
|
|
||||||
|
//account.
|
||||||
|
if (!String.IsNullOrEmpty(password))
|
||||||
|
account.AccountPassword = CryptoUtils.Encrypt(password);
|
||||||
|
else
|
||||||
|
account.AccountPassword = null;
|
||||||
|
|
||||||
|
UpdateAccount(account);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static void UpdateAccount(ExchangeAccount account)
|
private static void UpdateAccount(ExchangeAccount account)
|
||||||
{
|
{
|
||||||
DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName,
|
DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName,
|
||||||
|
@ -1951,6 +2129,19 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static OCSServer GetOCSProxy(int itemId)
|
||||||
|
{
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.OCS);
|
||||||
|
|
||||||
|
OCSServer ocs = new OCSServer();
|
||||||
|
ServiceProviderProxy.Init(ocs, serviceId);
|
||||||
|
|
||||||
|
|
||||||
|
return ocs;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,23 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
item.TotalCRMUsers = crmOrganizationStatistics.Count;
|
item.TotalCRMUsers = crmOrganizationStatistics.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item.TotalLyncUsers = 0;
|
||||||
|
item.TotalLyncEVUsers = 0;
|
||||||
|
|
||||||
|
if (report.LyncReport != null)
|
||||||
|
{
|
||||||
|
List<LyncUserStatistics> lyncOrganizationStatistics =
|
||||||
|
report.LyncReport.Items.FindAll(
|
||||||
|
delegate(LyncUserStatistics stats) { return stats.OrganizationID == org.OrganizationId; });
|
||||||
|
|
||||||
|
foreach (LyncUserStatistics current in lyncOrganizationStatistics)
|
||||||
|
{
|
||||||
|
if (current.EnterpriseVoice) item.TotalLyncEVUsers++;
|
||||||
|
}
|
||||||
|
|
||||||
|
item.TotalLyncUsers = lyncOrganizationStatistics.Count;
|
||||||
|
}
|
||||||
|
|
||||||
report.OrganizationReport.Items.Add(item);
|
report.OrganizationReport.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +315,18 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (report.LyncReport != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PopulateLyncReportItems(org, report, topReseller);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (report.OrganizationReport != null)
|
if (report.OrganizationReport != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -309,6 +338,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
TaskManager.WriteError(ex);
|
TaskManager.WriteError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int GetExchangeServiceID(int packageId)
|
private static int GetExchangeServiceID(int packageId)
|
||||||
|
@ -316,6 +347,10 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
return PackageController.GetPackageServiceId(packageId, ResourceGroups.Exchange);
|
return PackageController.GetPackageServiceId(packageId, ResourceGroups.Exchange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int GetLyncServiceID(int packageId)
|
||||||
|
{
|
||||||
|
return PackageController.GetPackageServiceId(packageId, ResourceGroups.Lync);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void PopulateSharePointItem(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateSharePointItem(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
|
@ -409,12 +444,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
stats = exchange.GetMailboxStatistics(mailbox.AccountName);
|
stats = exchange.GetMailboxStatistics(mailbox.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
TaskManager.WriteError(ex, "Could not get mailbox statistics. AccountName: {0}",
|
TaskManager.WriteError(ex, "Could not get mailbox statistics. AccountName: {0}",
|
||||||
mailbox.AccountName);
|
mailbox.UserPrincipalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -422,6 +457,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
PopulateBaseItem(stats, org, topReseller);
|
PopulateBaseItem(stats, org, topReseller);
|
||||||
stats.MailboxType = mailbox.AccountType;
|
stats.MailboxType = mailbox.AccountType;
|
||||||
|
if (mailbox.AccountType == ExchangeAccountType.Mailbox)
|
||||||
|
{
|
||||||
|
ExchangeAccount a = ExchangeServerController.GetAccount(mailbox.ItemId, mailbox.AccountId);
|
||||||
|
stats.MailboxPlan = a.MailboxPlan;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
stats.BlackberryEnabled = BlackBerryController.CheckBlackBerryUserExists(mailbox.AccountId);
|
stats.BlackberryEnabled = BlackBerryController.CheckBlackBerryUserExists(mailbox.AccountId);
|
||||||
report.ExchangeReport.Items.Add(stats);
|
report.ExchangeReport.Items.Add(stats);
|
||||||
|
@ -436,6 +477,74 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static void PopulateLyncReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
|
{
|
||||||
|
|
||||||
|
//Check if lync organization
|
||||||
|
if (string.IsNullOrEmpty(org.LyncTenantId))
|
||||||
|
return;
|
||||||
|
|
||||||
|
LyncUser[] lyncUsers = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LyncUsersPagedResult res = LyncController.GetLyncUsers(org.Id);
|
||||||
|
if (res.IsSuccess) lyncUsers = res.Value.PageUsers;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new ApplicationException(
|
||||||
|
string.Format("Could not get lync users for current organization {0}", org.Id), ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (lyncUsers == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
foreach (LyncUser lyncUser in lyncUsers)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LyncUserStatistics stats = new LyncUserStatistics();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
stats.SipAddress = lyncUser.SipAddress;
|
||||||
|
if (string.IsNullOrEmpty(lyncUser.LineUri)) stats.PhoneNumber = string.Empty; else stats.PhoneNumber = lyncUser.LineUri;
|
||||||
|
|
||||||
|
LyncUserPlan plan = LyncController.GetLyncUserPlan(org.Id, lyncUser.LyncUserPlanId);
|
||||||
|
stats.Conferencing = plan.Conferencing;
|
||||||
|
stats.EnterpriseVoice = plan.EnterpriseVoice;
|
||||||
|
stats.Federation = plan.Federation;
|
||||||
|
stats.InstantMessaing = plan.IM;
|
||||||
|
stats.MobileAccess = plan.Mobility;
|
||||||
|
stats.LyncUserPlan = plan.LyncUserPlanName;
|
||||||
|
stats.DisplayName = lyncUser.DisplayName;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex, "Could not get lync statistics. AccountName: {0}",
|
||||||
|
lyncUser.DisplayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (stats != null)
|
||||||
|
{
|
||||||
|
PopulateBaseItem(stats, org, topReseller);
|
||||||
|
report.LyncReport.Items.Add(stats);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void PopulateSpaceData(int packageId, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateSpaceData(int packageId, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
{
|
{
|
||||||
List<Organization> organizations;
|
List<Organization> organizations;
|
||||||
|
@ -490,7 +599,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void GetUsersData(EnterpriseSolutionStatisticsReport report, int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, string topReseller)
|
private static void GetUsersData(EnterpriseSolutionStatisticsReport report, int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport, string topReseller)
|
||||||
{
|
{
|
||||||
List<UserInfo> users;
|
List<UserInfo> users;
|
||||||
try
|
try
|
||||||
|
@ -514,6 +623,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
GetUsersData(report, user.UserId, generateExchangeReport, generateSharePointReport,
|
GetUsersData(report, user.UserId, generateExchangeReport, generateSharePointReport,
|
||||||
generateCRMReport,
|
generateCRMReport,
|
||||||
generateOrganizationReport,
|
generateOrganizationReport,
|
||||||
|
generateLyncReport,
|
||||||
string.IsNullOrEmpty(topReseller) ? user.Username : topReseller);
|
string.IsNullOrEmpty(topReseller) ? user.Username : topReseller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -524,7 +634,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EnterpriseSolutionStatisticsReport GetEnterpriseSolutionStatisticsReport(int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport)
|
public static EnterpriseSolutionStatisticsReport GetEnterpriseSolutionStatisticsReport(int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport)
|
||||||
{
|
{
|
||||||
EnterpriseSolutionStatisticsReport report = new EnterpriseSolutionStatisticsReport();
|
EnterpriseSolutionStatisticsReport report = new EnterpriseSolutionStatisticsReport();
|
||||||
|
|
||||||
|
@ -534,17 +644,20 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
if (generateSharePointReport || generateOrganizationReport)
|
if (generateSharePointReport || generateOrganizationReport)
|
||||||
report.SharePointReport = new SharePointStatisticsReport();
|
report.SharePointReport = new SharePointStatisticsReport();
|
||||||
|
|
||||||
|
if (generateLyncReport || generateOrganizationReport)
|
||||||
|
report.LyncReport = new LyncStatisticsReport();
|
||||||
|
|
||||||
|
|
||||||
if (generateCRMReport || generateOrganizationReport)
|
if (generateCRMReport || generateOrganizationReport)
|
||||||
report.CRMReport = new CRMStatisticsReport();
|
report.CRMReport = new CRMStatisticsReport();
|
||||||
|
|
||||||
if (generateOrganizationReport)
|
if (generateOrganizationReport)
|
||||||
report.OrganizationReport = new OrganizationStatisticsReport();
|
report.OrganizationReport = new OrganizationStatisticsReport();
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GetUsersData(report, userId, generateExchangeReport, generateSharePointReport, generateCRMReport,
|
GetUsersData(report, userId, generateExchangeReport, generateSharePointReport, generateCRMReport,
|
||||||
generateOrganizationReport, null);
|
generateOrganizationReport, generateLyncReport, null);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1051,18 +1051,21 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int itemId = PackageController.AddPackageItem(item);
|
int itemId = PackageController.AddPackageItem(item);
|
||||||
|
|
||||||
// update related domain with a new pointer
|
// update related domain with a new pointer
|
||||||
DomainInfo domain = ServerController.GetDomain(item.Name);
|
DomainInfo domain = ServerController.GetDomain(item.Name, true, false);
|
||||||
if (domain != null)
|
if (domain != null)
|
||||||
{
|
{
|
||||||
domain.MailDomainId = itemId;
|
domain.MailDomainId = itemId;
|
||||||
ServerController.UpdateDomain(domain);
|
ServerController.UpdateDomain(domain);
|
||||||
|
|
||||||
|
domain = ServerController.GetDomain(domain.DomainId);
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Mail, domain, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if instant alias must be added
|
// check if instant alias must be added
|
||||||
if (!String.IsNullOrEmpty(domain.InstantAliasName))
|
if (!String.IsNullOrEmpty(domain.InstantAliasName))
|
||||||
{
|
{
|
||||||
// load instant alias
|
// load instant alias
|
||||||
DomainInfo instantAlias = ServerController.GetDomainItem(domain.InstantAliasName);
|
DomainInfo instantAlias = ServerController.GetDomain(domain.InstantAliasId);
|
||||||
if (instantAlias != null)
|
if (instantAlias != null)
|
||||||
{
|
{
|
||||||
AddMailDomainPointer(itemId, instantAlias.DomainId);
|
AddMailDomainPointer(itemId, instantAlias.DomainId);
|
||||||
|
@ -1161,7 +1164,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
PackageController.DeletePackageItem(origItem.Id);
|
PackageController.DeletePackageItem(origItem.Id);
|
||||||
|
|
||||||
// update related domain with a new pointer
|
// update related domain with a new pointer
|
||||||
DomainInfo domain = ServerController.GetDomain(origItem.Name);
|
DomainInfo domain = ServerController.GetDomain(origItem.Name, true, false);
|
||||||
if (domain != null)
|
if (domain != null)
|
||||||
{
|
{
|
||||||
domain.MailDomainId = 0;
|
domain.MailDomainId = 0;
|
||||||
|
@ -1202,7 +1205,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return pointers;
|
return pointers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int AddMailDomainPointer(int itemId, int domainId)
|
public static int AddMailDomainPointer( int itemId, int domainId)
|
||||||
{
|
{
|
||||||
// check account
|
// check account
|
||||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo);
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo);
|
||||||
|
@ -1231,6 +1234,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ServiceProviderProxy.Init(mail, mailDomain.ServiceId);
|
ServiceProviderProxy.Init(mail, mailDomain.ServiceId);
|
||||||
mail.AddDomainAlias(mailDomain.Name, domain.DomainName);
|
mail.AddDomainAlias(mailDomain.Name, domain.DomainName);
|
||||||
|
|
||||||
|
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Mail, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// update domain
|
// update domain
|
||||||
domain.MailDomainId = itemId;
|
domain.MailDomainId = itemId;
|
||||||
ServerController.UpdateDomain(domain);
|
ServerController.UpdateDomain(domain);
|
||||||
|
@ -1474,7 +1487,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// add/update domains/pointers
|
// add/update domains/pointers
|
||||||
foreach (string domainName in domains)
|
foreach (string domainName in domains)
|
||||||
{
|
{
|
||||||
DomainInfo domain = ServerController.GetDomain(domainName);
|
DomainInfo domain = ServerController.GetDomain(domainName, true, false);
|
||||||
if (domain == null)
|
if (domain == null)
|
||||||
{
|
{
|
||||||
domain = new DomainInfo();
|
domain = new DomainInfo();
|
||||||
|
|
|
@ -412,17 +412,54 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
public static bool CheckLoadUserProfile(int serverId)
|
public static bool CheckLoadUserProfile(int serverId)
|
||||||
{
|
{
|
||||||
int packageId = DataProvider.GetPackageIdByName("IIS70");
|
int serviceId = getWebServiceId(serverId);
|
||||||
int serviceId = DataProvider.GetServiceIdByProviderForServer(packageId, serverId);
|
if (serviceId != -1)
|
||||||
return WebServerController.GetWebServer(serviceId).CheckLoadUserProfile();
|
{
|
||||||
|
return WebServerController.GetWebServer(serviceId).CheckLoadUserProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int getWebServiceId(int serverId)
|
||||||
|
{
|
||||||
|
DataSet dsServices = ServerController.GetRawServicesByServerId(serverId);
|
||||||
|
|
||||||
|
int webGroup = -1;
|
||||||
|
|
||||||
|
if (dsServices.Tables.Count < 1) return -1;
|
||||||
|
|
||||||
|
foreach (DataRow r in dsServices.Tables[0].Rows)
|
||||||
|
{
|
||||||
|
if (r["GroupName"].ToString() == "Web")
|
||||||
|
{
|
||||||
|
webGroup = (int)r["GroupID"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (webGroup == -1) return -1;
|
||||||
|
|
||||||
|
foreach (DataRow r in dsServices.Tables[1].Rows)
|
||||||
|
{
|
||||||
|
if ((int)r["GroupID"] == webGroup)
|
||||||
|
{
|
||||||
|
return (int)r["ServiceID"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void EnableLoadUserProfile(int serverId)
|
public static void EnableLoadUserProfile(int serverId)
|
||||||
{
|
{
|
||||||
int packageId = DataProvider.GetPackageIdByName("IIS70");
|
int serviceId = getWebServiceId(serverId);
|
||||||
int serviceId = DataProvider.GetServiceIdByProviderForServer(packageId, serverId);
|
if (serviceId != -1)
|
||||||
WebServerController.GetWebServer(serviceId).EnableLoadUserProfile();
|
{
|
||||||
|
WebServerController.GetWebServer(serviceId).EnableLoadUserProfile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -460,13 +460,37 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
domain.PackageId = packageId;
|
domain.PackageId = packageId;
|
||||||
domain.DomainName = domainName;
|
domain.DomainName = domainName;
|
||||||
domain.HostingAllowed = false;
|
domain.HostingAllowed = false;
|
||||||
domainId = ServerController.AddDomain(domain, createInstantAlias, true);
|
domainId = ServerController.AddDomain(domain, false, true);
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
{
|
{
|
||||||
result.Result = domainId;
|
result.Result = domainId;
|
||||||
DeletePackage(packageId);
|
DeletePackage(packageId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
domain = ServerController.GetDomain(domainId);
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Os, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Dns, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Ftp, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2000, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2005, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2008, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2012, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql4, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql5, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Statistics, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (createInstantAlias)
|
||||||
|
ServerController.CreateDomainInstantAlias("", domainId);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -481,7 +505,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// create web site
|
// create web site
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int webSiteId = WebServerController.AddWebSite(packageId, hostName, domainId, 0, true, false);
|
int webSiteId = WebServerController.AddWebSite(packageId, hostName, domainId, 0, createInstantAlias, false);
|
||||||
if (webSiteId < 0)
|
if (webSiteId < 0)
|
||||||
{
|
{
|
||||||
result.Result = webSiteId;
|
result.Result = webSiteId;
|
||||||
|
|
|
@ -29,8 +29,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
using WebsitePanel.Providers.Web;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -68,69 +69,74 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (accountCheck < 0) return items;
|
if (accountCheck < 0) return items;
|
||||||
|
|
||||||
// load item type
|
// load item type
|
||||||
ServiceProviderItemType itemType = PackageController.GetServiceItemType(itemTypeId);
|
if (itemTypeId > 0)
|
||||||
|
|
||||||
// load group
|
|
||||||
ResourceGroupInfo group = ServerController.GetResourceGroup(itemType.GroupId);
|
|
||||||
|
|
||||||
// get service id
|
|
||||||
int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName);
|
|
||||||
if (serviceId == 0)
|
|
||||||
return items;
|
|
||||||
|
|
||||||
DataTable dtServiceItems = PackageController.GetServiceItemsDataSet(serviceId).Tables[0];
|
|
||||||
DataTable dtPackageItems = PackageController.GetPackageItemsDataSet(packageId).Tables[0];
|
|
||||||
|
|
||||||
// instantiate controller
|
|
||||||
IImportController ctrl = null;
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
List<string> importableItems = null;
|
ServiceProviderItemType itemType = PackageController.GetServiceItemType(itemTypeId);
|
||||||
ctrl = Activator.CreateInstance(Type.GetType(group.GroupController)) as IImportController;
|
|
||||||
if (ctrl != null)
|
|
||||||
{
|
|
||||||
importableItems = ctrl.GetImportableItems(packageId, itemTypeId, Type.GetType(itemType.TypeName), group);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (string importableItem in importableItems)
|
// load group
|
||||||
{
|
ResourceGroupInfo group = ServerController.GetResourceGroup(itemType.GroupId);
|
||||||
|
|
||||||
// filter items by service
|
// get service id
|
||||||
bool serviceContains = false;
|
int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName);
|
||||||
foreach (DataRow dr in dtServiceItems.Rows)
|
if (serviceId == 0)
|
||||||
|
return items;
|
||||||
|
|
||||||
|
DataTable dtServiceItems = PackageController.GetServiceItemsDataSet(serviceId).Tables[0];
|
||||||
|
DataTable dtPackageItems = PackageController.GetPackageItemsDataSet(packageId).Tables[0];
|
||||||
|
|
||||||
|
// instantiate controller
|
||||||
|
IImportController ctrl = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<string> importableItems = null;
|
||||||
|
ctrl = Activator.CreateInstance(Type.GetType(group.GroupController)) as IImportController;
|
||||||
|
if (ctrl != null)
|
||||||
{
|
{
|
||||||
string serviceItemName = (string)dr["ItemName"];
|
importableItems = ctrl.GetImportableItems(packageId, itemTypeId, Type.GetType(itemType.TypeName), group);
|
||||||
int serviceItemTypeId = (int)dr["ItemTypeId"];
|
|
||||||
|
|
||||||
if (String.Compare(importableItem, serviceItemName, true) == 0
|
|
||||||
&& serviceItemTypeId == itemTypeId)
|
|
||||||
{
|
|
||||||
serviceContains = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// filter items by package
|
foreach (string importableItem in importableItems)
|
||||||
bool packageContains = false;
|
|
||||||
foreach (DataRow dr in dtPackageItems.Rows)
|
|
||||||
{
|
{
|
||||||
string packageItemName = (string)dr["ItemName"];
|
|
||||||
int packageItemTypeId = (int)dr["ItemTypeId"];
|
|
||||||
|
|
||||||
if (String.Compare(importableItem, packageItemName, true) == 0
|
// filter items by service
|
||||||
&& packageItemTypeId == itemTypeId)
|
bool serviceContains = false;
|
||||||
|
foreach (DataRow dr in dtServiceItems.Rows)
|
||||||
{
|
{
|
||||||
packageContains = true;
|
string serviceItemName = (string)dr["ItemName"];
|
||||||
break;
|
int serviceItemTypeId = (int)dr["ItemTypeId"];
|
||||||
|
|
||||||
|
if (String.Compare(importableItem, serviceItemName, true) == 0
|
||||||
|
&& serviceItemTypeId == itemTypeId)
|
||||||
|
{
|
||||||
|
serviceContains = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// filter items by package
|
||||||
|
bool packageContains = false;
|
||||||
|
foreach (DataRow dr in dtPackageItems.Rows)
|
||||||
|
{
|
||||||
|
string packageItemName = (string)dr["ItemName"];
|
||||||
|
int packageItemTypeId = (int)dr["ItemTypeId"];
|
||||||
|
|
||||||
|
if (String.Compare(importableItem, packageItemName, true) == 0
|
||||||
|
&& packageItemTypeId == itemTypeId)
|
||||||
|
{
|
||||||
|
packageContains = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!serviceContains && !packageContains)
|
||||||
|
items.Add(importableItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!serviceContains && !packageContains)
|
|
||||||
items.Add(importableItem);
|
|
||||||
}
|
}
|
||||||
|
catch { /* do nothing */ }
|
||||||
}
|
}
|
||||||
catch { /* do nothing */ }
|
else
|
||||||
|
return GetImportableCustomItems(packageId, itemTypeId);
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
@ -172,19 +178,35 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
TaskManager.IndicatorCurrent = 0;
|
TaskManager.IndicatorCurrent = 0;
|
||||||
|
|
||||||
Dictionary<int, List<string>> groupedItems = new Dictionary<int, List<string>>();
|
Dictionary<int, List<string>> groupedItems = new Dictionary<int, List<string>>();
|
||||||
|
List<string> customItems = new List<string>();
|
||||||
|
|
||||||
// sort by groups
|
// sort by groups
|
||||||
foreach (string item in items)
|
foreach (string item in items)
|
||||||
{
|
{
|
||||||
|
|
||||||
string[] itemParts = item.Split('|');
|
string[] itemParts = item.Split('|');
|
||||||
int itemTypeId = Utils.ParseInt(itemParts[0], 0);
|
if (!item.StartsWith("+"))
|
||||||
string itemName = itemParts[1];
|
{
|
||||||
|
int itemTypeId = Utils.ParseInt(itemParts[0], 0);
|
||||||
|
string itemName = itemParts[1];
|
||||||
|
|
||||||
// add to group
|
// add to group
|
||||||
if (!groupedItems.ContainsKey(itemTypeId))
|
if (!groupedItems.ContainsKey(itemTypeId))
|
||||||
groupedItems[itemTypeId] = new List<string>();
|
groupedItems[itemTypeId] = new List<string>();
|
||||||
|
|
||||||
groupedItems[itemTypeId].Add(itemName);
|
groupedItems[itemTypeId].Add(itemName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (itemParts[0])
|
||||||
|
{
|
||||||
|
case ("+100"):
|
||||||
|
if (itemParts.Length > 2)
|
||||||
|
customItems.Add(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// import each group
|
// import each group
|
||||||
|
@ -226,9 +248,64 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
catch { /* do nothing */ }
|
catch { /* do nothing */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (string s in customItems)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string[] sParts = s.Split('|');
|
||||||
|
switch (sParts[0])
|
||||||
|
{
|
||||||
|
case "+100":
|
||||||
|
TaskManager.Write(String.Format("Import {0}", sParts[4]));
|
||||||
|
|
||||||
|
int result = WebServerController.ImporHostHeader(int.Parse(sParts[2],0), int.Parse(sParts[3],0), int.Parse(sParts[5],0));
|
||||||
|
|
||||||
|
if (result < 0)
|
||||||
|
TaskManager.WriteError(String.Format("Failed to Import {0} ,error: {1}: ", sParts[4], result.ToString()));
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { /* do nothing */ }
|
||||||
|
|
||||||
|
TaskManager.IndicatorCurrent++;
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager.IndicatorCurrent = items.Length;
|
||||||
|
|
||||||
TaskManager.CompleteTask();
|
TaskManager.CompleteTask();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<string> GetImportableCustomItems(int packageId, int itemTypeId)
|
||||||
|
{
|
||||||
|
|
||||||
|
List<string> items = new List<string>();
|
||||||
|
PackageInfo packageInfo = PackageController.GetPackage(packageId);
|
||||||
|
if (packageInfo == null) return items;
|
||||||
|
|
||||||
|
switch (itemTypeId)
|
||||||
|
{
|
||||||
|
case -100:
|
||||||
|
List<UserInfo> users = UserController.GetUsers(packageInfo.UserId, true);
|
||||||
|
foreach (UserInfo user in users)
|
||||||
|
{
|
||||||
|
List<PackageInfo> packages = PackageController.GetPackages(user.UserId);
|
||||||
|
foreach (PackageInfo package in packages)
|
||||||
|
{
|
||||||
|
List<WebSite> webSites = WebServerController.GetWebSites(package.PackageId, false);
|
||||||
|
foreach (WebSite webSite in webSites)
|
||||||
|
{
|
||||||
|
items.Add(user.Username+"|"+user.UserId.ToString()+"|"+package.PackageId.ToString()+"|"+webSite.SiteId+"|"+webSite.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
private static readonly string EXCHANGE_REPORT = "EXCHANGE_REPORT";
|
private static readonly string EXCHANGE_REPORT = "EXCHANGE_REPORT";
|
||||||
private static readonly string ORGANIZATION_REPORT = "ORGANIZATION_REPORT";
|
private static readonly string ORGANIZATION_REPORT = "ORGANIZATION_REPORT";
|
||||||
private static readonly string SHAREPOINT_REPORT = "SHAREPOINT_REPORT";
|
private static readonly string SHAREPOINT_REPORT = "SHAREPOINT_REPORT";
|
||||||
|
private static readonly string LYNC_REPORT = "LYNC_REPORT";
|
||||||
private static readonly string CRM_REPORT = "CRM_REPORT";
|
private static readonly string CRM_REPORT = "CRM_REPORT";
|
||||||
private static readonly string EMAIL = "EMAIL";
|
private static readonly string EMAIL = "EMAIL";
|
||||||
|
|
||||||
|
@ -52,6 +53,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
bool isExchange = Utils.ParseBool(TaskManager.TaskParameters[EXCHANGE_REPORT], false);
|
bool isExchange = Utils.ParseBool(TaskManager.TaskParameters[EXCHANGE_REPORT], false);
|
||||||
bool isSharePoint = Utils.ParseBool(TaskManager.TaskParameters[SHAREPOINT_REPORT], false);
|
bool isSharePoint = Utils.ParseBool(TaskManager.TaskParameters[SHAREPOINT_REPORT], false);
|
||||||
|
bool isLync = Utils.ParseBool(TaskManager.TaskParameters[LYNC_REPORT], false);
|
||||||
bool isCRM = Utils.ParseBool(TaskManager.TaskParameters[CRM_REPORT], false);
|
bool isCRM = Utils.ParseBool(TaskManager.TaskParameters[CRM_REPORT], false);
|
||||||
bool isOrganization = Utils.ParseBool(TaskManager.TaskParameters[ORGANIZATION_REPORT], false);
|
bool isOrganization = Utils.ParseBool(TaskManager.TaskParameters[ORGANIZATION_REPORT], false);
|
||||||
|
|
||||||
|
@ -61,13 +63,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
UserInfo user = PackageController.GetPackageOwner(TaskManager.PackageId);
|
UserInfo user = PackageController.GetPackageOwner(TaskManager.PackageId);
|
||||||
EnterpriseSolutionStatisticsReport report =
|
EnterpriseSolutionStatisticsReport report =
|
||||||
ReportController.GetEnterpriseSolutionStatisticsReport(user.UserId, isExchange, isSharePoint, isCRM,
|
ReportController.GetEnterpriseSolutionStatisticsReport(user.UserId, isExchange, isSharePoint, isCRM,
|
||||||
isOrganization);
|
isOrganization, isLync);
|
||||||
|
|
||||||
|
|
||||||
SendMessage(user, email, isExchange && report.ExchangeReport != null ? report.ExchangeReport.ToCSV() : string.Empty,
|
SendMessage(user, email, isExchange && report.ExchangeReport != null ? report.ExchangeReport.ToCSV() : string.Empty,
|
||||||
isSharePoint && report.SharePointReport != null ? report.SharePointReport.ToCSV() : string.Empty,
|
isSharePoint && report.SharePointReport != null ? report.SharePointReport.ToCSV() : string.Empty,
|
||||||
isCRM && report.CRMReport != null ? report.CRMReport.ToCSV() : string.Empty,
|
isCRM && report.CRMReport != null ? report.CRMReport.ToCSV() : string.Empty,
|
||||||
isOrganization && report.OrganizationReport != null ? report.OrganizationReport.ToCSV() : string.Empty);
|
isOrganization && report.OrganizationReport != null ? report.OrganizationReport.ToCSV() : string.Empty,
|
||||||
|
isLync && report.LyncReport != null ? report.LyncReport.ToCSV() : string.Empty);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -90,11 +93,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendMessage(UserInfo user,string email, string exchange_csv, string sharepoint_csv, string crm_csv, string organization_csv)
|
private void SendMessage(UserInfo user,string email, string exchange_csv, string sharepoint_csv, string crm_csv, string organization_csv, string lync_csv)
|
||||||
{
|
{
|
||||||
List<Attachment> attacments = new List<Attachment>();
|
List<Attachment> attacments = new List<Attachment>();
|
||||||
PrepareAttament("exchange.csv", exchange_csv, attacments);
|
PrepareAttament("exchange.csv", exchange_csv, attacments);
|
||||||
PrepareAttament("sharepoint.csv", sharepoint_csv, attacments);
|
PrepareAttament("sharepoint.csv", sharepoint_csv, attacments);
|
||||||
|
PrepareAttament("lync.csv", lync_csv, attacments);
|
||||||
PrepareAttament("crm.csv", crm_csv, attacments);
|
PrepareAttament("crm.csv", crm_csv, attacments);
|
||||||
PrepareAttament("organization.csv", organization_csv, attacments);
|
PrepareAttament("organization.csv", organization_csv, attacments);
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ using WebsitePanel.Providers.Common;
|
||||||
using WebsitePanel.Providers.DNS;
|
using WebsitePanel.Providers.DNS;
|
||||||
using WebsitePanel.Server;
|
using WebsitePanel.Server;
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
|
using WebsitePanel.Providers.Web;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -988,7 +990,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (startExternalIP.V6 != startInternalIP.V6 && (startExternalIP.V6 != endExternalIP.V6 && endExternalIP != null)) throw new NotSupportedException("All IP addresses must be either V4 or V6.");
|
if (startExternalIP.V6 != startInternalIP.V6 && (startExternalIP.V6 != endExternalIP.V6 && endExternalIP != null)) throw new NotSupportedException("All IP addresses must be either V4 or V6.");
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
long step = (endExternalIP < startExternalIP) ? -1 : 1;
|
long step = ((endExternalIP - startExternalIP) > 0) ? 1 : -1;
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
@ -1602,6 +1604,20 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
DataProvider.GetDomains(SecurityContext.User.UserId, packageId, true));
|
DataProvider.GetDomains(SecurityContext.User.UserId, packageId, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<DomainInfo> GetDomainsByZoneId(int zoneId)
|
||||||
|
{
|
||||||
|
return ObjectUtils.CreateListFromDataSet<DomainInfo>(
|
||||||
|
DataProvider.GetDomainsByZoneId(SecurityContext.User.UserId, zoneId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<DomainInfo> GetDomainsByDomainItemId(int zoneId)
|
||||||
|
{
|
||||||
|
return ObjectUtils.CreateListFromDataSet<DomainInfo>(
|
||||||
|
DataProvider.GetDomainsByDomainItemId(SecurityContext.User.UserId, zoneId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static List<DomainInfo> GetMyDomains(int packageId)
|
public static List<DomainInfo> GetMyDomains(int packageId)
|
||||||
{
|
{
|
||||||
return ObjectUtils.CreateListFromDataSet<DomainInfo>(
|
return ObjectUtils.CreateListFromDataSet<DomainInfo>(
|
||||||
|
@ -1635,13 +1651,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
public static DomainInfo GetDomain(string domainName)
|
public static DomainInfo GetDomain(string domainName)
|
||||||
{
|
{
|
||||||
// get domain by name
|
return ObjectUtils.FillObjectFromDataReader<DomainInfo>(
|
||||||
DomainInfo domain = GetDomainItem(domainName);
|
DataProvider.GetDomainByName(SecurityContext.User.UserId, domainName,false, false));
|
||||||
|
|
||||||
// return
|
|
||||||
return GetDomain(domain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DomainInfo GetDomain(string domainName, bool searchOnDomainPointer, bool isDomainPointer)
|
||||||
|
{
|
||||||
|
return GetDomainItem(domainName, searchOnDomainPointer, isDomainPointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static DomainInfo GetDomain(DomainInfo domain)
|
private static DomainInfo GetDomain(DomainInfo domain)
|
||||||
{
|
{
|
||||||
// check domain
|
// check domain
|
||||||
|
@ -1650,7 +1669,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// get instant alias
|
// get instant alias
|
||||||
domain.InstantAliasName = GetDomainAlias(domain.PackageId, domain.DomainName);
|
domain.InstantAliasName = GetDomainAlias(domain.PackageId, domain.DomainName);
|
||||||
DomainInfo instantAlias = GetDomainItem(domain.InstantAliasName);
|
DomainInfo instantAlias = GetDomainItem(domain.InstantAliasName, true, false);
|
||||||
if (instantAlias != null)
|
if (instantAlias != null)
|
||||||
domain.InstantAliasId = instantAlias.DomainId;
|
domain.InstantAliasId = instantAlias.DomainId;
|
||||||
|
|
||||||
|
@ -1664,9 +1683,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DomainInfo GetDomainItem(string domainName)
|
public static DomainInfo GetDomainItem(string domainName)
|
||||||
|
{
|
||||||
|
return GetDomainItem(domainName, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static DomainInfo GetDomainItem(string domainName, bool searchOnDomainPointer, bool isDomainPointer)
|
||||||
{
|
{
|
||||||
return ObjectUtils.FillObjectFromDataReader<DomainInfo>(
|
return ObjectUtils.FillObjectFromDataReader<DomainInfo>(
|
||||||
DataProvider.GetDomainByName(SecurityContext.User.UserId, domainName));
|
DataProvider.GetDomainByName(SecurityContext.User.UserId, domainName, searchOnDomainPointer, isDomainPointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetDomainAlias(int packageId, string domainName)
|
public static string GetDomainAlias(int packageId, string domainName)
|
||||||
|
@ -1710,6 +1735,26 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
return domainId;
|
return domainId;
|
||||||
|
|
||||||
|
DomainInfo domain = ServerController.GetDomain(domainId);
|
||||||
|
if (domain != null)
|
||||||
|
{
|
||||||
|
if (domain.ZoneItemId != 0)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Os, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Dns, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Ftp, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2000, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2005, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2008, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MsSql2012, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql4, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.MySql5, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.Statistics, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// add instant alias
|
// add instant alias
|
||||||
createInstantAlias &= (domainType != DomainType.DomainPointer);
|
createInstantAlias &= (domainType != DomainType.DomainPointer);
|
||||||
if (createInstantAlias)
|
if (createInstantAlias)
|
||||||
|
@ -1741,7 +1786,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// add web site pointer
|
// add web site pointer
|
||||||
if (webEnabled && pointWebSiteId > 0)
|
if (webEnabled && pointWebSiteId > 0)
|
||||||
{
|
{
|
||||||
WebServerController.AddWebSitePointer(pointWebSiteId, hostName, domainId);
|
WebServerController.AddWebSitePointer(pointWebSiteId, hostName, domainId, true, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add mail domain pointer
|
// add mail domain pointer
|
||||||
|
@ -1770,8 +1815,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// add main domain
|
// add main domain
|
||||||
int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone,
|
int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone,
|
||||||
domain.IsSubDomain, false, domain.IsDomainPointer, false);
|
domain.IsSubDomain, createInstantAlias, domain.IsDomainPointer, false);
|
||||||
|
|
||||||
|
/*
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
return domainId;
|
return domainId;
|
||||||
|
|
||||||
|
@ -1781,6 +1827,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
AddDomainInternal(domain.PackageId, domainAlias, true, false, true, false, false);
|
AddDomainInternal(domain.PackageId, domainAlias, true, false, true, false, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
@ -1800,11 +1847,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
else if (isDomainPointer)
|
else if (isDomainPointer)
|
||||||
{
|
{
|
||||||
// domain pointer
|
// domain pointer
|
||||||
/*
|
//if (PackageController.GetPackageQuota(packageId, Quotas.OS_DOMAINPOINTERS).QuotaExhausted)
|
||||||
if (PackageController.GetPackageQuota(packageId, Quotas.OS_DOMAINPOINTERS).QuotaExhausted)
|
//return BusinessErrorCodes.ERROR_DOMAIN_QUOTA_LIMIT;
|
||||||
return BusinessErrorCodes.ERROR_DOMAIN_QUOTA_LIMIT;
|
}
|
||||||
*/
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// top-level domain
|
// top-level domain
|
||||||
|
@ -1847,7 +1892,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Dns);
|
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Dns);
|
||||||
if (serviceId > 0)
|
if (serviceId > 0)
|
||||||
{
|
{
|
||||||
zoneItemId = DnsServerController.AddZone(packageId, serviceId, domainName);
|
zoneItemId = DnsServerController.AddZone(packageId, serviceId, domainName, true, isInstantAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zoneItemId < 0)
|
if (zoneItemId < 0)
|
||||||
|
@ -1878,6 +1923,116 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
domain.WebSiteId, domain.MailDomainId, domain.IsSubDomain, domain.IsInstantAlias, domain.IsDomainPointer);
|
domain.WebSiteId, domain.MailDomainId, domain.IsSubDomain, domain.IsInstantAlias, domain.IsDomainPointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void AddServiceDNSRecords(int packageId, string groupName, DomainInfo domain, string serviceIP)
|
||||||
|
{
|
||||||
|
AddServiceDNSRecords(packageId, groupName, domain, serviceIP, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddServiceDNSRecords(int packageId, string groupName, DomainInfo domain, string serviceIP, bool wildcardOnly)
|
||||||
|
{
|
||||||
|
int serviceId = PackageController.GetPackageServiceId(packageId, groupName);
|
||||||
|
if (serviceId > 0)
|
||||||
|
{
|
||||||
|
List<DnsRecord> tmpZoneRecords = new List<DnsRecord>();
|
||||||
|
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(serviceId);
|
||||||
|
|
||||||
|
if (wildcardOnly)
|
||||||
|
{
|
||||||
|
List<GlobalDnsRecord> temp = new List<GlobalDnsRecord>();
|
||||||
|
foreach (GlobalDnsRecord d in dnsRecords)
|
||||||
|
{
|
||||||
|
if ((d.RecordName == "*") ||
|
||||||
|
(d.RecordName == "@"))
|
||||||
|
temp.Add(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
dnsRecords = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
DnsZone zone = (DnsZone)PackageController.GetPackageItem(domain.ZoneItemId);
|
||||||
|
tmpZoneRecords.AddRange(DnsServerController.BuildDnsResourceRecords(dnsRecords, "", domain.ZoneName, serviceIP));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DNSServer dns = new DNSServer();
|
||||||
|
ServiceProviderProxy.Init(dns, zone.ServiceId);
|
||||||
|
|
||||||
|
DnsRecord[] domainRecords = dns.GetZoneRecords(domain.DomainName);
|
||||||
|
|
||||||
|
List<DnsRecord> zoneRecords = new List<DnsRecord>();
|
||||||
|
foreach (DnsRecord t in tmpZoneRecords)
|
||||||
|
{
|
||||||
|
if (!RecordDoesExist(t, domainRecords))
|
||||||
|
zoneRecords.Add(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add new resource records
|
||||||
|
dns.AddZoneRecords(zone.Name, zoneRecords.ToArray());
|
||||||
|
}
|
||||||
|
catch (Exception ex1)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex1, "Error updating DNS records");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void RemoveServiceDNSRecords(int packageId, string groupName, DomainInfo domain, string serviceIP, bool wildcardOnly)
|
||||||
|
{
|
||||||
|
int serviceId = PackageController.GetPackageServiceId(packageId, groupName);
|
||||||
|
if (serviceId > 0)
|
||||||
|
{
|
||||||
|
List<DnsRecord> zoneRecords = new List<DnsRecord>();
|
||||||
|
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(serviceId);
|
||||||
|
if (wildcardOnly)
|
||||||
|
{
|
||||||
|
List<GlobalDnsRecord> temp = new List<GlobalDnsRecord>();
|
||||||
|
foreach (GlobalDnsRecord d in dnsRecords)
|
||||||
|
{
|
||||||
|
if ((d.RecordName == "*") ||
|
||||||
|
(d.RecordName == "@"))
|
||||||
|
temp.Add(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
dnsRecords = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
DnsZone zone = (DnsZone)PackageController.GetPackageItem(domain.ZoneItemId);
|
||||||
|
zoneRecords.AddRange(DnsServerController.BuildDnsResourceRecords(dnsRecords, "", domain.ZoneName, serviceIP));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DNSServer dns = new DNSServer();
|
||||||
|
ServiceProviderProxy.Init(dns, zone.ServiceId);
|
||||||
|
|
||||||
|
// add new resource records
|
||||||
|
dns.DeleteZoneRecords(zone.Name, zoneRecords.ToArray());
|
||||||
|
}
|
||||||
|
catch (Exception ex1)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex1, "Error updating DNS records");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static bool RecordDoesExist(DnsRecord record, DnsRecord[] domainRecords)
|
||||||
|
{
|
||||||
|
foreach (DnsRecord d in domainRecords)
|
||||||
|
{
|
||||||
|
if ((record.RecordName.ToLower() == d.RecordName.ToLower()) &
|
||||||
|
(record.RecordType == d.RecordType))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int UpdateDomain(DomainInfo domain)
|
public static int UpdateDomain(DomainInfo domain)
|
||||||
{
|
{
|
||||||
// check account
|
// check account
|
||||||
|
@ -1893,7 +2048,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
DataProvider.UpdateDomain(SecurityContext.User.UserId,
|
DataProvider.UpdateDomain(SecurityContext.User.UserId,
|
||||||
domain.DomainId, domain.ZoneItemId, domain.HostingAllowed, domain.WebSiteId,
|
domain.DomainId, domain.ZoneItemId, domain.HostingAllowed, domain.WebSiteId,
|
||||||
domain.MailDomainId);
|
domain.MailDomainId, domain.DomainItemId);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1915,6 +2070,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// load domain
|
// load domain
|
||||||
DomainInfo domain = GetDomain(domainId);
|
DomainInfo domain = GetDomain(domainId);
|
||||||
|
if (domain == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName);
|
TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName);
|
||||||
|
@ -1941,6 +2098,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE;
|
return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<DomainInfo> domains = GetDomainsByDomainItemId(domain.DomainId);
|
||||||
|
foreach (DomainInfo d in domains)
|
||||||
|
{
|
||||||
|
if (d.WebSiteId > 0)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError("Domain points to the existing web site");
|
||||||
|
return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// remove DNS zone meta-item if required
|
// remove DNS zone meta-item if required
|
||||||
if (domain.ZoneItemId > 0)
|
if (domain.ZoneItemId > 0)
|
||||||
{
|
{
|
||||||
|
@ -1970,6 +2139,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// load domain
|
// load domain
|
||||||
DomainInfo domain = GetDomain(domainId);
|
DomainInfo domain = GetDomain(domainId);
|
||||||
|
if (domain == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("DOMAIN", "DELETE", domain.DomainName);
|
TaskManager.StartTask("DOMAIN", "DELETE", domain.DomainName);
|
||||||
|
@ -1996,6 +2167,21 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE;
|
return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!domain.IsDomainPointer)
|
||||||
|
{
|
||||||
|
List<DomainInfo> domains = GetDomainsByDomainItemId(domain.DomainId);
|
||||||
|
foreach (DomainInfo d in domains)
|
||||||
|
{
|
||||||
|
if (d.WebSiteId > 0)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError("Domain points to the existing web site");
|
||||||
|
return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// delete instant alias
|
// delete instant alias
|
||||||
if (domain.InstantAliasId > 0)
|
if (domain.InstantAliasId > 0)
|
||||||
{
|
{
|
||||||
|
@ -2106,6 +2292,143 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// update domain
|
// update domain
|
||||||
domain.ZoneItemId = zoneItemId;
|
domain.ZoneItemId = zoneItemId;
|
||||||
UpdateDomain(domain);
|
UpdateDomain(domain);
|
||||||
|
|
||||||
|
domain = GetDomain(domainId);
|
||||||
|
|
||||||
|
|
||||||
|
PackageContext cntx = PackageController.GetPackageContext(domain.PackageId);
|
||||||
|
if (cntx != null)
|
||||||
|
{
|
||||||
|
// fill dictionaries
|
||||||
|
foreach (HostingPlanGroupInfo group in cntx.GroupsArray)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bool bFound = false;
|
||||||
|
switch (group.GroupName)
|
||||||
|
{
|
||||||
|
case ResourceGroups.Dns:
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Ftp, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MsSql2000, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MsSql2005, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MsSql2008, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MsSql2012, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MySql4, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.MySql5, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Statistics, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.VPS, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.VPSForPC, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Dns, domain, "");
|
||||||
|
break;
|
||||||
|
case ResourceGroups.Os:
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Os, domain, "");
|
||||||
|
break;
|
||||||
|
case ResourceGroups.HostedOrganizations:
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.HostedOrganizations, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.HostedCRM, domain, "");
|
||||||
|
break;
|
||||||
|
case ResourceGroups.Mail:
|
||||||
|
List<DomainInfo> myDomains = ServerController.GetMyDomains(domain.PackageId);
|
||||||
|
foreach (DomainInfo mailDomain in myDomains)
|
||||||
|
{
|
||||||
|
if ((mailDomain.MailDomainId != 0) && (domain.DomainName.ToLower() == mailDomain.DomainName.ToLower()))
|
||||||
|
{
|
||||||
|
bFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bFound) ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Mail, domain, "");
|
||||||
|
break;
|
||||||
|
case ResourceGroups.Exchange:
|
||||||
|
List<Organization> orgs = OrganizationController.GetOrganizations(domain.PackageId, false);
|
||||||
|
foreach (Organization o in orgs)
|
||||||
|
{
|
||||||
|
List<OrganizationDomainName> names = OrganizationController.GetOrganizationDomains(o.Id);
|
||||||
|
foreach (OrganizationDomainName name in names)
|
||||||
|
{
|
||||||
|
if (domain.DomainName.ToLower() == name.DomainName.ToLower())
|
||||||
|
{
|
||||||
|
bFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bFound) break;
|
||||||
|
}
|
||||||
|
if (bFound)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Exchange, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.BlackBerry, domain, "");
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.OCS, domain, "");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ResourceGroups.Lync:
|
||||||
|
List<Organization> orgsLync = OrganizationController.GetOrganizations(domain.PackageId, false);
|
||||||
|
foreach (Organization o in orgsLync)
|
||||||
|
{
|
||||||
|
if ((o.DefaultDomain.ToLower() == domain.DomainName.ToLower()) &
|
||||||
|
(o.LyncTenantId != null))
|
||||||
|
{
|
||||||
|
bFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bFound)
|
||||||
|
{
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Lync, domain, "");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ResourceGroups.Web:
|
||||||
|
List<WebSite> sites = WebServerController.GetWebSites(domain.PackageId, false);
|
||||||
|
foreach (WebSite w in sites)
|
||||||
|
{
|
||||||
|
if ((w.SiteId.ToLower().Replace("." + domain.DomainName.ToLower(), "").IndexOf('.') == -1) ||
|
||||||
|
(w.SiteId.ToLower() == domain.DomainName.ToLower()))
|
||||||
|
{
|
||||||
|
WebServerController.AddWebSitePointer( w.Id,
|
||||||
|
(w.SiteId.ToLower() == domain.DomainName.ToLower()) ? "" : w.SiteId.ToLower().Replace("." + domain.DomainName.ToLower(), ""),
|
||||||
|
domain.DomainId, false, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DomainInfo> pointers = WebServerController.GetWebSitePointers(w.Id);
|
||||||
|
foreach (DomainInfo pointer in pointers)
|
||||||
|
{
|
||||||
|
if ((pointer.DomainName.ToLower().Replace("." + domain.DomainName.ToLower(), "").IndexOf('.') == -1)||
|
||||||
|
(pointer.DomainName.ToLower() == domain.DomainName.ToLower()))
|
||||||
|
{
|
||||||
|
WebServerController.AddWebSitePointer( w.Id,
|
||||||
|
(pointer.DomainName.ToLower() == domain.DomainName.ToLower()) ? "" : pointer.DomainName.ToLower().Replace("." + domain.DomainName.ToLower(), ""),
|
||||||
|
domain.DomainId, false, true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sites.Count == 1)
|
||||||
|
{
|
||||||
|
// load site item
|
||||||
|
IPAddressInfo ip = ServerController.GetIPAddress(sites[0].SiteIPAddressId);
|
||||||
|
|
||||||
|
string serviceIp = (ip != null) ? ip.ExternalIP : null;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(serviceIp))
|
||||||
|
{
|
||||||
|
StringDictionary settings = ServerController.GetServiceSettings(sites[0].ServiceId);
|
||||||
|
if (settings["PublicSharedIP"] != null)
|
||||||
|
serviceIp = settings["PublicSharedIP"].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
ServerController.AddServiceDNSRecords(domain.PackageId, ResourceGroups.Web, domain, serviceIp, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add web site DNS records
|
// add web site DNS records
|
||||||
|
@ -2172,22 +2495,46 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
instantAlias = GetDomainItem(instantAliasId);
|
instantAlias = GetDomainItem(instantAliasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add web site pointer if required
|
string parentZone = domain.ZoneName;
|
||||||
if (domain.WebSiteId > 0 && instantAlias.WebSiteId == 0)
|
if (string.IsNullOrEmpty(parentZone))
|
||||||
{
|
{
|
||||||
int webRes = WebServerController.AddWebSitePointer(domain.WebSiteId, hostName, domainId);
|
DomainInfo parentDomain = GetDomain(domain.DomainId);
|
||||||
if (webRes < 0)
|
parentZone = parentDomain.DomainName;
|
||||||
return webRes;
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (domain.WebSiteId > 0)
|
||||||
|
{
|
||||||
|
WebServerController.AddWebSitePointer(domain.WebSiteId,
|
||||||
|
((domain.DomainName.Replace("." + parentZone, "") == parentZone) |
|
||||||
|
(domain.DomainName == parentZone))
|
||||||
|
? "" : domain.DomainName.Replace("." + parentZone, ""),
|
||||||
|
instantAlias.DomainId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add web site pointer if required
|
||||||
|
List<DomainInfo> domains = GetDomainsByDomainItemId(domain.DomainId);
|
||||||
|
foreach (DomainInfo d in domains)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (d.WebSiteId > 0)
|
||||||
|
{
|
||||||
|
WebServerController.AddWebSitePointer(d.WebSiteId,
|
||||||
|
((d.DomainName.Replace("." + parentZone, "") == parentZone) |
|
||||||
|
(d.DomainName == parentZone))
|
||||||
|
? "" : d.DomainName.Replace("." + parentZone, ""),
|
||||||
|
instantAlias.DomainId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add mail domain pointer
|
||||||
|
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
|
||||||
|
{
|
||||||
|
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);
|
||||||
|
if (mailRes < 0)
|
||||||
|
return mailRes;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
// add mail domain pointer
|
|
||||||
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
|
|
||||||
{
|
|
||||||
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);
|
|
||||||
if (mailRes < 0)
|
|
||||||
return mailRes;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2209,6 +2556,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// load domain
|
// load domain
|
||||||
DomainInfo domain = GetDomain(domainId);
|
DomainInfo domain = GetDomain(domainId);
|
||||||
|
if (domain == null)
|
||||||
|
return 0;
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("DOMAIN", "DELETE_INSTANT_ALIAS", domain.DomainName);
|
TaskManager.StartTask("DOMAIN", "DELETE_INSTANT_ALIAS", domain.DomainName);
|
||||||
|
@ -2217,7 +2566,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// load instant alias domain
|
// load instant alias domain
|
||||||
DomainInfo instantAlias = GetDomainItem(domain.InstantAliasName);
|
DomainInfo instantAlias = GetDomainItem(domain.InstantAliasName, true, false);
|
||||||
if (instantAlias == null)
|
if (instantAlias == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -2228,15 +2577,24 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (webRes < 0)
|
if (webRes < 0)
|
||||||
return webRes;
|
return webRes;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
// remove from mail domain pointers
|
List<DomainInfo> domains = GetDomainsByDomainItemId(instantAlias.DomainId);
|
||||||
if (instantAlias.MailDomainId > 0)
|
|
||||||
{
|
foreach (DomainInfo d in domains)
|
||||||
int mailRes = MailServerController.DeleteMailDomainPointer(instantAlias.MailDomainId, instantAlias.DomainId);
|
{
|
||||||
if (mailRes < 0)
|
if (d.WebSiteId > 0)
|
||||||
return mailRes;
|
{
|
||||||
}
|
WebServerController.DeleteWebSitePointer(d.WebSiteId, d.DomainId);
|
||||||
*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove from mail domain pointers
|
||||||
|
if (instantAlias.MailDomainId > 0)
|
||||||
|
{
|
||||||
|
int mailRes = MailServerController.DeleteMailDomainPointer(instantAlias.MailDomainId, instantAlias.DomainId);
|
||||||
|
if (mailRes < 0)
|
||||||
|
return mailRes;
|
||||||
|
}
|
||||||
|
|
||||||
// delete instant alias
|
// delete instant alias
|
||||||
int res = DeleteDomain(instantAlias.DomainId);
|
int res = DeleteDomain(instantAlias.DomainId);
|
||||||
|
|
|
@ -331,27 +331,13 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
|
||||||
string hostName = tmpStr[0];
|
string hostName = tmpStr[0];
|
||||||
string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1));
|
string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1));
|
||||||
|
|
||||||
DomainInfo domain = ServerController.GetDomain(domainName);
|
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(serviceId);
|
||||||
if (domain != null)
|
List<DnsRecord> resourceRecords = DnsServerController.BuildDnsResourceRecords(dnsRecords, hostName, domainName, "");
|
||||||
{
|
DNSServer dns = new DNSServer();
|
||||||
string website = siteName;
|
|
||||||
|
|
||||||
DnsRecord[] records = ServerController.GetDnsZoneRecords(domain.DomainId);
|
ServiceProviderProxy.Init(dns, dnsServiceId);
|
||||||
foreach (DnsRecord record in records)
|
// add new resource records
|
||||||
{
|
dns.AddZoneRecords(domainName, resourceRecords.ToArray());
|
||||||
var type = record.RecordType;
|
|
||||||
if ((type == DnsRecordType.A || type == DnsRecordType.AAAA) && String.IsNullOrEmpty(record.RecordName))
|
|
||||||
{
|
|
||||||
ServerController.DeleteDnsZoneRecord(domain.DomainId, String.Empty, type, record.RecordData);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerController.AddDnsZoneRecord(domain.DomainId, hostName, DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"], 0, 0, 0, 0);
|
|
||||||
var ip = hostedSharePointSettings["RootWebApplicationIpAddress"];
|
|
||||||
var type2 = ip.Contains(":") ? DnsRecordType.AAAA : DnsRecordType.A;
|
|
||||||
ServerController.AddDnsZoneRecord(domain.DomainId, String.Empty, type2, ip, 0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskManager.ItemId = itemId;
|
TaskManager.ItemId = itemId;
|
||||||
|
@ -412,27 +398,13 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint
|
||||||
string hostName = tmpStr[0];
|
string hostName = tmpStr[0];
|
||||||
string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1));
|
string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1));
|
||||||
|
|
||||||
DomainInfo domain = ServerController.GetDomain(domainName);
|
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(origItem.ServiceId);
|
||||||
if (domain != null)
|
List<DnsRecord> resourceRecords = DnsServerController.BuildDnsResourceRecords(dnsRecords, hostName, domainName, "");
|
||||||
{
|
DNSServer dns = new DNSServer();
|
||||||
var ip = hostedSharePointSettings["RootWebApplicationIpAddress"];
|
|
||||||
var type = ip.Contains(":") ? DnsRecordType.AAAA : DnsRecordType.A;
|
ServiceProviderProxy.Init(dns, dnsServiceId);
|
||||||
ServerController.DeleteDnsZoneRecord(domain.DomainId, String.Empty, type, ip);
|
// add new resource records
|
||||||
ServerController.DeleteDnsZoneRecord(domain.DomainId, "www", type, ip);
|
dns.DeleteZoneRecords(domainName, resourceRecords.ToArray());
|
||||||
if (!String.IsNullOrEmpty(domain.WebSiteName))
|
|
||||||
{
|
|
||||||
DnsRecord[] records = ServerController.GetDnsZoneRecords(domain.DomainId);
|
|
||||||
foreach (DnsRecord record in records)
|
|
||||||
{
|
|
||||||
type = record.RecordType;
|
|
||||||
if ((type == DnsRecordType.A || type == DnsRecordType.AAAA) && record.RecordName.Equals("www", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
ServerController.AddDnsZoneRecord(domain.DomainId, String.Empty, DnsRecordType.A, record.RecordData, 0, 0, 0, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -228,7 +228,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
"sp_dropsrvrolemember '{0}', 'dbcreator'\nGO", dbUser.Name));
|
"sp_dropsrvrolemember '{0}', 'dbcreator'\nGO", dbUser.Name));
|
||||||
|
|
||||||
// restore original web site bindings
|
// restore original web site bindings
|
||||||
web.UpdateSiteBindings(site.SiteId, bindings);
|
web.UpdateSiteBindings(site.SiteId, bindings, false);
|
||||||
|
|
||||||
// save statistics item
|
// save statistics item
|
||||||
item.ServiceId = serviceId;
|
item.ServiceId = serviceId;
|
||||||
|
|
|
@ -398,12 +398,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public static Dictionary<int, BackgroundTask> GetScheduledTasks()
|
public static Dictionary<int, BackgroundTask> GetScheduledTasks()
|
||||||
{
|
{
|
||||||
Dictionary<int, BackgroundTask> scheduledTasks = new Dictionary<int, BackgroundTask>();
|
Dictionary<int, BackgroundTask> scheduledTasks = new Dictionary<int, BackgroundTask>();
|
||||||
foreach (BackgroundTask task in tasks.Values)
|
try
|
||||||
|
{
|
||||||
|
foreach (BackgroundTask task in tasks.Values)
|
||||||
|
{
|
||||||
|
if (task.ScheduleId > 0
|
||||||
|
&& !task.Completed
|
||||||
|
&& !scheduledTasks.ContainsKey(task.ScheduleId))
|
||||||
|
scheduledTasks.Add(task.ScheduleId, task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
if (task.ScheduleId > 0
|
|
||||||
&& !task.Completed
|
|
||||||
&& !scheduledTasks.ContainsKey(task.ScheduleId))
|
|
||||||
scheduledTasks.Add(task.ScheduleId, task);
|
|
||||||
}
|
}
|
||||||
return scheduledTasks;
|
return scheduledTasks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ using WebsitePanel.Providers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -2991,6 +2992,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
public static ResultObject AddVirtualMachinePrivateIPAddresses(int itemId, bool selectRandom, int addressesNumber, string[] addresses, bool provisionKvp)
|
public static ResultObject AddVirtualMachinePrivateIPAddresses(int itemId, bool selectRandom, int addressesNumber, string[] addresses, bool provisionKvp)
|
||||||
{
|
{
|
||||||
|
// trace info
|
||||||
|
Trace.TraceInformation("Entering AddVirtualMachinePrivateIPAddresses()");
|
||||||
|
Trace.TraceInformation("Item ID: {0}", itemId);
|
||||||
|
Trace.TraceInformation("SelectRandom: {0}", selectRandom);
|
||||||
|
Trace.TraceInformation("AddressesNumber: {0}", addressesNumber);
|
||||||
|
|
||||||
|
if (addresses != null)
|
||||||
|
{
|
||||||
|
foreach(var address in addresses)
|
||||||
|
Trace.TraceInformation("addresses[n]: {0}", address);
|
||||||
|
}
|
||||||
|
|
||||||
ResultObject res = new ResultObject();
|
ResultObject res = new ResultObject();
|
||||||
|
|
||||||
// load service item
|
// load service item
|
||||||
|
@ -3026,6 +3039,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
bool wasEmptyList = (nic.IPAddresses.Length == 0);
|
bool wasEmptyList = (nic.IPAddresses.Length == 0);
|
||||||
|
|
||||||
|
if(wasEmptyList)
|
||||||
|
Trace.TraceInformation("NIC IP addresses list is empty");
|
||||||
|
|
||||||
// check IP addresses if they are specified
|
// check IP addresses if they are specified
|
||||||
List<string> checkResults = CheckPrivateIPAddresses(vm.PackageId, addresses);
|
List<string> checkResults = CheckPrivateIPAddresses(vm.PackageId, addresses);
|
||||||
if (checkResults.Count > 0)
|
if (checkResults.Count > 0)
|
||||||
|
@ -3213,51 +3229,69 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
private static string GenerateNextAvailablePrivateIP(SortedList<IPAddress, string> ips, string subnetMask, string startIPAddress)
|
private static string GenerateNextAvailablePrivateIP(SortedList<IPAddress, string> ips, string subnetMask, string startIPAddress)
|
||||||
{
|
{
|
||||||
// start IP address
|
Trace.TraceInformation("Entering GenerateNextAvailablePrivateIP()");
|
||||||
var startIp = IPAddress.Parse(startIPAddress);
|
Trace.TraceInformation("Param - number of sorted IPs in the list: {0}", ips.Count);
|
||||||
var mask = IPAddress.Parse(subnetMask);
|
Trace.TraceInformation("Param - startIPAddress: {0}", startIPAddress);
|
||||||
|
Trace.TraceInformation("Param - subnetMask: {0}", subnetMask);
|
||||||
|
|
||||||
var lastAddress = (startIp & ~mask) - 1;
|
// start IP address
|
||||||
|
var ip = IPAddress.Parse(startIPAddress) - 1;
|
||||||
|
|
||||||
|
Trace.TraceInformation("Start looking for next available IP");
|
||||||
foreach (var addr in ips.Keys)
|
foreach (var addr in ips.Keys)
|
||||||
{
|
{
|
||||||
if ((addr - lastAddress) > 1)
|
if ((addr - ip) > 1)
|
||||||
{
|
{
|
||||||
// it is a gap
|
// it is a gap
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lastAddress = addr;
|
ip = addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var genAddr = lastAddress + 1;
|
// final IP found
|
||||||
|
ip = ip + 1;
|
||||||
|
|
||||||
// convert to IP address
|
|
||||||
var ip = startIp & mask | genAddr;
|
|
||||||
string genIP = ip.ToString();
|
string genIP = ip.ToString();
|
||||||
|
Trace.TraceInformation("Generated IP: {0}", genIP);
|
||||||
|
|
||||||
// store in cache
|
// store in cache
|
||||||
ips.Add(genAddr, genIP);
|
Trace.TraceInformation("Adding to sorted list");
|
||||||
|
ips.Add(ip, genIP);
|
||||||
|
|
||||||
|
Trace.TraceInformation("Leaving GenerateNextAvailablePrivateIP()");
|
||||||
return genIP;
|
return genIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SortedList<IPAddress, string> GetSortedNormalizedIPAddresses(List<PrivateIPAddress> ips, string subnetMask)
|
private static SortedList<IPAddress, string> GetSortedNormalizedIPAddresses(List<PrivateIPAddress> ips, string subnetMask)
|
||||||
{
|
{
|
||||||
|
Trace.TraceInformation("Entering GetSortedNormalizedIPAddresses()");
|
||||||
|
Trace.TraceInformation("Param - subnetMask: {0}", subnetMask);
|
||||||
|
|
||||||
var mask = IPAddress.Parse(subnetMask);
|
var mask = IPAddress.Parse(subnetMask);
|
||||||
SortedList<IPAddress, string> sortedIps = new SortedList<IPAddress, string>();
|
SortedList<IPAddress, string> sortedIps = new SortedList<IPAddress, string>();
|
||||||
foreach (PrivateIPAddress ip in ips)
|
foreach (PrivateIPAddress ip in ips)
|
||||||
{
|
{
|
||||||
var addr = ~mask & IPAddress.Parse(ip.IPAddress);
|
var addr = IPAddress.Parse(ip.IPAddress);
|
||||||
sortedIps.Add(addr, ip.IPAddress);
|
sortedIps.Add(addr, ip.IPAddress);
|
||||||
|
|
||||||
|
Trace.TraceInformation("Added {0} to sorted IPs list with key: {1} ", ip.IPAddress, addr.ToString());
|
||||||
}
|
}
|
||||||
|
Trace.TraceInformation("Leaving GetSortedNormalizedIPAddresses()");
|
||||||
return sortedIps;
|
return sortedIps;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetPrivateNetworkSubnetMask(string cidr, bool v6) {
|
private static string GetPrivateNetworkSubnetMask(string cidr, bool v6) {
|
||||||
if (v6) return "/" + cidr;
|
if (v6)
|
||||||
else return IPAddress.Parse("/" + cidr).ToV4MaskString();
|
{
|
||||||
|
return "/" + cidr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return IPAddress.Parse("/" + cidr).ToV4MaskString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetSubnetMaskCidr(string subnetMask) {
|
private static string GetSubnetMaskCidr(string subnetMask) {
|
||||||
|
@ -3266,7 +3300,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var ip = IPAddress.Parse(subnetMask);
|
var ip = IPAddress.Parse(subnetMask);
|
||||||
if (ip.V4) {
|
if (ip.V4) {
|
||||||
int cidr = 32;
|
int cidr = 32;
|
||||||
long mask = (long)ip.Address;
|
var mask = ip.Address;
|
||||||
while ((mask & 1) == 0 && cidr > 0) {
|
while ((mask & 1) == 0 && cidr > 0) {
|
||||||
mask >>= 1;
|
mask >>= 1;
|
||||||
cidr -= 1;
|
cidr -= 1;
|
||||||
|
@ -3282,7 +3316,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var mask = IPAddress.Parse(subnetMask);
|
var mask = IPAddress.Parse(subnetMask);
|
||||||
var ip = IPAddress.Parse(ipAddress);
|
var ip = IPAddress.Parse(ipAddress);
|
||||||
|
|
||||||
return ((mask & ip) == mask);
|
//return ((mask & ip) == mask);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -3778,7 +3778,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
ret = vs.GetDeviceEvents(serviceInfo.ServerName, serviceProviderItem.Name);
|
ret = vs.GetDeviceEvents(serviceInfo.ServerName, serviceProviderItem.Name);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception )
|
||||||
{
|
{
|
||||||
ret = null;
|
ret = null;
|
||||||
}
|
}
|
||||||
|
@ -3804,7 +3804,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
ret = vs.GetMonitoringAlerts(serviceInfo.ServerName, serviceProviderItem.Name);
|
ret = vs.GetMonitoringAlerts(serviceInfo.ServerName, serviceProviderItem.Name);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception )
|
||||||
{
|
{
|
||||||
ret = null;
|
ret = null;
|
||||||
}
|
}
|
||||||
|
@ -3832,7 +3832,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
ret = vs.GetPerfomanceValue(serviceProviderItem.Name, perf, startPeriod, endPeriod);
|
ret = vs.GetPerfomanceValue(serviceProviderItem.Name, perf, startPeriod, endPeriod);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception )
|
||||||
{
|
{
|
||||||
ret = null;
|
ret = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
WebServer webServer = GetAssociatedWebServer(packageId);
|
WebServer webServer = GetAssociatedWebServer(packageId);
|
||||||
|
|
||||||
if (!webServer.IsMsDeployInstalled())
|
if (!webServer.IsMsDeployInstalled())
|
||||||
|
{
|
||||||
|
TaskManager.WriteError("MsDeploy is not installed");
|
||||||
return Error<GalleryCategoriesResult>(GalleryErrors.MsDeployIsNotInstalled);
|
return Error<GalleryCategoriesResult>(GalleryErrors.MsDeployIsNotInstalled);
|
||||||
|
}
|
||||||
|
|
||||||
// get categories
|
// get categories
|
||||||
result = webServer.GetGalleryCategories(SecurityContext.User.UserId);
|
result = webServer.GetGalleryCategories(SecurityContext.User.UserId);
|
||||||
|
@ -270,6 +273,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// x => MatchGalleryAppDependencies(x.Dependency, appsFilter.ToArray())
|
// x => MatchGalleryAppDependencies(x.Dependency, appsFilter.ToArray())
|
||||||
// || MatchMenaltoGalleryApp(x, appsFilter.ToArray())));
|
// || MatchMenaltoGalleryApp(x, appsFilter.ToArray())));
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
FilterResultApplications(packageId, result);
|
FilterResultApplications(packageId, result);
|
||||||
|
|
||||||
|
@ -293,14 +297,33 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int userId = SecurityContext.User.UserId;
|
int userId = SecurityContext.User.UserId;
|
||||||
//
|
//
|
||||||
SecurityContext.SetThreadSupervisorPrincipal();
|
SecurityContext.SetThreadSupervisorPrincipal();
|
||||||
|
|
||||||
|
//get filter mode
|
||||||
|
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Web);
|
||||||
|
StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId);
|
||||||
|
bool bExclude = (Utils.ParseInt(serviceSettings["GalleryAppsFilterMode"], 0) != 1); //0 - Exclude apps, 1- Include apps
|
||||||
|
|
||||||
//
|
//
|
||||||
string[] filteredApps = GetServiceAppsCatalogFilter(packageId);
|
string[] filteredApps = GetServiceAppsCatalogFilter(packageId);
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (filteredApps != null)
|
if (filteredApps != null)
|
||||||
{
|
{
|
||||||
result.Value = new List<GalleryApplication>(Array.FindAll(result.Value.ToArray(),
|
if (bExclude)
|
||||||
x => !Array.Exists(filteredApps,
|
{
|
||||||
z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase))));
|
result.Value = new List<GalleryApplication>(Array.FindAll(result.Value.ToArray(),
|
||||||
|
x => !Array.Exists(filteredApps,
|
||||||
|
z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase))));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Value = new List<GalleryApplication>(Array.FindAll(result.Value.ToArray(),
|
||||||
|
x => Array.Exists(filteredApps,
|
||||||
|
z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase))));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
SecurityContext.SetThreadPrincipal(userId);
|
SecurityContext.SetThreadPrincipal(userId);
|
||||||
|
@ -487,6 +510,19 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|| context.Groups.ContainsKey(ResourceGroups.MySql5)))
|
|| context.Groups.ContainsKey(ResourceGroups.MySql5)))
|
||||||
result.ErrorCodes.Add(GalleryErrors.MySQLRequired);
|
result.ErrorCodes.Add(GalleryErrors.MySQLRequired);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//show Dependency warning optionaly
|
||||||
|
int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Web);
|
||||||
|
StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId);
|
||||||
|
|
||||||
|
bool galleryAppsAlwaysIgnoreDependencies = Utils.ParseBool(serviceSettings["GalleryAppsAlwaysIgnoreDependencies"], false);
|
||||||
|
|
||||||
|
if (galleryAppsAlwaysIgnoreDependencies)
|
||||||
|
{
|
||||||
|
result.ErrorCodes.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (result.ErrorCodes.Count > 0)
|
if (result.ErrorCodes.Count > 0)
|
||||||
{
|
{
|
||||||
GalleryApplicationResult warning = Warning<GalleryApplicationResult>(result, GalleryErrors.PackageDoesNotMeetRequirements);
|
GalleryApplicationResult warning = Warning<GalleryApplicationResult>(result, GalleryErrors.PackageDoesNotMeetRequirements);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -49,9 +49,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
litUrl.Text = url.Substring(0, url.LastIndexOf("/"));
|
litUrl.Text = url.Substring(0, url.LastIndexOf("/"));
|
||||||
|
|
||||||
// set version
|
// set version
|
||||||
object[] attrs = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), true);
|
object[] attrs = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true);
|
||||||
if (attrs.Length > 0)
|
if (attrs.Length > 0)
|
||||||
litVersion.Text = ((AssemblyInformationalVersionAttribute)attrs[0]).InformationalVersion;
|
litVersion.Text = ((AssemblyFileVersionAttribute)attrs[0]).Version;
|
||||||
|
|
||||||
imgLogo.ImageUrl = Page.ClientScript.GetWebResourceUrl(
|
imgLogo.ImageUrl = Page.ClientScript.GetWebResourceUrl(
|
||||||
typeof(DefaultPage), "WebsitePanel.EnterpriseServer.Images.logo.png");
|
typeof(DefaultPage), "WebsitePanel.EnterpriseServer.Images.logo.png");
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
@ -5,7 +5,7 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- Connection strings -->
|
<!-- Connection strings -->
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=WebsitePanel;pwd=Password12" providerName="System.Data.SqlClient" />
|
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!-- Encryption util settings -->
|
<!-- Encryption util settings -->
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
</UpgradeBackupLocation>
|
</UpgradeBackupLocation>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
|
<UseIISExpress>false</UseIISExpress>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
@ -410,6 +411,9 @@
|
||||||
<Content Include="esWebApplicationGallery.asmx" />
|
<Content Include="esWebApplicationGallery.asmx" />
|
||||||
<EmbeddedResource Include="Images\logo.png" />
|
<EmbeddedResource Include="Images\logo.png" />
|
||||||
<Content Include="SystemEventHandlers.config" />
|
<Content Include="SystemEventHandlers.config" />
|
||||||
|
<Content Include="Web6.config">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
<None Include="TaskEventHandlers.config" />
|
<None Include="TaskEventHandlers.config" />
|
||||||
<None Include="WsePolicyCache.Config" />
|
<None Include="WsePolicyCache.Config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -430,7 +434,7 @@
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
<WebProjectProperties>
|
<WebProjectProperties>
|
||||||
<UseIIS>True</UseIIS>
|
<UseIIS>False</UseIIS>
|
||||||
<AutoAssignPort>False</AutoAssignPort>
|
<AutoAssignPort>False</AutoAssignPort>
|
||||||
<DevelopmentServerPort>9002</DevelopmentServerPort>
|
<DevelopmentServerPort>9002</DevelopmentServerPort>
|
||||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows)
|
public LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
return LyncController.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, maximumRows);
|
return LyncController.GetLyncUsersPaged(itemId, sortColumn, sortDirection, startRow, maximumRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
|
@ -119,6 +119,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return LyncController.GetLyncUserGeneralSettings(itemId, accountId);
|
return LyncController.GetLyncUserGeneralSettings(itemId, accountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public LyncUserResult SetLyncUserGeneralSettings(int itemId, int accountId, string sipAddress, string lineUri)
|
||||||
|
{
|
||||||
|
return LyncController.SetLyncUserGeneralSettings(itemId, accountId, sipAddress, lineUri);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId)
|
public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,9 +46,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
#region Organizations
|
#region Organizations
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public int CreateOrganization(int packageId, string organizationID, string organizationName)
|
public int CreateOrganization(int packageId, string organizationID, string organizationName, string domainName)
|
||||||
{
|
{
|
||||||
return OrganizationController.CreateOrganization(packageId, organizationID, organizationName);
|
return OrganizationController.CreateOrganization(packageId, organizationID, organizationName, domainName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +122,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return OrganizationController.AddOrganizationDomain(itemId, domainName);
|
return OrganizationController.AddOrganizationDomain(itemId, domainName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public int ChangeOrganizationDomainType(int itemId, int domainId, ExchangeAcceptedDomainType newDomainType)
|
||||||
|
{
|
||||||
|
return OrganizationController.ChangeOrganizationDomainType(itemId, domainId, newDomainType);
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<OrganizationDomainName> GetOrganizationDomains(int itemId)
|
public List<OrganizationDomainName> GetOrganizationDomains(int itemId)
|
||||||
{
|
{
|
||||||
|
@ -189,6 +195,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit)
|
||||||
|
{
|
||||||
|
return OrganizationController.SetUserPrincipalName(itemId, accountId, userPrincipalName,
|
||||||
|
inherit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public int SetUserPassword(int itemId, int accountId, string password)
|
||||||
|
{
|
||||||
|
return OrganizationController.SetUserPassword(itemId, accountId, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<OrganizationUser> SearchAccounts(int itemId,
|
public List<OrganizationUser> SearchAccounts(int itemId,
|
||||||
string filterColumn, string filterValue, string sortColumn, bool includeMailboxes)
|
string filterColumn, string filterValue, string sortColumn, bool includeMailboxes)
|
||||||
|
|
|
@ -518,6 +518,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return ServerController.GetDomains(packageId);
|
return ServerController.GetDomains(packageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public List<DomainInfo> GetDomainsByDomainId(int domainId)
|
||||||
|
{
|
||||||
|
return ServerController.GetDomainsByDomainItemId(domainId);
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<DomainInfo> GetMyDomains(int packageId)
|
public List<DomainInfo> GetMyDomains(int packageId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
foreach (DirectoryEntry child in entry.Children)
|
foreach (DirectoryEntry child in entry.Children)
|
||||||
{
|
{
|
||||||
entry.Children.Remove(child);
|
//entry.Children.Remove(child);
|
||||||
|
child.DeleteTree();
|
||||||
}
|
}
|
||||||
entry.CommitChanges();
|
entry.CommitChanges();
|
||||||
}
|
}
|
||||||
|
@ -113,7 +114,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
DirectoryEntry parent = entry.Parent;
|
DirectoryEntry parent = entry.Parent;
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
{
|
{
|
||||||
parent.Children.Remove(entry);
|
//parent.Children.Remove(entry);
|
||||||
|
entry.DeleteTree();
|
||||||
parent.CommitChanges();
|
parent.CommitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,6 +161,14 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
collection.Value = value;
|
collection.Value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, string[] values)
|
||||||
|
{
|
||||||
|
PropertyValueCollection collection = oDE.Properties[name];
|
||||||
|
collection.Value = values;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, Guid value)
|
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, Guid value)
|
||||||
{
|
{
|
||||||
PropertyValueCollection collection = oDE.Properties[name];
|
PropertyValueCollection collection = oDE.Properties[name];
|
||||||
|
@ -177,6 +187,19 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
return entry.Properties.Contains(name) ? entry.Properties[name][0] : null;
|
return entry.Properties.Contains(name) ? entry.Properties[name][0] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string[] GetADObjectPropertyMultiValue(DirectoryEntry entry, string name)
|
||||||
|
{
|
||||||
|
if (!entry.Properties.Contains(name))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
List<string> returnList = new List<string>();
|
||||||
|
for (int i = 0; i < entry.Properties[name].Count; i++)
|
||||||
|
returnList.Add(entry.Properties[name][i].ToString());
|
||||||
|
|
||||||
|
return returnList.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static string GetADObjectStringProperty(DirectoryEntry entry, string name)
|
public static string GetADObjectStringProperty(DirectoryEntry entry, string name)
|
||||||
{
|
{
|
||||||
object ret = GetADObjectProperty(entry, name);
|
object ret = GetADObjectProperty(entry, name);
|
||||||
|
|
|
@ -34,6 +34,6 @@
|
||||||
public SharePointStatisticsReport SharePointReport { get; set; }
|
public SharePointStatisticsReport SharePointReport { get; set; }
|
||||||
public CRMStatisticsReport CRMReport { get; set; }
|
public CRMStatisticsReport CRMReport { get; set; }
|
||||||
public OrganizationStatisticsReport OrganizationReport { get; set; }
|
public OrganizationStatisticsReport OrganizationReport { get; set; }
|
||||||
|
public LyncStatisticsReport LyncReport { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
{
|
||||||
|
public enum ExchangeAcceptedDomainType
|
||||||
|
{
|
||||||
|
Authoritative = 0,
|
||||||
|
InternalRelay = 1,
|
||||||
|
ExternalRelay = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -49,6 +49,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
int mailboxPlanId;
|
int mailboxPlanId;
|
||||||
string mailboxPlan;
|
string mailboxPlan;
|
||||||
string publicFolderPermission;
|
string publicFolderPermission;
|
||||||
|
string userPrincipalName;
|
||||||
|
|
||||||
public int AccountId
|
public int AccountId
|
||||||
{
|
{
|
||||||
|
@ -142,5 +143,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public string UserPrincipalName
|
||||||
|
{
|
||||||
|
get { return this.userPrincipalName; }
|
||||||
|
set { this.userPrincipalName = value; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,5 +58,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
get { return primary; }
|
get { return primary; }
|
||||||
set { primary = value; }
|
set { primary = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,5 +50,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
public bool Enabled { get; set; }
|
public bool Enabled { get; set; }
|
||||||
public ExchangeAccountType MailboxType { get; set; }
|
public ExchangeAccountType MailboxType { get; set; }
|
||||||
public bool BlackberryEnabled { get; set; }
|
public bool BlackberryEnabled { get; set; }
|
||||||
|
public string MailboxPlan { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
{
|
||||||
|
public class ExchangeOrganization
|
||||||
|
{
|
||||||
|
int itemId;
|
||||||
|
int exchangeMailboxPlanID;
|
||||||
|
int lyncUserPlanID;
|
||||||
|
|
||||||
|
|
||||||
|
public int ItemId
|
||||||
|
{
|
||||||
|
get { return this.itemId; }
|
||||||
|
set { this.itemId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int ExchangeMailboxPlanID
|
||||||
|
{
|
||||||
|
get { return this.exchangeMailboxPlanID; }
|
||||||
|
set { this.exchangeMailboxPlanID = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int LyncUserPlanID
|
||||||
|
{
|
||||||
|
get { return this.lyncUserPlanID; }
|
||||||
|
set { this.lyncUserPlanID = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -67,6 +67,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
sb.AppendFormat("{0},", ToCsvString(item.Enabled, "Enabled", "Disabled"));
|
sb.AppendFormat("{0},", ToCsvString(item.Enabled, "Enabled", "Disabled"));
|
||||||
sb.AppendFormat("{0},", ToCsvString(item.MailboxType));
|
sb.AppendFormat("{0},", ToCsvString(item.MailboxType));
|
||||||
sb.AppendFormat("{0}", ToCsvString(item.BlackberryEnabled));
|
sb.AppendFormat("{0}", ToCsvString(item.BlackberryEnabled));
|
||||||
|
sb.AppendFormat("{0}", ToCsvString(item.MailboxPlan));
|
||||||
mainBuilder.Append(sb.ToString());
|
mainBuilder.Append(sb.ToString());
|
||||||
}
|
}
|
||||||
return mainBuilder.ToString();
|
return mainBuilder.ToString();
|
||||||
|
@ -74,7 +75,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
private void AddCSVHeader(StringBuilder sb)
|
private void AddCSVHeader(StringBuilder sb)
|
||||||
{
|
{
|
||||||
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Mailbox Display Name,Account Created,Primary E-mail Address,MAPI,OWA,ActiveSync,POP 3,IMAP,Mailbox Size (Mb),Max Mailbox Size (Mb),Last Logon,Enabled,Mailbox Type, BlackBerry");
|
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Organization Created,Organization ID,Mailbox Display Name,Account Created,Primary E-mail Address,MAPI,OWA,ActiveSync,POP 3,IMAP,Mailbox Size (Mb),Max Mailbox Size (Mb),Last Logon,Enabled,Mailbox Type, BlackBerry, Mailbox Plan");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
// Domains
|
// Domains
|
||||||
void AddAuthoritativeDomain(string domain);
|
void AddAuthoritativeDomain(string domain);
|
||||||
void DeleteAuthoritativeDomain(string domain);
|
void DeleteAuthoritativeDomain(string domain);
|
||||||
|
void ChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType);
|
||||||
string[] GetAuthoritativeDomains();
|
string[] GetAuthoritativeDomains();
|
||||||
|
|
||||||
// Mailboxes
|
// Mailboxes
|
||||||
|
|
|
@ -39,6 +39,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan);
|
bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan);
|
||||||
LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn);
|
LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn);
|
||||||
|
bool SetLyncUserGeneralSettings(string organizationId, string userUpn, LyncUser lyncUser);
|
||||||
bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan);
|
bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan);
|
||||||
bool DeleteUser(string userUpn);
|
bool DeleteUser(string userUpn);
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||||
string webPage, string notes, string externalEmail);
|
string webPage, string notes, string externalEmail);
|
||||||
|
|
||||||
|
void SetUserPassword(string organizationId, string accountName, string password);
|
||||||
|
|
||||||
|
void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName);
|
||||||
|
|
||||||
bool OrganizationExists(string organizationId);
|
bool OrganizationExists(string organizationId);
|
||||||
|
|
||||||
void DeleteOrganizationDomain(string organizationDistinguishedName, string domain);
|
void DeleteOrganizationDomain(string organizationDistinguishedName, string domain);
|
||||||
|
|
|
@ -70,5 +70,8 @@
|
||||||
|
|
||||||
public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN";
|
public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN";
|
||||||
|
|
||||||
|
public const string FAILED_SET_SETTINGS = "FAILED_SET_SETTINGS";
|
||||||
|
|
||||||
|
public const string ADDRESS_ALREADY_USED = "ADDRESS_ALREADY_USED";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
{
|
||||||
|
public class LyncOrganizationStatistics
|
||||||
|
{
|
||||||
|
private int allocatedLyncUsers;
|
||||||
|
private int createdLyncUsers;
|
||||||
|
|
||||||
|
private int allocatedLyncEVUsers;
|
||||||
|
private int createdLyncEVUsers;
|
||||||
|
|
||||||
|
|
||||||
|
public int AllocatedLyncUsers
|
||||||
|
{
|
||||||
|
get { return this.allocatedLyncUsers; }
|
||||||
|
set { this.allocatedLyncUsers = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int CreatedLyncUsers
|
||||||
|
{
|
||||||
|
get { return this.createdLyncUsers; }
|
||||||
|
set { this.createdLyncUsers = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int AllocatedLyncEVUsers
|
||||||
|
{
|
||||||
|
get { return this.allocatedLyncEVUsers; }
|
||||||
|
set { this.allocatedLyncEVUsers = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int CreatedLyncEVUsers
|
||||||
|
{
|
||||||
|
get { return this.createdLyncEVUsers; }
|
||||||
|
set { this.createdLyncEVUsers = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,77 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
{
|
||||||
|
public class LyncStatisticsReport : BaseReport<LyncUserStatistics>
|
||||||
|
{
|
||||||
|
public override string ToCSV()
|
||||||
|
{
|
||||||
|
StringBuilder mainBuilder = new StringBuilder();
|
||||||
|
StringBuilder sb = null;
|
||||||
|
AddCSVHeader(mainBuilder);
|
||||||
|
foreach (LyncUserStatistics item in Items)
|
||||||
|
{
|
||||||
|
sb = new StringBuilder();
|
||||||
|
sb.Append("\n");
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
|
||||||
|
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.DisplayName));
|
||||||
|
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.SipAddress));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.PhoneNumber));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.Conferencing));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.EnterpriseVoice));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.Federation));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.InstantMessaing));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.MobileAccess));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.LyncUserPlan));
|
||||||
|
|
||||||
|
mainBuilder.Append(sb.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return mainBuilder.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddCSVHeader(StringBuilder sb)
|
||||||
|
{
|
||||||
|
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Organization Created,Organization ID,Display Name,SipAddress,PhoneNumber,Conferencing,EnterpriseVoice,Federation,InstantMessaging,MobileAccess");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,8 +34,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
public class LyncUser
|
public class LyncUser
|
||||||
{
|
{
|
||||||
public string PrimaryUri { get; set; }
|
public string SipAddress { get; set; }
|
||||||
public string PrimaryEmailAddress { get; set; }
|
public string UserPrincipalName { get; set; }
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
public string LineUri { get; set; }
|
public string LineUri { get; set; }
|
||||||
public int AccountID { get; set; }
|
public int AccountID { get; set; }
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
{
|
||||||
|
public class LyncUserStatistics : BaseStatistics
|
||||||
|
{
|
||||||
|
public string DisplayName { get; set; }
|
||||||
|
public DateTime AccountCreated { get; set; }
|
||||||
|
public string SipAddress { get; set; }
|
||||||
|
public bool InstantMessaing{ get; set; }
|
||||||
|
public bool MobileAccess { get; set; }
|
||||||
|
public bool Federation { get; set; }
|
||||||
|
public bool Conferencing { get; set; }
|
||||||
|
public bool EnterpriseVoice { get; set; }
|
||||||
|
public string EVPolicy { get; set; }
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
public string LyncUserPlan { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
// (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.
|
||||||
|
|
||||||
|
using System;
|
||||||
namespace WebsitePanel.Providers.HostedSolution
|
namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
public class OrganizationDomainName
|
public class OrganizationDomainName
|
||||||
|
@ -33,6 +34,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
int organizationDomainId;
|
int organizationDomainId;
|
||||||
int itemId;
|
int itemId;
|
||||||
int domainId;
|
int domainId;
|
||||||
|
int domainTypeId;
|
||||||
string domainName;
|
string domainName;
|
||||||
bool isHost;
|
bool isHost;
|
||||||
bool isDefault;
|
bool isDefault;
|
||||||
|
@ -55,6 +57,21 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
set { domainId = value; }
|
set { domainId = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int DomainTypeId
|
||||||
|
{
|
||||||
|
get { return domainTypeId; }
|
||||||
|
set { domainTypeId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeAcceptedDomainType DomainType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
ExchangeAcceptedDomainType type = (ExchangeAcceptedDomainType)domainTypeId;
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int OrganizationDomainId
|
public int OrganizationDomainId
|
||||||
{
|
{
|
||||||
get { return organizationDomainId; }
|
get { return organizationDomainId; }
|
||||||
|
|
|
@ -56,7 +56,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
sb.AppendFormat("{0},", ToCsvString(item.TotalPublicFoldersSize / 1024.0 / 1024.0));
|
sb.AppendFormat("{0},", ToCsvString(item.TotalPublicFoldersSize / 1024.0 / 1024.0));
|
||||||
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollections));
|
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollections));
|
||||||
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollectionsSize / 1024.0 / 1024.0));
|
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollectionsSize / 1024.0 / 1024.0));
|
||||||
sb.AppendFormat("{0}", ToCsvString(item.TotalCRMUsers));
|
sb.AppendFormat("{0},", ToCsvString(item.TotalCRMUsers));
|
||||||
|
sb.AppendFormat("{0},", ToCsvString(item.TotalLyncUsers));
|
||||||
|
sb.AppendFormat("{0}", ToCsvString(item.TotalLyncEVUsers));
|
||||||
|
|
||||||
mainBuilder.Append(sb.ToString());
|
mainBuilder.Append(sb.ToString());
|
||||||
}
|
}
|
||||||
|
@ -65,7 +67,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
private static void AddCSVHeader(StringBuilder sb)
|
private static void AddCSVHeader(StringBuilder sb)
|
||||||
{
|
{
|
||||||
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Total mailboxes,Total mailboxes size(Mb),Total Public Folders size(Mb),Total SharePoint site collections,Total SharePoint site collections size(Mb),Total CRM users");
|
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Total mailboxes,Total mailboxes size(Mb),Total Public Folders size(Mb),Total SharePoint site collections,Total SharePoint site collections size(Mb),Total CRM users,Total Lync users,Total Lync EV users");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,5 +66,18 @@
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int TotalLyncUsers
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int TotalLyncEVUsers
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
private string country;
|
private string country;
|
||||||
private string notes;
|
private string notes;
|
||||||
private string domainUserName;
|
private string domainUserName;
|
||||||
|
private string userPrincipalName;
|
||||||
|
|
||||||
private bool disabled;
|
private bool disabled;
|
||||||
private bool locked;
|
private bool locked;
|
||||||
|
@ -305,6 +306,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
set { subscriberNumber = value; }
|
set { subscriberNumber = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string UserPrincipalName
|
||||||
|
{
|
||||||
|
get { return userPrincipalName; }
|
||||||
|
set { userPrincipalName = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
ServerBinding[] GetSiteBindings(string siteId);
|
ServerBinding[] GetSiteBindings(string siteId);
|
||||||
string CreateSite(WebSite site);
|
string CreateSite(WebSite site);
|
||||||
void UpdateSite(WebSite site);
|
void UpdateSite(WebSite site);
|
||||||
void UpdateSiteBindings(string siteId, ServerBinding[] bindings);
|
void UpdateSiteBindings(string siteId, ServerBinding[] bindings, bool emptyBindingsAllowed);
|
||||||
void DeleteSite(string siteId);
|
void DeleteSite(string siteId);
|
||||||
|
|
||||||
// virtual directories
|
// virtual directories
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
private string siteId;
|
private string siteId;
|
||||||
private string siteIPAddress;
|
private string siteIPAddress;
|
||||||
private int siteIPAddressId;
|
private int siteIPAddressId;
|
||||||
|
private bool isDedicatedIP;
|
||||||
private string dataPath;
|
private string dataPath;
|
||||||
private ServerBinding[] bindings;
|
private ServerBinding[] bindings;
|
||||||
private bool frontPageAvailable;
|
private bool frontPageAvailable;
|
||||||
|
@ -85,6 +86,12 @@ namespace WebsitePanel.Providers.Web
|
||||||
set { siteIPAddressId = value; }
|
set { siteIPAddressId = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsDedicatedIP
|
||||||
|
{
|
||||||
|
get { return isDedicatedIP; }
|
||||||
|
set { isDedicatedIP = value; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets logs path for the web site
|
/// Gets or sets logs path for the web site
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -238,6 +238,7 @@ namespace WebsitePanel.Providers.WebAppGallery
|
||||||
NotDownloaded,
|
NotDownloaded,
|
||||||
Downloaded,
|
Downloaded,
|
||||||
Downloading,
|
Downloading,
|
||||||
|
UnauthorizedAccessException,
|
||||||
Failed
|
Failed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,17 @@
|
||||||
<Compile Include="HostedSolution\BlackBerryErrorsCodes.cs" />
|
<Compile Include="HostedSolution\BlackBerryErrorsCodes.cs" />
|
||||||
<Compile Include="HostedSolution\BlackBerryStatsItem.cs" />
|
<Compile Include="HostedSolution\BlackBerryStatsItem.cs" />
|
||||||
<Compile Include="HostedSolution\BlackBerryUserDeleteState.cs" />
|
<Compile Include="HostedSolution\BlackBerryUserDeleteState.cs" />
|
||||||
|
<Compile Include="HostedSolution\ExchangeOrganization.cs" />
|
||||||
|
<Compile Include="HostedSolution\ExchangeAcceptedDomainType.cs" />
|
||||||
<Compile Include="HostedSolution\ExchangeMailboxPlanType.cs" />
|
<Compile Include="HostedSolution\ExchangeMailboxPlanType.cs" />
|
||||||
<Compile Include="HostedSolution\ExchangeMailboxPlan.cs" />
|
<Compile Include="HostedSolution\ExchangeMailboxPlan.cs" />
|
||||||
<Compile Include="HostedSolution\ILyncServer.cs" />
|
<Compile Include="HostedSolution\ILyncServer.cs" />
|
||||||
<Compile Include="HostedSolution\LyncConstants.cs" />
|
<Compile Include="HostedSolution\LyncConstants.cs" />
|
||||||
<Compile Include="HostedSolution\LyncErrorCodes.cs" />
|
<Compile Include="HostedSolution\LyncErrorCodes.cs" />
|
||||||
<Compile Include="HostedSolution\LyncFederationDomain.cs" />
|
<Compile Include="HostedSolution\LyncFederationDomain.cs" />
|
||||||
|
<Compile Include="HostedSolution\LyncOrganizationStatistics.cs" />
|
||||||
|
<Compile Include="HostedSolution\LyncUserStatistics.cs" />
|
||||||
|
<Compile Include="HostedSolution\LyncStatisticsReport.cs" />
|
||||||
<Compile Include="HostedSolution\LyncUser.cs" />
|
<Compile Include="HostedSolution\LyncUser.cs" />
|
||||||
<Compile Include="HostedSolution\LyncUserPlan.cs" />
|
<Compile Include="HostedSolution\LyncUserPlan.cs" />
|
||||||
<Compile Include="HostedSolution\LyncUserPlanType.cs" />
|
<Compile Include="HostedSolution\LyncUserPlanType.cs" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2012, Outercurve Foundation.
|
// Copyright (c) 2012, Outercurve Foundation.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
// Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
@ -99,7 +99,9 @@ namespace WebsitePanel.Providers.DNS
|
||||||
{ DnsRecordType.MX, new BuildDnsRecordDataEventHandler(BuildRecordData_MXRecord) },
|
{ DnsRecordType.MX, new BuildDnsRecordDataEventHandler(BuildRecordData_MXRecord) },
|
||||||
// TXT
|
// TXT
|
||||||
{ DnsRecordType.TXT, new BuildDnsRecordDataEventHandler(BuildRecordData_TXTRecord) },
|
{ DnsRecordType.TXT, new BuildDnsRecordDataEventHandler(BuildRecordData_TXTRecord) },
|
||||||
};
|
// SRV
|
||||||
|
{ DnsRecordType.SRV, new BuildDnsRecordDataEventHandler(BuildRecordData_SRVRecord) },
|
||||||
|
};
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public const int SOA_PRIMARY_NAME_SERVER = 0;
|
public const int SOA_PRIMARY_NAME_SERVER = 0;
|
||||||
|
@ -135,67 +137,79 @@ namespace WebsitePanel.Providers.DNS
|
||||||
return zoneName;
|
return zoneName;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DnsRecord ConvertToNative(DNSRecord record, string zoneName)
|
protected DnsRecord ConvertToNative(DNSRecord record, string zoneName)
|
||||||
{
|
{
|
||||||
string recordName = ConvertRecordNameToInternalFormat(record.Name, zoneName);
|
string recordName = ConvertRecordNameToInternalFormat(record.Name, zoneName);
|
||||||
//
|
//
|
||||||
DnsRecord dnsRecord = null;
|
DnsRecord dnsRecord = null;
|
||||||
switch (record.Type)
|
switch (record.Type)
|
||||||
{
|
{
|
||||||
case "A":
|
case "A":
|
||||||
dnsRecord = new DnsRecord
|
dnsRecord = new DnsRecord
|
||||||
{
|
{
|
||||||
RecordName = recordName,
|
RecordName = recordName,
|
||||||
RecordType = DnsRecordType.A,
|
RecordType = DnsRecordType.A,
|
||||||
RecordData = record.DataFields[0]
|
RecordData = record.DataFields[0]
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "AAAA":
|
case "AAAA":
|
||||||
dnsRecord = new DnsRecord {
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.AAAA,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.AAAA,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "NS":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "NS":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.NS,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.NS,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "CNAME":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "CNAME":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.CNAME,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.CNAME,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "MX":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "MX":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.MX,
|
RecordName = recordName,
|
||||||
MxPriority = Convert.ToInt32(record.DataFields[MX_RECORD_PRIORITY]),
|
RecordType = DnsRecordType.MX,
|
||||||
RecordData = record.DataFields[MX_RECORD_NAMESERVER]
|
MxPriority = Convert.ToInt32(record.DataFields[MX_RECORD_PRIORITY]),
|
||||||
};
|
RecordData = record.DataFields[MX_RECORD_NAMESERVER]
|
||||||
break;
|
};
|
||||||
case "TXT":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "TXT":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.TXT,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.TXT,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
}
|
break;
|
||||||
//
|
case "SRV":
|
||||||
return dnsRecord;
|
dnsRecord = new DnsRecord
|
||||||
}
|
{
|
||||||
|
RecordName = recordName,
|
||||||
|
RecordType = DnsRecordType.SRV,
|
||||||
|
RecordData = record.DataFields[3],
|
||||||
|
SrvPriority = Convert.ToInt32(record.DataFields[0]),
|
||||||
|
SrvWeight = Convert.ToInt32(record.DataFields[1]),
|
||||||
|
SrvPort = Convert.ToInt32(record.DataFields[2])
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
return dnsRecord;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setups connection with the Simple DNS instance
|
/// Setups connection with the Simple DNS instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -663,6 +677,15 @@ namespace WebsitePanel.Providers.DNS
|
||||||
data.Add(record.RecordData);
|
data.Add(record.RecordData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void BuildRecordData_SRVRecord(string zoneName, ref string type, DnsRecord record, List<string> data)
|
||||||
|
{
|
||||||
|
type = "SRV";
|
||||||
|
data.Add(Convert.ToString(record.SrvPriority));
|
||||||
|
data.Add(Convert.ToString(record.SrvWeight));
|
||||||
|
data.Add(Convert.ToString(record.SrvPort));
|
||||||
|
data.Add(record.RecordData);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
new static string BuildRecordData(string zoneName, string host, string recordData)
|
new static string BuildRecordData(string zoneName, string host, string recordData)
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using Microsoft.Win32;
|
// 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.
|
||||||
|
|
||||||
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using System.Reflection;
|
// 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.
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
DeleteAuthoritativeDomainInternal(domain);
|
DeleteAuthoritativeDomainInternal(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ChangeAcceptedDomainType(string domainName, ExchangeAcceptedDomainType domainType)
|
||||||
|
{
|
||||||
|
ChangeAcceptedDomainTypeInternal(domainName, domainType);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Mailboxes
|
#region Mailboxes
|
||||||
|
@ -1374,30 +1379,37 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
long size = 0;
|
long size = 0;
|
||||||
|
|
||||||
Command cmd = new Command("Get-PublicFolderStatistics");
|
Command cmd = new Command("Get-PublicFolderDatabase");
|
||||||
cmd.Parameters.Add("Identity", folder);
|
|
||||||
if (!string.IsNullOrEmpty(PublicFolderServer))
|
|
||||||
cmd.Parameters.Add("Server", PublicFolderServer);
|
|
||||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
||||||
if (result != null && result.Count > 0)
|
if (result != null && result.Count > 0)
|
||||||
{
|
{
|
||||||
PSObject obj = result[0];
|
cmd = new Command("Get-PublicFolderStatistics");
|
||||||
Unlimited<ByteQuantifiedSize> totalItemSize =
|
cmd.Parameters.Add("Identity", folder);
|
||||||
(Unlimited<ByteQuantifiedSize>)GetPSObjectProperty(obj, "TotalItemSize");
|
if (!string.IsNullOrEmpty(PublicFolderServer))
|
||||||
size += ConvertUnlimitedToBytes(totalItemSize);
|
cmd.Parameters.Add("Server", PublicFolderServer);
|
||||||
}
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
if (result != null && result.Count > 0)
|
||||||
|
{
|
||||||
|
PSObject obj = result[0];
|
||||||
|
Unlimited<ByteQuantifiedSize> totalItemSize =
|
||||||
|
(Unlimited<ByteQuantifiedSize>)GetPSObjectProperty(obj, "TotalItemSize");
|
||||||
|
size += ConvertUnlimitedToBytes(totalItemSize);
|
||||||
|
}
|
||||||
|
|
||||||
cmd = new Command("Get-PublicFolder");
|
cmd = new Command("Get-PublicFolder");
|
||||||
cmd.Parameters.Add("Identity", folder);
|
cmd.Parameters.Add("Identity", folder);
|
||||||
cmd.Parameters.Add("GetChildren", new SwitchParameter(true));
|
cmd.Parameters.Add("GetChildren", new SwitchParameter(true));
|
||||||
if (!string.IsNullOrEmpty(PublicFolderServer))
|
if (!string.IsNullOrEmpty(PublicFolderServer))
|
||||||
cmd.Parameters.Add("Server", PublicFolderServer);
|
cmd.Parameters.Add("Server", PublicFolderServer);
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
foreach (PSObject obj in result)
|
foreach (PSObject obj in result)
|
||||||
{
|
{
|
||||||
string id = ObjToString(GetPSObjectProperty(obj, "Identity"));
|
string id = ObjToString(GetPSObjectProperty(obj, "Identity"));
|
||||||
size += CalculatePublicFolderDiskSpace(runSpace, id);
|
size += CalculatePublicFolderDiskSpace(runSpace, id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
size = 0;
|
||||||
ExchangeLog.LogEnd("CalculatePublicFolderDiskSpace");
|
ExchangeLog.LogEnd("CalculatePublicFolderDiskSpace");
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -2579,8 +2591,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
Command cmd = new Command("Set-Mailbox");
|
Command cmd = new Command("Set-Mailbox");
|
||||||
cmd.Parameters.Add("Identity", accountName);
|
cmd.Parameters.Add("Identity", accountName);
|
||||||
cmd.Parameters.Add("PrimarySmtpAddress", primaryEmail);
|
cmd.Parameters.Add("PrimarySmtpAddress", primaryEmail);
|
||||||
cmd.Parameters.Add("UserPrincipalName", primaryEmail);
|
//cmd.Parameters.Add("UserPrincipalName", primaryEmail);
|
||||||
cmd.Parameters.Add("WindowsEmailAddress", primaryEmail);
|
//cmd.Parameters.Add("WindowsEmailAddress", primaryEmail);
|
||||||
|
|
||||||
ExecuteShellCommand(runSpace, cmd);
|
ExecuteShellCommand(runSpace, cmd);
|
||||||
}
|
}
|
||||||
|
@ -5954,6 +5966,31 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
ExchangeLog.LogEnd("CreateAuthoritativeDomainInternal");
|
ExchangeLog.LogEnd("CreateAuthoritativeDomainInternal");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ChangeAcceptedDomainTypeInternal(string domainName, ExchangeAcceptedDomainType domainType)
|
||||||
|
{
|
||||||
|
ExchangeLog.LogStart("ChangeAcceptedDomainType");
|
||||||
|
|
||||||
|
Runspace runSpace = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
|
SetAcceptedDomainType(runSpace, domainName,domainType);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ExchangeLog.LogError("ChangeAcceptedDomainType", ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
ExchangeLog.LogEnd("ChangeAcceptedDomainType");
|
||||||
|
}
|
||||||
|
|
||||||
private void DeleteAcceptedDomain(string domainName)
|
private void DeleteAcceptedDomain(string domainName)
|
||||||
{
|
{
|
||||||
ExchangeLog.LogStart("DeleteAcceptedDomain");
|
ExchangeLog.LogStart("DeleteAcceptedDomain");
|
||||||
|
@ -6018,6 +6055,17 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
ExchangeLog.LogEnd("RemoveAcceptedDomain");
|
ExchangeLog.LogEnd("RemoveAcceptedDomain");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetAcceptedDomainType(Runspace runSpace, string id, ExchangeAcceptedDomainType domainType)
|
||||||
|
{
|
||||||
|
ExchangeLog.LogStart("SetAcceptedDomainType");
|
||||||
|
Command cmd = new Command("Set-AcceptedDomain");
|
||||||
|
cmd.Parameters.Add("Identity", id);
|
||||||
|
cmd.Parameters.Add("DomainType", domainType.ToString());
|
||||||
|
cmd.Parameters.Add("Confirm", false);
|
||||||
|
ExecuteShellCommand(runSpace, cmd);
|
||||||
|
ExchangeLog.LogEnd("SetAcceptedDomainType");
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ActiveSync
|
#region ActiveSync
|
||||||
|
|
|
@ -607,15 +607,42 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
ExchangeLog.LogStart("GetDatabase");
|
ExchangeLog.LogStart("GetDatabase");
|
||||||
ExchangeLog.LogInfo("DAG: " + dagName);
|
ExchangeLog.LogInfo("DAG: " + dagName);
|
||||||
|
|
||||||
//Get Dag Servers
|
// this part of code handles mailboxnames like in the old 2007 provider
|
||||||
|
// check if DAG is in reality DAG\mailboxdatabase
|
||||||
|
string dagNameDAG = string.Empty;
|
||||||
|
string dagNameMBX = string.Empty;
|
||||||
|
bool isFixedDatabase = false;
|
||||||
|
if (dagName.Contains("\\"))
|
||||||
|
{
|
||||||
|
// split the two parts and extract DAG-Name and mailboxdatabase-name
|
||||||
|
string[] parts = dagName.Split(new char[] { '\\' }, 2, StringSplitOptions.None);
|
||||||
|
dagNameDAG = parts[0];
|
||||||
|
dagNameMBX = parts[1];
|
||||||
|
// check that we realy have a database name
|
||||||
|
if (!String.IsNullOrEmpty(dagNameMBX))
|
||||||
|
{
|
||||||
|
isFixedDatabase = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// there is no mailboxdatabase-name use the loadbalancing-code
|
||||||
|
dagNameDAG = dagName;
|
||||||
|
isFixedDatabase = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Dag Servers - with the name of the database availability group
|
||||||
Collection<PSObject> dags = null;
|
Collection<PSObject> dags = null;
|
||||||
Command cmd = new Command("Get-DatabaseAvailabilityGroup");
|
Command cmd = new Command("Get-DatabaseAvailabilityGroup");
|
||||||
cmd.Parameters.Add("Identity", dagName);
|
cmd.Parameters.Add("Identity", dagNameDAG);
|
||||||
dags = ExecuteShellCommand(runSpace, cmd);
|
dags = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
if (htBbalancer == null)
|
if (htBbalancer == null)
|
||||||
htBbalancer = new Hashtable();
|
htBbalancer = new Hashtable();
|
||||||
|
|
||||||
|
// use fully qualified dagName for loadbalancer. Thus if there are two services and one of them
|
||||||
|
// contains only the DAG, the "fixed" database could also be used in loadbalancing. If you do not want this,
|
||||||
|
// set either IsExcludedFromProvisioning or IsSuspendedFromProvisioning - it is not evaluated for fixed databases
|
||||||
if (htBbalancer[dagName] == null)
|
if (htBbalancer[dagName] == null)
|
||||||
htBbalancer.Add(dagName, 0);
|
htBbalancer.Add(dagName, 0);
|
||||||
|
|
||||||
|
@ -628,35 +655,56 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
System.Collections.Generic.List<string> lstDatabase = new System.Collections.Generic.List<string>();
|
System.Collections.Generic.List<string> lstDatabase = new System.Collections.Generic.List<string>();
|
||||||
|
|
||||||
foreach (object objServer in servers)
|
if (!isFixedDatabase) // "old" loadbalancing code
|
||||||
|
{
|
||||||
|
foreach (object objServer in servers)
|
||||||
|
{
|
||||||
|
Collection<PSObject> databases = null;
|
||||||
|
cmd = new Command("Get-MailboxDatabase");
|
||||||
|
cmd.Parameters.Add("Server", ObjToString(objServer));
|
||||||
|
databases = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
foreach (PSObject objDatabase in databases)
|
||||||
|
{
|
||||||
|
if (((bool)GetPSObjectProperty(objDatabase, "IsExcludedFromProvisioning") == false) &&
|
||||||
|
((bool)GetPSObjectProperty(objDatabase, "IsSuspendedFromProvisioning") == false))
|
||||||
|
{
|
||||||
|
string db = ObjToString(GetPSObjectProperty(objDatabase, "Identity"));
|
||||||
|
|
||||||
|
bool bAdd = true;
|
||||||
|
foreach (string s in lstDatabase)
|
||||||
|
{
|
||||||
|
if (s.ToLower() == db.ToLower())
|
||||||
|
{
|
||||||
|
bAdd = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bAdd)
|
||||||
|
{
|
||||||
|
lstDatabase.Add(db);
|
||||||
|
ExchangeLog.LogInfo("AddDatabase: " + db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // new fixed database code
|
||||||
{
|
{
|
||||||
Collection<PSObject> databases = null;
|
Collection<PSObject> databases = null;
|
||||||
cmd = new Command("Get-MailboxDatabase");
|
cmd = new Command("Get-MailboxDatabase");
|
||||||
cmd.Parameters.Add("Server", ObjToString(objServer));
|
cmd.Parameters.Add("Identity", dagNameMBX);
|
||||||
databases = ExecuteShellCommand(runSpace, cmd);
|
databases = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
// do not check "IsExcludedFromProvisioning" or "IsSuspended", just check if it is a member of the DAG
|
||||||
foreach (PSObject objDatabase in databases)
|
foreach (PSObject objDatabase in databases)
|
||||||
{
|
{
|
||||||
if (((bool)GetPSObjectProperty(objDatabase, "IsExcludedFromProvisioning") == false) &&
|
string dagSetting = ObjToString(GetPSObjectProperty(objDatabase, "MasterServerOrAvailabilityGroup"));
|
||||||
((bool)GetPSObjectProperty(objDatabase, "IsSuspendedFromProvisioning") == false))
|
if (dagNameDAG.Equals(dagSetting, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
string db = ObjToString(GetPSObjectProperty(objDatabase, "Identity"));
|
lstDatabase.Add(dagNameMBX);
|
||||||
|
ExchangeLog.LogInfo("AddFixedDatabase: " + dagNameMBX);
|
||||||
bool bAdd = true;
|
|
||||||
foreach (string s in lstDatabase)
|
|
||||||
{
|
|
||||||
if (s.ToLower() == db.ToLower())
|
|
||||||
{
|
|
||||||
bAdd = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bAdd)
|
|
||||||
{
|
|
||||||
lstDatabase.Add(db);
|
|
||||||
ExchangeLog.LogInfo("AddDatabase: " + db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,12 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
return GetLyncUserGeneralSettingsInternal(organizationId, userUpn);
|
return GetLyncUserGeneralSettingsInternal(organizationId, userUpn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool SetLyncUserGeneralSettings(string organizationId, string userUpn, LyncUser lyncUser)
|
||||||
|
{
|
||||||
|
return SetLyncUserGeneralSettingsInternal(organizationId, userUpn, lyncUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan)
|
public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan)
|
||||||
{
|
{
|
||||||
return SetLyncUserPlanInternal(organizationId, userUpn, plan, null);
|
return SetLyncUserPlanInternal(organizationId, userUpn, plan, null);
|
||||||
|
@ -162,6 +168,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
#region organization
|
#region organization
|
||||||
private string CreateOrganizationInternal(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice)
|
private string CreateOrganizationInternal(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice)
|
||||||
{
|
{
|
||||||
|
sipDomain = sipDomain.ToLower();
|
||||||
HostedSolutionLog.LogStart("CreateOrganizationInternal");
|
HostedSolutionLog.LogStart("CreateOrganizationInternal");
|
||||||
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
|
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
|
||||||
HostedSolutionLog.DebugInfo("sipDomain: {0}", sipDomain);
|
HostedSolutionLog.DebugInfo("sipDomain: {0}", sipDomain);
|
||||||
|
@ -199,7 +206,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
//create conferencing policy
|
//create conferencing policy
|
||||||
cmd = new Command("New-CsConferencingPolicy");
|
cmd = new Command("New-CsConferencingPolicy");
|
||||||
cmd.Parameters.Add("Identity", organizationId);
|
cmd.Parameters.Add("Identity", organizationId);
|
||||||
cmd.Parameters.Add("MaxMeetingSize", maxConferenceSize);
|
|
||||||
|
cmd.Parameters.Add("MaxMeetingSize", ((maxConferenceSize == -1) | (maxConferenceSize > 250)) ? 250 : maxConferenceSize);
|
||||||
cmd.Parameters.Add("AllowIPVideo", enableConferencingVideo);
|
cmd.Parameters.Add("AllowIPVideo", enableConferencingVideo);
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
transaction.RegisterNewConferencingPolicy(organizationId);
|
transaction.RegisterNewConferencingPolicy(organizationId);
|
||||||
|
@ -286,11 +294,14 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
Guid tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
|
Guid tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
|
||||||
|
|
||||||
// create sip domain
|
// create sip domain
|
||||||
DeleteSipDomain(runSpace, sipDomain);
|
|
||||||
|
|
||||||
//clear the msRTCSIP-Domains, TenantID, ObjectID
|
|
||||||
string path = AddADPrefix(GetOrganizationPath(organizationId));
|
string path = AddADPrefix(GetOrganizationPath(organizationId));
|
||||||
DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
string[] sipDs = (string[])ActiveDirectoryUtils.GetADObjectPropertyMultiValue(ou, "msRTCSIP-Domains");
|
||||||
|
|
||||||
|
foreach (string sipD in sipDs)
|
||||||
|
DeleteSipDomain(runSpace, sipD);
|
||||||
|
|
||||||
|
//clear the msRTCSIP-Domains, TenantID, ObjectID
|
||||||
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-Domains");
|
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-Domains");
|
||||||
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-TenantId");
|
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-TenantId");
|
||||||
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-ObjectId");
|
ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-ObjectId");
|
||||||
|
@ -381,6 +392,51 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
|
tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
|
||||||
|
|
||||||
|
string[] tmp = userUpn.Split('@');
|
||||||
|
if (tmp.Length < 2) return false;
|
||||||
|
|
||||||
|
// Get SipDomains and verify existence
|
||||||
|
bool bSipDomainExists = false;
|
||||||
|
cmd = new Command("Get-CsSipDomain");
|
||||||
|
Collection<PSObject> sipDomains = ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
foreach (PSObject domain in sipDomains)
|
||||||
|
{
|
||||||
|
string d = (string)GetPSObjectProperty(domain, "Name");
|
||||||
|
if (d.ToLower() == tmp[1].ToLower())
|
||||||
|
{
|
||||||
|
bSipDomainExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string path = string.Empty;
|
||||||
|
|
||||||
|
if (!bSipDomainExists)
|
||||||
|
{
|
||||||
|
// Create Sip Domain
|
||||||
|
cmd = new Command("New-CsSipDomain");
|
||||||
|
cmd.Parameters.Add("Identity", tmp[1].ToLower());
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
transaction.RegisterNewSipDomain(tmp[1].ToLower());
|
||||||
|
|
||||||
|
|
||||||
|
path = AddADPrefix(GetOrganizationPath(organizationId));
|
||||||
|
DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
string[] sipDs = (string[])ActiveDirectoryUtils.GetADObjectPropertyMultiValue(ou, "msRTCSIP-Domains");
|
||||||
|
List<string> listSipDs = new List<string>();
|
||||||
|
listSipDs.AddRange(sipDs);
|
||||||
|
listSipDs.Add(tmp[1]);
|
||||||
|
|
||||||
|
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-Domains", listSipDs.ToArray());
|
||||||
|
ou.CommitChanges();
|
||||||
|
|
||||||
|
//Create simpleurls
|
||||||
|
CreateSimpleUrl(runSpace, tmp[1].ToLower(), tenantId);
|
||||||
|
transaction.RegisterNewSimpleUrl(tmp[1].ToLower(), tenantId.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
//enable for lync
|
//enable for lync
|
||||||
cmd = new Command("Enable-CsUser");
|
cmd = new Command("Enable-CsUser");
|
||||||
cmd.Parameters.Add("Identity", userUpn);
|
cmd.Parameters.Add("Identity", userUpn);
|
||||||
|
@ -395,17 +451,15 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("Identity", userUpn);
|
cmd.Parameters.Add("Identity", userUpn);
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
path = AddADPrefix(GetResultObjectDN(result));
|
||||||
string path = AddADPrefix(GetResultObjectDN(result));
|
|
||||||
DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path);
|
||||||
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-GroupingID", tenantId);
|
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-GroupingID", tenantId);
|
||||||
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-TenantId", tenantId);
|
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-TenantId", tenantId);
|
||||||
|
|
||||||
string[] tmp = userUpn.Split('@');
|
|
||||||
if (tmp.Length > 0)
|
if (tmp.Length > 0)
|
||||||
{
|
{
|
||||||
string Url = SimpleUrlRoot + tmp[1];
|
string Url = SimpleUrlRoot + tmp[1];
|
||||||
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl", Url);
|
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl", Url.ToLower());
|
||||||
}
|
}
|
||||||
user.CommitChanges();
|
user.CommitChanges();
|
||||||
|
|
||||||
|
@ -460,8 +514,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
PSObject user = result[0];
|
PSObject user = result[0];
|
||||||
|
|
||||||
lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName");
|
lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName");
|
||||||
lyncUser.PrimaryUri = (string)GetPSObjectProperty(user, "SipAddress");
|
lyncUser.SipAddress = (string)GetPSObjectProperty(user, "SipAddress");
|
||||||
lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI");
|
lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI");
|
||||||
|
|
||||||
|
lyncUser.SipAddress = lyncUser.SipAddress.ToLower().Replace("sip:", "");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +532,114 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
return lyncUser;
|
return lyncUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool SetLyncUserGeneralSettingsInternal(string organizationId, string userUpn, LyncUser lyncUser)
|
||||||
|
{
|
||||||
|
HostedSolutionLog.LogStart("SetLyncUserGeneralSettingsInternal");
|
||||||
|
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
|
||||||
|
HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn);
|
||||||
|
|
||||||
|
bool ret = true;
|
||||||
|
Runspace runSpace = null;
|
||||||
|
Guid tenantId = Guid.Empty;
|
||||||
|
LyncTransaction transaction = StartTransaction();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
Command cmd = new Command("Get-CsTenant");
|
||||||
|
cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId));
|
||||||
|
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
if ((result != null) && (result.Count > 0))
|
||||||
|
{
|
||||||
|
tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId");
|
||||||
|
|
||||||
|
string[] tmp = userUpn.Split('@');
|
||||||
|
if (tmp.Length < 2) return false;
|
||||||
|
|
||||||
|
// Get SipDomains and verify existence
|
||||||
|
bool bSipDomainExists = false;
|
||||||
|
cmd = new Command("Get-CsSipDomain");
|
||||||
|
Collection<PSObject> sipDomains = ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
foreach (PSObject domain in sipDomains)
|
||||||
|
{
|
||||||
|
string d = (string)GetPSObjectProperty(domain, "Name");
|
||||||
|
if (d.ToLower() == tmp[1].ToLower())
|
||||||
|
{
|
||||||
|
bSipDomainExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string path = string.Empty;
|
||||||
|
|
||||||
|
if (!bSipDomainExists)
|
||||||
|
{
|
||||||
|
// Create Sip Domain
|
||||||
|
cmd = new Command("New-CsSipDomain");
|
||||||
|
cmd.Parameters.Add("Identity", tmp[1].ToLower());
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
transaction.RegisterNewSipDomain(tmp[1].ToLower());
|
||||||
|
|
||||||
|
|
||||||
|
path = AddADPrefix(GetOrganizationPath(organizationId));
|
||||||
|
DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
string[] sipDs = (string[])ActiveDirectoryUtils.GetADObjectPropertyMultiValue(ou, "msRTCSIP-Domains");
|
||||||
|
List<string> listSipDs = new List<string>();
|
||||||
|
listSipDs.AddRange(sipDs);
|
||||||
|
listSipDs.Add(tmp[1]);
|
||||||
|
|
||||||
|
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-Domains", listSipDs.ToArray());
|
||||||
|
ou.CommitChanges();
|
||||||
|
|
||||||
|
//Create simpleurls
|
||||||
|
CreateSimpleUrl(runSpace, tmp[1].ToLower(), tenantId);
|
||||||
|
transaction.RegisterNewSimpleUrl(tmp[1].ToLower(), tenantId.ToString());
|
||||||
|
|
||||||
|
path = AddADPrefix(GetResultObjectDN(result));
|
||||||
|
DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
|
if (tmp.Length > 0)
|
||||||
|
{
|
||||||
|
string Url = SimpleUrlRoot + tmp[1];
|
||||||
|
ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl", Url.ToLower());
|
||||||
|
}
|
||||||
|
user.CommitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd = new Command("Set-CsUser");
|
||||||
|
cmd.Parameters.Add("Identity", userUpn);
|
||||||
|
if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("SipAddress", "SIP:"+lyncUser.SipAddress);
|
||||||
|
if (!string.IsNullOrEmpty(lyncUser.SipAddress)) cmd.Parameters.Add("LineUri", lyncUser.LineUri);
|
||||||
|
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
//initiate addressbook generation
|
||||||
|
cmd = new Command("Update-CsAddressBook");
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
//initiate user database replication
|
||||||
|
cmd = new Command("Update-CsUserDatabase");
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ret = false;
|
||||||
|
HostedSolutionLog.LogError("SetLyncUserGeneralSettingsInternal", ex);
|
||||||
|
RollbackTransaction(transaction);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
HostedSolutionLog.LogEnd("SetLyncUserGeneralSettingsInternal");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private bool SetLyncUserPlanInternal(string organizationId, string userUpn, LyncUserPlan plan, Runspace runSpace)
|
private bool SetLyncUserPlanInternal(string organizationId, string userUpn, LyncUserPlan plan, Runspace runSpace)
|
||||||
{
|
{
|
||||||
|
@ -641,9 +805,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
SimpleUrls.Add(simpleUrl[0]);
|
SimpleUrls.Add(simpleUrl[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Hashtable properties = new Hashtable();
|
|
||||||
properties.Add("Add", SimpleUrls);
|
|
||||||
|
|
||||||
//PSListModifier
|
//PSListModifier
|
||||||
cmd = new Command("Set-CsSimpleUrlConfiguration");
|
cmd = new Command("Set-CsSimpleUrlConfiguration");
|
||||||
cmd.Parameters.Add("Identity", "Global");
|
cmd.Parameters.Add("Identity", "Global");
|
||||||
|
@ -838,6 +999,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
|
HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId);
|
||||||
HostedSolutionLog.DebugInfo("domainName: {0}", domainName);
|
HostedSolutionLog.DebugInfo("domainName: {0}", domainName);
|
||||||
|
|
||||||
|
domainName = domainName.ToLower();
|
||||||
|
proxyFqdn = proxyFqdn.ToLower();
|
||||||
|
|
||||||
Runspace runSpace = null;
|
Runspace runSpace = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -925,9 +1089,19 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
if (GetPSObjectProperty(result[0], "AllowedDomains").GetType().ToString() == "Microsoft.Rtc.Management.WritableConfig.Settings.Edge.AllowList")
|
if (GetPSObjectProperty(result[0], "AllowedDomains").GetType().ToString() == "Microsoft.Rtc.Management.WritableConfig.Settings.Edge.AllowList")
|
||||||
{
|
{
|
||||||
|
HostedSolutionLog.DebugInfo("Remove DomainName: {0}", domainName);
|
||||||
allowList = (AllowList)GetPSObjectProperty(result[0], "AllowedDomains");
|
allowList = (AllowList)GetPSObjectProperty(result[0], "AllowedDomains");
|
||||||
DomainPattern domain = new DomainPattern(domainName);
|
DomainPattern domain = null;
|
||||||
allowList.AllowedDomain.Remove(domain);
|
foreach (DomainPattern d in allowList.AllowedDomain)
|
||||||
|
{
|
||||||
|
if (d.Domain.ToLower() == domainName.ToLower())
|
||||||
|
{
|
||||||
|
domain = d;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (domain != null)
|
||||||
|
allowList.AllowedDomain.Remove(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = new Command("Set-CsTenantFederationConfiguration");
|
cmd = new Command("Set-CsTenantFederationConfiguration");
|
||||||
|
|
|
@ -180,7 +180,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
public Organization CreateOrganization(string organizationId)
|
public Organization CreateOrganization(string organizationId)
|
||||||
{
|
{
|
||||||
return CreateOrganizationInternal(organizationId);
|
return CreateOrganizationInternal(organizationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Organization CreateOrganizationInternal(string organizationId)
|
internal Organization CreateOrganizationInternal(string organizationId)
|
||||||
|
@ -214,7 +214,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
org.DistinguishedName = ActiveDirectoryUtils.RemoveADPrefix(orgPath);
|
org.DistinguishedName = ActiveDirectoryUtils.RemoveADPrefix(orgPath);
|
||||||
org.SecurityGroup = ActiveDirectoryUtils.RemoveADPrefix(GetGroupPath(organizationId));
|
org.SecurityGroup = ActiveDirectoryUtils.RemoveADPrefix(GetGroupPath(organizationId));
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogError(ex);
|
HostedSolutionLog.LogError(ex);
|
||||||
try
|
try
|
||||||
|
@ -225,7 +225,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
ActiveDirectoryUtils.DeleteADObject(groupPath);
|
ActiveDirectoryUtils.DeleteADObject(groupPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogError(e);
|
HostedSolutionLog.LogError(e);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
ActiveDirectoryUtils.DeleteADObject(orgPath);
|
ActiveDirectoryUtils.DeleteADObject(orgPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogError(e);
|
HostedSolutionLog.LogError(e);
|
||||||
}
|
}
|
||||||
|
@ -371,7 +371,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
userPath = GetUserPath(organizationId, loginName);
|
userPath = GetUserPath(organizationId, loginName);
|
||||||
if (!ActiveDirectoryUtils.AdObjectExists(userPath))
|
if (!ActiveDirectoryUtils.AdObjectExists(userPath))
|
||||||
{
|
{
|
||||||
userPath = ActiveDirectoryUtils.CreateUser(path, upn, loginName, displayName, password, enabled);
|
userPath = ActiveDirectoryUtils.CreateUser(path, null, loginName, displayName, password, enabled);
|
||||||
DirectoryEntry entry = new DirectoryEntry(userPath);
|
DirectoryEntry entry = new DirectoryEntry(userPath);
|
||||||
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn);
|
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn);
|
||||||
entry.CommitChanges();
|
entry.CommitChanges();
|
||||||
|
@ -421,7 +421,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogStart("GetPasswordPolicyInternal");
|
HostedSolutionLog.LogStart("GetPasswordPolicyInternal");
|
||||||
|
|
||||||
PasswordPolicyResult res = new PasswordPolicyResult {IsSuccess = true};
|
PasswordPolicyResult res = new PasswordPolicyResult { IsSuccess = true };
|
||||||
|
|
||||||
string[] policyAttributes = new[] {"minPwdLength",
|
string[] policyAttributes = new[] {"minPwdLength",
|
||||||
"pwdProperties",
|
"pwdProperties",
|
||||||
|
@ -441,13 +441,13 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
SearchResult result = ds.FindOne();
|
SearchResult result = ds.FindOne();
|
||||||
|
|
||||||
PasswordPolicy ret = new PasswordPolicy
|
PasswordPolicy ret = new PasswordPolicy
|
||||||
{
|
{
|
||||||
MinLength = ((int) result.Properties["minPwdLength"][0]),
|
MinLength = ((int)result.Properties["minPwdLength"][0]),
|
||||||
IsComplexityEnable = ((int) result.Properties["pwdProperties"][0] == 1)
|
IsComplexityEnable = ((int)result.Properties["pwdProperties"][0] == 1)
|
||||||
};
|
};
|
||||||
res.Value = ret;
|
res.Value = ret;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogError(ex);
|
HostedSolutionLog.LogError(ex);
|
||||||
res.IsSuccess = false;
|
res.IsSuccess = false;
|
||||||
|
@ -478,7 +478,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
string path = GetUserPath(organizationId, loginName);
|
string path = GetUserPath(organizationId, loginName);
|
||||||
if (ActiveDirectoryUtils.AdObjectExists(path))
|
if (ActiveDirectoryUtils.AdObjectExists(path))
|
||||||
ActiveDirectoryUtils.DeleteADObject(path,true);
|
ActiveDirectoryUtils.DeleteADObject(path, true);
|
||||||
|
|
||||||
HostedSolutionLog.LogEnd("DeleteUserInternal");
|
HostedSolutionLog.LogEnd("DeleteUserInternal");
|
||||||
}
|
}
|
||||||
|
@ -529,17 +529,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
retUser.DomainUserName = GetDomainName(ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName));
|
retUser.DomainUserName = GetDomainName(ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName));
|
||||||
retUser.DistinguishedName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DistinguishedName);
|
retUser.DistinguishedName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DistinguishedName);
|
||||||
retUser.Locked = (bool)entry.InvokeGet(ADAttributes.AccountLocked);
|
retUser.Locked = (bool)entry.InvokeGet(ADAttributes.AccountLocked);
|
||||||
|
retUser.UserPrincipalName= (string)entry.InvokeGet(ADAttributes.UserPrincipalName);
|
||||||
|
|
||||||
HostedSolutionLog.LogEnd("GetUserGeneralSettingsInternal");
|
HostedSolutionLog.LogEnd("GetUserGeneralSettingsInternal");
|
||||||
return retUser;
|
return retUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetDomainName(string username)
|
private string GetDomainName(string username)
|
||||||
{
|
{
|
||||||
string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(RootDomain);
|
string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(RootDomain);
|
||||||
string ret = string.Format(@"{0}\{1}", domain, username);
|
string ret = string.Format(@"{0}\{1}", domain, username);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrganizationUser GetManager(DirectoryEntry entry)
|
private OrganizationUser GetManager(DirectoryEntry entry)
|
||||||
{
|
{
|
||||||
|
@ -555,18 +556,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
retUser.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.DisplayName);
|
retUser.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.DisplayName);
|
||||||
|
|
||||||
retUser.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.Name);
|
retUser.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return retUser;
|
return retUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
|
public void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
|
||||||
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials, string lastName,
|
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials, string lastName,
|
||||||
string address, string city, string state, string zip, string country, string jobTitle,
|
string address, string city, string state, string zip, string country, string jobTitle,
|
||||||
string company, string department, string office, string managerAccountName,
|
string company, string department, string office, string managerAccountName,
|
||||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
|
||||||
string webPage, string notes, string externalEmail)
|
string webPage, string notes, string externalEmail)
|
||||||
{
|
{
|
||||||
SetUserGeneralSettingsInternal(organizationId, accountName, displayName, password, hideFromAddressBook,
|
SetUserGeneralSettingsInternal(organizationId, accountName, displayName, password, hideFromAddressBook,
|
||||||
disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle,
|
disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle,
|
||||||
|
@ -582,7 +583,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
string webPage, string notes, string externalEmail)
|
string webPage, string notes, string externalEmail)
|
||||||
{
|
{
|
||||||
string path = GetUserPath(organizationId, accountName);
|
string path = GetUserPath(organizationId, accountName);
|
||||||
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
|
|
||||||
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.FirstName, firstName);
|
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.FirstName, firstName);
|
||||||
|
@ -635,6 +636,37 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
entry.CommitChanges();
|
entry.CommitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetUserPassword(string organizationId, string accountName, string password)
|
||||||
|
{
|
||||||
|
SetUserPasswordInternal(organizationId, accountName, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SetUserPasswordInternal(string organizationId, string accountName, string password)
|
||||||
|
{
|
||||||
|
string path = GetUserPath(organizationId, accountName);
|
||||||
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(password))
|
||||||
|
entry.Invoke(ADAttributes.SetPassword, password);
|
||||||
|
|
||||||
|
entry.CommitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName)
|
||||||
|
{
|
||||||
|
SetUserPrincipalNameInternal(organizationId, accountName, userPrincipalName);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SetUserPrincipalNameInternal(string organizationId, string accountName, string userPrincipalName)
|
||||||
|
{
|
||||||
|
string path = GetUserPath(organizationId, accountName);
|
||||||
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
|
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, userPrincipalName);
|
||||||
|
|
||||||
|
entry.CommitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName)
|
public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2107,7 +2107,7 @@ namespace WebsitePanel.Providers.Mail
|
||||||
if (!String.IsNullOrEmpty(productVersion))
|
if (!String.IsNullOrEmpty(productVersion))
|
||||||
{
|
{
|
||||||
string[] split = productVersion.Split(new char[] { '.' });
|
string[] split = productVersion.Split(new char[] { '.' });
|
||||||
return split[0].Equals("7");
|
return split[0].Equals("7")||split[0].Equals("8");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2140,7 +2140,7 @@ namespace WebsitePanel.Providers.Mail
|
||||||
if (!String.IsNullOrEmpty(productVersion))
|
if (!String.IsNullOrEmpty(productVersion))
|
||||||
{
|
{
|
||||||
string[] split = productVersion.Split(new[] { '.' });
|
string[] split = productVersion.Split(new[] { '.' });
|
||||||
return split[0].Equals("7");
|
return split[0].Equals("7")||split[0].Equals("8");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1237,7 +1237,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
// Create site
|
// Create site
|
||||||
webObjectsSvc.CreateSite(site);
|
webObjectsSvc.CreateSite(site);
|
||||||
// Update web site bindings
|
// Update web site bindings
|
||||||
webObjectsSvc.UpdateSiteBindings(site.SiteId, site.Bindings);
|
webObjectsSvc.UpdateSiteBindings(site.SiteId, site.Bindings, false);
|
||||||
// Set web site logging settings
|
// Set web site logging settings
|
||||||
webObjectsSvc.SetWebSiteLoggingSettings(site);
|
webObjectsSvc.SetWebSiteLoggingSettings(site);
|
||||||
}
|
}
|
||||||
|
@ -1322,7 +1322,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
// Update website
|
// Update website
|
||||||
webObjectsSvc.UpdateSite(site);
|
webObjectsSvc.UpdateSite(site);
|
||||||
// Update website bindings
|
// Update website bindings
|
||||||
webObjectsSvc.UpdateSiteBindings(site.SiteId, site.Bindings);
|
webObjectsSvc.UpdateSiteBindings(site.SiteId, site.Bindings, false);
|
||||||
// Set website logging settings
|
// Set website logging settings
|
||||||
webObjectsSvc.SetWebSiteLoggingSettings(site);
|
webObjectsSvc.SetWebSiteLoggingSettings(site);
|
||||||
//
|
//
|
||||||
|
@ -1440,9 +1440,9 @@ namespace WebsitePanel.Providers.Web
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="siteId">Site's id to update bindings for.</param>
|
/// <param name="siteId">Site's id to update bindings for.</param>
|
||||||
/// <param name="bindings">Bindings information.</param>
|
/// <param name="bindings">Bindings information.</param>
|
||||||
public override void UpdateSiteBindings(string siteId, ServerBinding[] bindings)
|
public override void UpdateSiteBindings(string siteId, ServerBinding[] bindings, bool emptyBindingsAllowed)
|
||||||
{
|
{
|
||||||
this.webObjectsSvc.UpdateSiteBindings(siteId, bindings);
|
this.webObjectsSvc.UpdateSiteBindings(siteId, bindings, emptyBindingsAllowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -4046,7 +4046,12 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
using (var srvman = new ServerManager())
|
using (var srvman = new ServerManager())
|
||||||
{
|
{
|
||||||
return srvman.ApplicationPools["WebsitePanel Server"].ProcessModel.LoadUserProfile;
|
string poolName = Environment.GetEnvironmentVariable("APP_POOL_ID", EnvironmentVariableTarget.Process);
|
||||||
|
ApplicationPool pool = srvman.ApplicationPools[poolName];
|
||||||
|
if (pool == null)
|
||||||
|
throw new Exception("ApplicationPool pool is null" + poolName);
|
||||||
|
|
||||||
|
return pool.ProcessModel.LoadUserProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4055,7 +4060,12 @@ namespace WebsitePanel.Providers.Web
|
||||||
{
|
{
|
||||||
using (var srvman = new ServerManager())
|
using (var srvman = new ServerManager())
|
||||||
{
|
{
|
||||||
srvman.ApplicationPools["WebsitePanel Server"].ProcessModel.LoadUserProfile = true;
|
string poolName = Environment.GetEnvironmentVariable("APP_POOL_ID", EnvironmentVariableTarget.Process);
|
||||||
|
ApplicationPool pool = srvman.ApplicationPools[poolName];
|
||||||
|
if (pool == null)
|
||||||
|
throw new Exception("ApplicationPool pool is null" + poolName);
|
||||||
|
|
||||||
|
pool.ProcessModel.LoadUserProfile = true;
|
||||||
// save changes
|
// save changes
|
||||||
srvman.CommitChanges();
|
srvman.CommitChanges();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using System.Reflection;
|
// 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.
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|
|
@ -422,11 +422,14 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
return bindings.ToArray();
|
return bindings.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SyncWebSiteBindingsChanges(string siteId, ServerBinding[] bindings)
|
private void SyncWebSiteBindingsChanges(string siteId, ServerBinding[] bindings, bool emptyBindingsAllowed)
|
||||||
{
|
{
|
||||||
// ensure site bindings
|
// ensure site bindings
|
||||||
if (bindings == null || bindings.Length == 0)
|
if (!emptyBindingsAllowed)
|
||||||
throw new Exception("SiteServerBindingsEmpty");
|
{
|
||||||
|
if (bindings == null || bindings.Length == 0)
|
||||||
|
throw new Exception("SiteServerBindingsEmpty");
|
||||||
|
}
|
||||||
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
@ -438,7 +441,8 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < iisObject.Bindings.Count)
|
while (i < iisObject.Bindings.Count)
|
||||||
{
|
{
|
||||||
if (String.Equals(iisObject.Bindings[i].Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase))
|
if ((String.Equals(iisObject.Bindings[i].Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase)) |
|
||||||
|
(bindings.Length == 0))
|
||||||
{
|
{
|
||||||
iisObject.Bindings.RemoveAt(i);
|
iisObject.Bindings.RemoveAt(i);
|
||||||
continue;
|
continue;
|
||||||
|
@ -451,17 +455,17 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
// Create HTTP bindings received
|
// Create HTTP bindings received
|
||||||
foreach (var serverBinding in bindings)
|
foreach (var serverBinding in bindings)
|
||||||
{
|
{
|
||||||
var bindingInformation = String.Format("{0}:{1}:{2}", serverBinding.IP, serverBinding.Port, serverBinding.Host);
|
var bindingInformation = String.Format("{0}:{1}:{2}", serverBinding.IP, serverBinding.Port, serverBinding.Host);
|
||||||
iisObject.Bindings.Add(bindingInformation, Uri.UriSchemeHttp);
|
iisObject.Bindings.Add(bindingInformation, Uri.UriSchemeHttp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
srvman.CommitChanges();
|
srvman.CommitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSiteBindings(string siteId, ServerBinding[] bindings)
|
public void UpdateSiteBindings(string siteId, ServerBinding[] bindings, bool emptyBindingsAllowed)
|
||||||
{
|
{
|
||||||
using (ServerManager srvman = GetServerManager())
|
using (ServerManager srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
@ -470,7 +474,7 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
SyncWebSiteBindingsChanges(siteId, bindings);
|
SyncWebSiteBindingsChanges(siteId, bindings, emptyBindingsAllowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPhysicalPath(ServerManager srvman, WebVirtualDirectory virtualDir)
|
public string GetPhysicalPath(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
|
|
|
@ -847,7 +847,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void UpdateSiteBindings(string siteId, ServerBinding[] bindings)
|
public virtual void UpdateSiteBindings(string siteId, ServerBinding[] bindings, bool emptyBindingsAllowed)
|
||||||
{
|
{
|
||||||
ManagementObject objSite = wmi.GetObject(String.Format("IIsWebServerSetting='{0}'", siteId));
|
ManagementObject objSite = wmi.GetObject(String.Format("IIsWebServerSetting='{0}'", siteId));
|
||||||
|
|
||||||
|
@ -3396,7 +3396,8 @@ namespace WebsitePanel.Providers.Web
|
||||||
|
|
||||||
virtual public bool CheckLoadUserProfile()
|
virtual public bool CheckLoadUserProfile()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("LoadUserProfile option valid only on IIS7 or higer");
|
//throw new NotImplementedException("LoadUserProfile option valid only on IIS7 or higer");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual public void EnableLoadUserProfile()
|
virtual public void EnableLoadUserProfile()
|
||||||
|
@ -3421,20 +3422,28 @@ namespace WebsitePanel.Providers.Web
|
||||||
|
|
||||||
public bool IsMsDeployInstalled()
|
public bool IsMsDeployInstalled()
|
||||||
{
|
{
|
||||||
// project has reference to Microsoft.Web.Deployment, so
|
// TO-DO: Implement Web Deploy detection (x64/x86)
|
||||||
return true;
|
var isInstalled = false;
|
||||||
/*
|
//
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Assembly.Load(MS_DEPLOY_ASSEMBLY_NAME);
|
var msdeployRegKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3");
|
||||||
return true;
|
//
|
||||||
|
var keyValue = msdeployRegKey.GetValue("Install");
|
||||||
|
// We have found the required key in the registry hive
|
||||||
|
if (keyValue != null && keyValue.Equals(1))
|
||||||
|
{
|
||||||
|
isInstalled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// type could not be instantiated
|
Log.WriteError("Could not retrieve Web Deploy key from the registry", ex);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
*/
|
//
|
||||||
|
return isInstalled;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GalleryLanguagesResult GetGalleryLanguages(int UserId)
|
public GalleryLanguagesResult GetGalleryLanguages(int UserId)
|
||||||
|
@ -3551,6 +3560,11 @@ namespace WebsitePanel.Providers.Web
|
||||||
|
|
||||||
return module.DownloadAppAndGetStatus(UserId, id);
|
return module.DownloadAppAndGetStatus(UserId, id);
|
||||||
}
|
}
|
||||||
|
catch (UnauthorizedAccessException ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(ex);
|
||||||
|
return GalleryWebAppStatus.UnauthorizedAccessException;
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.WriteError(ex);
|
Log.WriteError(ex);
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using Microsoft.Win32;
|
// 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.
|
||||||
|
|
||||||
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using System.Reflection;
|
// 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.
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|
|
@ -1033,6 +1033,16 @@ namespace WebsitePanel.Providers.Exchange
|
||||||
domain});
|
domain});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ChangeAcceptedDomainType", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public void ChangeAcceptedDomainType(string domain, ExchangeAcceptedDomainType domainType)
|
||||||
|
{
|
||||||
|
this.Invoke("ChangeAcceptedDomainType", new object[] {
|
||||||
|
domain,
|
||||||
|
domainType});
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginAddAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginAddAuthoritativeDomain(string domain, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("AddAuthoritativeDomain", new object[] {
|
return this.BeginInvoke("AddAuthoritativeDomain", new object[] {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue