Merge with default
This commit is contained in:
commit
d3c6a46d6f
227 changed files with 13105 additions and 5593 deletions
|
@ -3,12 +3,22 @@
|
||||||
<?include Config.wxi?>
|
<?include Config.wxi?>
|
||||||
<?define VERSION="2.1"?>
|
<?define VERSION="2.1"?>
|
||||||
<Product Id="*" Name="WebsitePanel Scheduler Service Installer" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation" UpgradeCode="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
|
<Product Id="*" Name="WebsitePanel Scheduler Service Installer" Language="1033" Version="$(var.VERSION)" Manufacturer="Outercurve Foundation" UpgradeCode="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
|
||||||
|
|
||||||
<Package InstallerVersion="200" Compressed="yes" />
|
<Package InstallerVersion="200" Compressed="yes" />
|
||||||
<Media Id="1" EmbedCab="yes" Cabinet="schedulerservice.cab" />
|
<Media Id="1" EmbedCab="yes" Cabinet="schedulerservice.cab" />
|
||||||
<Feature Id="ProductFeature" Title="WebsitePanel Scheduler Service Installer" Level="1">
|
<Feature Id="ProductFeature" Title="WebsitePanel Scheduler Service Installer" Level="1">
|
||||||
<ComponentRef Id="ProductFiles" />
|
<ComponentRef Id="ProductFiles" />
|
||||||
</Feature>
|
</Feature>
|
||||||
<Property Id="BannerBitmap">bannrbmp</Property>
|
<Property Id="BannerBitmap">bannrbmp</Property>
|
||||||
|
|
||||||
|
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
|
||||||
|
<Upgrade Id="629ccd5c-1f6d-4168-bbe6-01c69e232f44">
|
||||||
|
<UpgradeVersion
|
||||||
|
Minimum="1.0.0.0" Maximum="99.0.0.0"
|
||||||
|
Property="PREVIOUSVERSIONSINSTALLED"
|
||||||
|
IncludeMinimum="yes" IncludeMaximum="no" />
|
||||||
|
</Upgrade>
|
||||||
|
|
||||||
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
|
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
|
||||||
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
|
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
|
||||||
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
|
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
|
||||||
|
@ -72,7 +82,9 @@
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<Dialog Id="InstallLocationDlg" Width="370" Height="270" Title="[ProductName] Setup">
|
<Dialog Id="InstallLocationDlg" Width="370" Height="270" Title="[ProductName] Setup">
|
||||||
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
|
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
|
||||||
<Publish Event="NewDialog" Value="DatabaseConnectionDlg" Order="3">1</Publish>
|
<Publish Event="DoAction" Value="PreInstallationAction">1</Publish>
|
||||||
|
<Publish Event="NewDialog" Value="DatabaseConnectionDlg" Order="3">SKIPCONNECTIONSTRINGSTEP = "0"</Publish>
|
||||||
|
<Publish Event="NewDialog" Value="VerifyReadyDlg" Order="3">SKIPCONNECTIONSTRINGSTEP = "1"</Publish>
|
||||||
</Control>
|
</Control>
|
||||||
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back">
|
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back">
|
||||||
<Publish Event="NewDialog" Value="LicenseAgreementDlg" Order="3">1</Publish>
|
<Publish Event="NewDialog" Value="LicenseAgreementDlg" Order="3">1</Publish>
|
||||||
|
@ -91,11 +103,15 @@
|
||||||
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallLocationDlg" Order="3">
|
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallLocationDlg" Order="3">
|
||||||
LicenseAccepted = "1"
|
LicenseAccepted = "1"
|
||||||
</Publish>
|
</Publish>
|
||||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg">1</Publish>
|
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DatabaseConnectionDlg">SKIPCONNECTIONSTRINGSTEP = "0"</Publish>
|
||||||
|
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallLocationDlg">SKIPCONNECTIONSTRINGSTEP = "1"</Publish>
|
||||||
<TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" />
|
<TextStyle Id="DlgTitleFont" FaceName="Tahoma" Size="8" Bold="yes" />
|
||||||
</UI>
|
</UI>
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom Action="FinalizeInstall" After="InstallFinalize" />
|
<Custom Action="PropertyFinalizeInstall" After='InstallValidate'/>
|
||||||
|
<Custom Action="FinalizeUnInstall" After="InstallValidate">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
|
||||||
|
<RemoveExistingProducts After="InstallValidate" />
|
||||||
|
<Custom Action='FinalizeInstall' After='InstallFiles' >NOT Installed or REINSTALL</Custom>
|
||||||
</InstallExecuteSequence>
|
</InstallExecuteSequence>
|
||||||
</Product>
|
</Product>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
@ -103,7 +119,19 @@
|
||||||
<Binary Id="CheckConnection.CA" SourceFile="bin\WebsitePanel.SchedulerServiceInstaller.CA.dll" />
|
<Binary Id="CheckConnection.CA" SourceFile="bin\WebsitePanel.SchedulerServiceInstaller.CA.dll" />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" />
|
<!-- immediate CA -->
|
||||||
|
<CustomAction Id='PropertyFinalizeInstall' Property='FinalizeInstall' Value='ConnectionString=[CONNECTIONSTRING];PreviousConnectionString=[PREVIOUSCONNECTIONSTRING];ServiceFolder=[SERVICEFOLDER];PreviousCryptoKey=[PREVIOUSCRYPTOKEY]' Return="check"/>
|
||||||
|
|
||||||
|
<!-- deferred CA -->
|
||||||
|
<CustomAction Id='FinalizeInstall' BinaryKey ='CheckConnection.CA' DllEntry='FinalizeInstall' Impersonate='no' Execute='deferred' Return='check' HideTarget='yes'/>
|
||||||
|
|
||||||
|
<!--<CustomAction Id="FinalizeInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeInstall" />-->
|
||||||
|
</Fragment>
|
||||||
|
<Fragment>
|
||||||
|
<CustomAction Id="PreInstallationAction" BinaryKey="CheckConnection.CA" DllEntry="PreInstallationAction" />
|
||||||
|
<CustomAction Id="FinalizeUnInstall" BinaryKey="CheckConnection.CA" DllEntry="FinalizeUnInstall" />
|
||||||
|
<CustomAction Id='AlreadyUpdated' Error='Product has already been updated to $(var.VERSION) or newer.' />
|
||||||
|
<CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
|
@ -122,6 +150,8 @@
|
||||||
<File Id="WebsitePanel.Common.Utils.dll" Source="$(var.BUILDPATH)\WebsitePanel.Common.Utils.dll"/>
|
<File Id="WebsitePanel.Common.Utils.dll" Source="$(var.BUILDPATH)\WebsitePanel.Common.Utils.dll"/>
|
||||||
<File Id="WebsitePanel.EnterpriseServer.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Base.dll"/>
|
<File Id="WebsitePanel.EnterpriseServer.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Base.dll"/>
|
||||||
<File Id="WebsitePanel.EnterpriseServer.Code.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Code.dll"/>
|
<File Id="WebsitePanel.EnterpriseServer.Code.dll" Source="$(var.BUILDPATH)\WebsitePanel.EnterpriseServer.Code.dll"/>
|
||||||
|
<File Id="IPAddressRange.dll" Source="$(var.BUILDPATH)\IPAddressRange.dll"/>
|
||||||
|
<File Id="WhoisClient.dll" Source="$(var.BUILDPATH)\WhoisClient.dll"/>
|
||||||
<File Id="WebsitePanel.Providers.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.Providers.Base.dll"/>
|
<File Id="WebsitePanel.Providers.Base.dll" Source="$(var.BUILDPATH)\WebsitePanel.Providers.Base.dll"/>
|
||||||
<File Id="WebsitePanel.Server.Client.dll" Source="$(var.BUILDPATH)\WebsitePanel.Server.Client.dll"/>
|
<File Id="WebsitePanel.Server.Client.dll" Source="$(var.BUILDPATH)\WebsitePanel.Server.Client.dll"/>
|
||||||
<File Id="WebsitePanel.Templates.dll" Source="$(var.BUILDPATH)\WebsitePanel.Templates.dll"/>
|
<File Id="WebsitePanel.Templates.dll" Source="$(var.BUILDPATH)\WebsitePanel.Templates.dll"/>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Configuration.Install;
|
using System.Configuration.Install;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
@ -34,6 +35,10 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Windows.Forms.VisualStyles;
|
||||||
|
using System.Xml;
|
||||||
using Microsoft.Deployment.WindowsInstaller;
|
using Microsoft.Deployment.WindowsInstaller;
|
||||||
using WebsitePanel.Setup;
|
using WebsitePanel.Setup;
|
||||||
|
|
||||||
|
@ -41,6 +46,8 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
||||||
{
|
{
|
||||||
public class CustomActions
|
public class CustomActions
|
||||||
{
|
{
|
||||||
|
public const string CustomDataDelimiter = "-=del=-";
|
||||||
|
|
||||||
[CustomAction]
|
[CustomAction]
|
||||||
public static ActionResult CheckConnection(Session session)
|
public static ActionResult CheckConnection(Session session)
|
||||||
{
|
{
|
||||||
|
@ -62,9 +69,71 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
||||||
[CustomAction]
|
[CustomAction]
|
||||||
public static ActionResult FinalizeInstall(Session session)
|
public static ActionResult FinalizeInstall(Session session)
|
||||||
{
|
{
|
||||||
ChangeConfigString("installer.connectionstring", session["CONNECTIONSTRING"], session["INSTALLFOLDER"]);
|
var connectionString = GetCustomActionProperty(session, "ConnectionString").Replace(CustomDataDelimiter, ";");
|
||||||
ChangeCryptoKey(session["INSTALLFOLDER"]);
|
var serviceFolder = GetCustomActionProperty(session, "ServiceFolder");
|
||||||
InstallService(session["INSTALLFOLDER"]);
|
var previousConnectionString = GetCustomActionProperty(session, "PreviousConnectionString").Replace(CustomDataDelimiter, ";");
|
||||||
|
var previousCryptoKey = GetCustomActionProperty(session, "PreviousCryptoKey");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(serviceFolder))
|
||||||
|
{
|
||||||
|
return ActionResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
connectionString = string.IsNullOrEmpty(previousConnectionString)
|
||||||
|
? connectionString
|
||||||
|
: previousConnectionString;
|
||||||
|
|
||||||
|
ChangeConfigString("/configuration/connectionStrings/add[@name='EnterpriseServer']", "connectionString", connectionString, serviceFolder);
|
||||||
|
ChangeConfigString("/configuration/appSettings/add[@key='WebsitePanel.CryptoKey']", "value", previousCryptoKey, serviceFolder);
|
||||||
|
InstallService(serviceFolder);
|
||||||
|
|
||||||
|
return ActionResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAction]
|
||||||
|
public static ActionResult FinalizeUnInstall(Session session)
|
||||||
|
{
|
||||||
|
UnInstallService();
|
||||||
|
|
||||||
|
return ActionResult.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
[CustomAction]
|
||||||
|
public static ActionResult PreInstallationAction(Session session)
|
||||||
|
{
|
||||||
|
session["SKIPCONNECTIONSTRINGSTEP"] = "0";
|
||||||
|
|
||||||
|
session["SERVICEFOLDER"] = session["INSTALLFOLDER"];
|
||||||
|
|
||||||
|
var servicePath = SecurityUtils.GetServicePath("WebsitePanel Scheduler");
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(servicePath))
|
||||||
|
{
|
||||||
|
string path = Path.Combine(servicePath, "WebsitePanel.SchedulerService.exe.config");
|
||||||
|
|
||||||
|
if (File.Exists(path))
|
||||||
|
{
|
||||||
|
using (var reader = new StreamReader(path))
|
||||||
|
{
|
||||||
|
string content = reader.ReadToEnd();
|
||||||
|
var pattern = new Regex(@"(?<=<add key=""WebsitePanel.CryptoKey"" .*?value\s*=\s*"")[^""]+(?="".*?>)");
|
||||||
|
Match match = pattern.Match(content);
|
||||||
|
session["PREVIOUSCRYPTOKEY"] = match.Value;
|
||||||
|
|
||||||
|
var connectionStringPattern = new Regex(@"(?<=<add name=""EnterpriseServer"" .*?connectionString\s*=\s*"")[^""]+(?="".*?>)");
|
||||||
|
match = connectionStringPattern.Match(content);
|
||||||
|
session["PREVIOUSCONNECTIONSTRING"] = match.Value.Replace(";", CustomDataDelimiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
session["SKIPCONNECTIONSTRINGSTEP"] = "1";
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(session["SERVICEFOLDER"]))
|
||||||
|
{
|
||||||
|
session["SERVICEFOLDER"] = servicePath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return ActionResult.Success;
|
return ActionResult.Success;
|
||||||
}
|
}
|
||||||
|
@ -93,44 +162,49 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ChangeCryptoKey(string installFolder)
|
private static void UnInstallService()
|
||||||
{
|
{
|
||||||
string path = Path.Combine(installFolder.Replace("SchedulerService", "Enterprise Server"), "web.config");
|
try
|
||||||
string cryptoKey = "0123456789";
|
{
|
||||||
|
var schedulerService =
|
||||||
|
ServiceController.GetServices().FirstOrDefault(
|
||||||
|
s => s.DisplayName.Equals("WebsitePanel Scheduler", StringComparison.CurrentCultureIgnoreCase));
|
||||||
|
|
||||||
if (File.Exists(path))
|
if (schedulerService != null)
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(path))
|
StopService(schedulerService.ServiceName);
|
||||||
|
|
||||||
|
SecurityUtils.DeleteService(schedulerService.ServiceName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
string content = reader.ReadToEnd();
|
|
||||||
var pattern = new Regex(@"(?<=<add key=""WebsitePanel.CryptoKey"" .*?value\s*=\s*"")[^""]+(?="".*?>)");
|
|
||||||
Match match = pattern.Match(content);
|
|
||||||
cryptoKey = match.Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeConfigString("installer.cryptokey", cryptoKey, installFolder);
|
private static void ChangeConfigString(string nodePath, string attrToChange, string value, string installFolder)
|
||||||
}
|
|
||||||
|
|
||||||
private static void ChangeConfigString(string searchString, string replaceValue, string installFolder)
|
|
||||||
{
|
{
|
||||||
string content;
|
|
||||||
string path = Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe.config");
|
string path = Path.Combine(installFolder, "WebsitePanel.SchedulerService.exe.config");
|
||||||
|
|
||||||
using (var reader = new StreamReader(path))
|
if (!File.Exists(path))
|
||||||
{
|
{
|
||||||
content = reader.ReadToEnd();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var re = new Regex("\\$\\{" + searchString + "\\}+", RegexOptions.IgnoreCase);
|
XmlDocument xmldoc = new XmlDocument();
|
||||||
content = re.Replace(content, replaceValue);
|
xmldoc.Load(path);
|
||||||
|
|
||||||
using (var writer = new StreamWriter(path))
|
XmlElement node = xmldoc.SelectSingleNode(nodePath) as XmlElement;
|
||||||
|
|
||||||
|
if (node != null)
|
||||||
{
|
{
|
||||||
writer.Write(content);
|
node.SetAttribute(attrToChange, value);
|
||||||
|
|
||||||
|
xmldoc.Save(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void StopService(string serviceName)
|
private static void StopService(string serviceName)
|
||||||
{
|
{
|
||||||
var sc = new ServiceController(serviceName);
|
var sc = new ServiceController(serviceName);
|
||||||
|
@ -155,12 +229,12 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
||||||
|
|
||||||
private static string GetConnectionString(string serverName, string databaseName)
|
private static string GetConnectionString(string serverName, string databaseName)
|
||||||
{
|
{
|
||||||
return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName);
|
return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName).Replace(";", CustomDataDelimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetConnectionString(string serverName, string databaseName, string login, string password)
|
private static string GetConnectionString(string serverName, string databaseName, string login, string password)
|
||||||
{
|
{
|
||||||
return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password);
|
return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password).Replace(";", CustomDataDelimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CheckConnection(string connectionString)
|
private static bool CheckConnection(string connectionString)
|
||||||
|
@ -186,5 +260,15 @@ namespace WebsitePanel.SchedulerServiceInstaller
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetCustomActionProperty(Session session, string key)
|
||||||
|
{
|
||||||
|
if (session.CustomActionData.ContainsKey(key))
|
||||||
|
{
|
||||||
|
return session.CustomActionData[key].Replace("-=-", ";");
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1110,6 +1110,25 @@ namespace WebsitePanel.Setup
|
||||||
wmiService.Delete();
|
wmiService.Delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetServicePath(string serviceName)
|
||||||
|
{
|
||||||
|
var mc = new ManagementClass("Win32_Service");
|
||||||
|
|
||||||
|
foreach (var mo in mc.GetInstances())
|
||||||
|
{
|
||||||
|
if (mo.GetPropertyValue("Name").ToString() == serviceName)
|
||||||
|
{
|
||||||
|
var path = mo.GetPropertyValue("PathName").ToString().Trim('"');
|
||||||
|
|
||||||
|
var directory = Path.GetDirectoryName(path);
|
||||||
|
|
||||||
|
return directory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21064,6 +21064,7 @@ SET @sql = @sql + ' SELECT COUNT(DomainID) FROM @Domains;SELECT
|
||||||
WS.ItemName AS WebSiteName,
|
WS.ItemName AS WebSiteName,
|
||||||
ISNULL(MD.ItemID, 0) AS MailDomainID,
|
ISNULL(MD.ItemID, 0) AS MailDomainID,
|
||||||
MD.ItemName AS MailDomainName,
|
MD.ItemName AS MailDomainName,
|
||||||
|
Z.ItemName AS ZoneName,
|
||||||
D.IsSubDomain,
|
D.IsSubDomain,
|
||||||
D.IsInstantAlias,
|
D.IsInstantAlias,
|
||||||
D.IsDomainPointer,
|
D.IsDomainPointer,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
BIN
WebsitePanel/Lib/References/Whois.NET/IPAddressRange.dll
Normal file
BIN
WebsitePanel/Lib/References/Whois.NET/IPAddressRange.dll
Normal file
Binary file not shown.
BIN
WebsitePanel/Lib/References/Whois.NET/WhoisClient.dll
Normal file
BIN
WebsitePanel/Lib/References/Whois.NET/WhoisClient.dll
Normal file
Binary file not shown.
|
@ -46,7 +46,10 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
{
|
{
|
||||||
Mailbox,
|
Mailbox,
|
||||||
Contact,
|
Contact,
|
||||||
User
|
User,
|
||||||
|
Room,
|
||||||
|
Equipment,
|
||||||
|
SharedMailbox
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -487,9 +490,12 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
|
|
||||||
if (!StringEquals(typeName, "Mailbox") &&
|
if (!StringEquals(typeName, "Mailbox") &&
|
||||||
!StringEquals(typeName, "Contact") &&
|
!StringEquals(typeName, "Contact") &&
|
||||||
!StringEquals(typeName, "User"))
|
!StringEquals(typeName, "User")&&
|
||||||
|
!StringEquals(typeName, "Room")&&
|
||||||
|
!StringEquals(typeName, "Equipment")&&
|
||||||
|
!StringEquals(typeName, "SharedMailbox"))
|
||||||
{
|
{
|
||||||
Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User'", index + 1));
|
Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User' or 'Room' or 'Equipment' or 'SharedMailbox'", index + 1));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,7 +530,7 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
if (type == AccountTypes.Mailbox)
|
if (type == AccountTypes.Mailbox)
|
||||||
{
|
{
|
||||||
//create mailbox using web service
|
//create mailbox using web service
|
||||||
if (!CreateMailbox(index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
if (!CreateMailbox(ExchangeAccountType.Mailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||||
address, city, state, zip, country, jobTitle, company, department, office,
|
address, city, state, zip, country, jobTitle, company, department, office,
|
||||||
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||||
{
|
{
|
||||||
|
@ -532,6 +538,42 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
}
|
}
|
||||||
totalMailboxes++;
|
totalMailboxes++;
|
||||||
}
|
}
|
||||||
|
if (type == AccountTypes.Room)
|
||||||
|
{
|
||||||
|
//create mailbox using web service
|
||||||
|
if (!CreateMailbox(ExchangeAccountType.Room, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||||
|
address, city, state, zip, country, jobTitle, company, department, office,
|
||||||
|
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
totalMailboxes++;
|
||||||
|
}
|
||||||
|
if (type == AccountTypes.Equipment)
|
||||||
|
{
|
||||||
|
//create mailbox using web service
|
||||||
|
if (!CreateMailbox(ExchangeAccountType.Equipment, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||||
|
address, city, state, zip, country, jobTitle, company, department, office,
|
||||||
|
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
totalMailboxes++;
|
||||||
|
}
|
||||||
|
if (type == AccountTypes.SharedMailbox)
|
||||||
|
{
|
||||||
|
//create mailbox using web service
|
||||||
|
if (!CreateMailbox(ExchangeAccountType.SharedMailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName,
|
||||||
|
address, city, state, zip, country, jobTitle, company, department, office,
|
||||||
|
businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
totalMailboxes++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else if (type == AccountTypes.Contact)
|
else if (type == AccountTypes.Contact)
|
||||||
{
|
{
|
||||||
//create contact using web service
|
//create contact using web service
|
||||||
|
@ -561,7 +603,7 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates mailbox
|
/// Creates mailbox
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool CreateMailbox(int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName,
|
private bool CreateMailbox(ExchangeAccountType exchangeAccountType, int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName,
|
||||||
string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office,
|
string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office,
|
||||||
string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int planId)
|
string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int planId)
|
||||||
{
|
{
|
||||||
|
@ -574,7 +616,7 @@ namespace WebsitePanel.Import.CsvBulk
|
||||||
//create mailbox
|
//create mailbox
|
||||||
//ES.Services.ExchangeServer.
|
//ES.Services.ExchangeServer.
|
||||||
string accountName = string.Empty;
|
string accountName = string.Empty;
|
||||||
int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, ExchangeAccountType.Mailbox, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false);
|
int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, exchangeAccountType, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false);
|
||||||
if (accountId < 0)
|
if (accountId < 0)
|
||||||
{
|
{
|
||||||
string errorMessage = GetErrorMessage(accountId);
|
string errorMessage = GetErrorMessage(accountId);
|
||||||
|
|
|
@ -37,14 +37,16 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.txtOU = new System.Windows.Forms.TextBox();
|
this.txtOU = new System.Windows.Forms.TextBox();
|
||||||
this.lblOU = new System.Windows.Forms.Label();
|
this.lblOU = new System.Windows.Forms.Label();
|
||||||
this.grpOrganization = new System.Windows.Forms.GroupBox();
|
this.grpOrganization = new System.Windows.Forms.GroupBox();
|
||||||
|
this.cbMailboxPlan = new System.Windows.Forms.ComboBox();
|
||||||
|
this.lblMailnoxPlan = new System.Windows.Forms.Label();
|
||||||
this.btnSelectAll = new System.Windows.Forms.Button();
|
this.btnSelectAll = new System.Windows.Forms.Button();
|
||||||
this.btnDeselectAll = new System.Windows.Forms.Button();
|
this.btnDeselectAll = new System.Windows.Forms.Button();
|
||||||
this.rbCreateAndImport = new System.Windows.Forms.RadioButton();
|
this.rbCreateAndImport = new System.Windows.Forms.RadioButton();
|
||||||
this.rbImport = new System.Windows.Forms.RadioButton();
|
this.rbImport = new System.Windows.Forms.RadioButton();
|
||||||
this.lvUsers = new System.Windows.Forms.ListView();
|
this.lvUsers = new System.Windows.Forms.ListView();
|
||||||
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
|
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
|
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
|
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.images = new System.Windows.Forms.ImageList(this.components);
|
this.images = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.txtOrgName = new System.Windows.Forms.TextBox();
|
this.txtOrgName = new System.Windows.Forms.TextBox();
|
||||||
this.lblOrgName = new System.Windows.Forms.Label();
|
this.lblOrgName = new System.Windows.Forms.Label();
|
||||||
|
@ -71,14 +73,14 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.txtSpace.Location = new System.Drawing.Point(146, 12);
|
this.txtSpace.Location = new System.Drawing.Point(146, 12);
|
||||||
this.txtSpace.Name = "txtSpace";
|
this.txtSpace.Name = "txtSpace";
|
||||||
this.txtSpace.ReadOnly = true;
|
this.txtSpace.ReadOnly = true;
|
||||||
this.txtSpace.Size = new System.Drawing.Size(429, 20);
|
this.txtSpace.Size = new System.Drawing.Size(426, 20);
|
||||||
this.txtSpace.TabIndex = 1;
|
this.txtSpace.TabIndex = 1;
|
||||||
this.txtSpace.TextChanged += new System.EventHandler(this.OnDataChanged);
|
this.txtSpace.TextChanged += new System.EventHandler(this.OnDataChanged);
|
||||||
//
|
//
|
||||||
// btnBrowseSpace
|
// btnBrowseSpace
|
||||||
//
|
//
|
||||||
this.btnBrowseSpace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnBrowseSpace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnBrowseSpace.Location = new System.Drawing.Point(581, 10);
|
this.btnBrowseSpace.Location = new System.Drawing.Point(578, 10);
|
||||||
this.btnBrowseSpace.Name = "btnBrowseSpace";
|
this.btnBrowseSpace.Name = "btnBrowseSpace";
|
||||||
this.btnBrowseSpace.Size = new System.Drawing.Size(24, 22);
|
this.btnBrowseSpace.Size = new System.Drawing.Size(24, 22);
|
||||||
this.btnBrowseSpace.TabIndex = 2;
|
this.btnBrowseSpace.TabIndex = 2;
|
||||||
|
@ -89,7 +91,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
// btnBrowseOU
|
// btnBrowseOU
|
||||||
//
|
//
|
||||||
this.btnBrowseOU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnBrowseOU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnBrowseOU.Location = new System.Drawing.Point(581, 36);
|
this.btnBrowseOU.Location = new System.Drawing.Point(578, 36);
|
||||||
this.btnBrowseOU.Name = "btnBrowseOU";
|
this.btnBrowseOU.Name = "btnBrowseOU";
|
||||||
this.btnBrowseOU.Size = new System.Drawing.Size(24, 22);
|
this.btnBrowseOU.Size = new System.Drawing.Size(24, 22);
|
||||||
this.btnBrowseOU.TabIndex = 5;
|
this.btnBrowseOU.TabIndex = 5;
|
||||||
|
@ -104,7 +106,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.txtOU.Location = new System.Drawing.Point(146, 38);
|
this.txtOU.Location = new System.Drawing.Point(146, 38);
|
||||||
this.txtOU.Name = "txtOU";
|
this.txtOU.Name = "txtOU";
|
||||||
this.txtOU.ReadOnly = true;
|
this.txtOU.ReadOnly = true;
|
||||||
this.txtOU.Size = new System.Drawing.Size(429, 20);
|
this.txtOU.Size = new System.Drawing.Size(426, 20);
|
||||||
this.txtOU.TabIndex = 4;
|
this.txtOU.TabIndex = 4;
|
||||||
this.txtOU.TextChanged += new System.EventHandler(this.OnDataChanged);
|
this.txtOU.TextChanged += new System.EventHandler(this.OnDataChanged);
|
||||||
//
|
//
|
||||||
|
@ -121,6 +123,8 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.grpOrganization.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.grpOrganization.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.grpOrganization.Controls.Add(this.cbMailboxPlan);
|
||||||
|
this.grpOrganization.Controls.Add(this.lblMailnoxPlan);
|
||||||
this.grpOrganization.Controls.Add(this.btnSelectAll);
|
this.grpOrganization.Controls.Add(this.btnSelectAll);
|
||||||
this.grpOrganization.Controls.Add(this.btnDeselectAll);
|
this.grpOrganization.Controls.Add(this.btnDeselectAll);
|
||||||
this.grpOrganization.Controls.Add(this.rbCreateAndImport);
|
this.grpOrganization.Controls.Add(this.rbCreateAndImport);
|
||||||
|
@ -132,14 +136,33 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.grpOrganization.Controls.Add(this.lblOrgId);
|
this.grpOrganization.Controls.Add(this.lblOrgId);
|
||||||
this.grpOrganization.Location = new System.Drawing.Point(15, 67);
|
this.grpOrganization.Location = new System.Drawing.Point(15, 67);
|
||||||
this.grpOrganization.Name = "grpOrganization";
|
this.grpOrganization.Name = "grpOrganization";
|
||||||
this.grpOrganization.Size = new System.Drawing.Size(590, 328);
|
this.grpOrganization.Size = new System.Drawing.Size(587, 328);
|
||||||
this.grpOrganization.TabIndex = 6;
|
this.grpOrganization.TabIndex = 6;
|
||||||
this.grpOrganization.TabStop = false;
|
this.grpOrganization.TabStop = false;
|
||||||
//
|
//
|
||||||
|
// cbMailboxPlan
|
||||||
|
//
|
||||||
|
this.cbMailboxPlan.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.cbMailboxPlan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.cbMailboxPlan.FormattingEnabled = true;
|
||||||
|
this.cbMailboxPlan.Location = new System.Drawing.Point(155, 74);
|
||||||
|
this.cbMailboxPlan.Name = "cbMailboxPlan";
|
||||||
|
this.cbMailboxPlan.Size = new System.Drawing.Size(415, 21);
|
||||||
|
this.cbMailboxPlan.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// lblMailnoxPlan
|
||||||
|
//
|
||||||
|
this.lblMailnoxPlan.Location = new System.Drawing.Point(19, 74);
|
||||||
|
this.lblMailnoxPlan.Name = "lblMailnoxPlan";
|
||||||
|
this.lblMailnoxPlan.Size = new System.Drawing.Size(130, 23);
|
||||||
|
this.lblMailnoxPlan.TabIndex = 9;
|
||||||
|
this.lblMailnoxPlan.Text = "Default mailbox plan :";
|
||||||
|
//
|
||||||
// btnSelectAll
|
// btnSelectAll
|
||||||
//
|
//
|
||||||
this.btnSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnSelectAll.Location = new System.Drawing.Point(417, 282);
|
this.btnSelectAll.Location = new System.Drawing.Point(414, 282);
|
||||||
this.btnSelectAll.Name = "btnSelectAll";
|
this.btnSelectAll.Name = "btnSelectAll";
|
||||||
this.btnSelectAll.Size = new System.Drawing.Size(75, 23);
|
this.btnSelectAll.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnSelectAll.TabIndex = 7;
|
this.btnSelectAll.TabIndex = 7;
|
||||||
|
@ -150,7 +173,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
// btnDeselectAll
|
// btnDeselectAll
|
||||||
//
|
//
|
||||||
this.btnDeselectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnDeselectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnDeselectAll.Location = new System.Drawing.Point(498, 282);
|
this.btnDeselectAll.Location = new System.Drawing.Point(495, 282);
|
||||||
this.btnDeselectAll.Name = "btnDeselectAll";
|
this.btnDeselectAll.Name = "btnDeselectAll";
|
||||||
this.btnDeselectAll.Size = new System.Drawing.Size(75, 23);
|
this.btnDeselectAll.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnDeselectAll.TabIndex = 8;
|
this.btnDeselectAll.TabIndex = 8;
|
||||||
|
@ -197,10 +220,10 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.columnHeader3});
|
this.columnHeader3});
|
||||||
this.lvUsers.FullRowSelect = true;
|
this.lvUsers.FullRowSelect = true;
|
||||||
this.lvUsers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
this.lvUsers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||||
this.lvUsers.Location = new System.Drawing.Point(19, 74);
|
this.lvUsers.Location = new System.Drawing.Point(19, 108);
|
||||||
this.lvUsers.MultiSelect = false;
|
this.lvUsers.MultiSelect = false;
|
||||||
this.lvUsers.Name = "lvUsers";
|
this.lvUsers.Name = "lvUsers";
|
||||||
this.lvUsers.Size = new System.Drawing.Size(554, 202);
|
this.lvUsers.Size = new System.Drawing.Size(551, 167);
|
||||||
this.lvUsers.SmallImageList = this.images;
|
this.lvUsers.SmallImageList = this.images;
|
||||||
this.lvUsers.TabIndex = 4;
|
this.lvUsers.TabIndex = 4;
|
||||||
this.lvUsers.UseCompatibleStateImageBehavior = false;
|
this.lvUsers.UseCompatibleStateImageBehavior = false;
|
||||||
|
@ -209,17 +232,17 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
// columnHeader1
|
// columnHeader1
|
||||||
//
|
//
|
||||||
this.columnHeader1.Text = "Name";
|
this.columnHeader1.Text = "Name";
|
||||||
this.columnHeader1.Width = 229;
|
this.columnHeader1.Width = 238;
|
||||||
//
|
//
|
||||||
// columnHeader2
|
// columnHeader2
|
||||||
//
|
//
|
||||||
this.columnHeader2.Text = "Email";
|
this.columnHeader2.Text = "Email";
|
||||||
this.columnHeader2.Width = 163;
|
this.columnHeader2.Width = 166;
|
||||||
//
|
//
|
||||||
// columnHeader3
|
// columnHeader3
|
||||||
//
|
//
|
||||||
this.columnHeader3.Text = "Type";
|
this.columnHeader3.Text = "Type";
|
||||||
this.columnHeader3.Width = 152;
|
this.columnHeader3.Width = 124;
|
||||||
//
|
//
|
||||||
// images
|
// images
|
||||||
//
|
//
|
||||||
|
@ -235,7 +258,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.txtOrgName.Location = new System.Drawing.Point(155, 45);
|
this.txtOrgName.Location = new System.Drawing.Point(155, 45);
|
||||||
this.txtOrgName.Name = "txtOrgName";
|
this.txtOrgName.Name = "txtOrgName";
|
||||||
this.txtOrgName.Size = new System.Drawing.Size(418, 20);
|
this.txtOrgName.Size = new System.Drawing.Size(415, 20);
|
||||||
this.txtOrgName.TabIndex = 3;
|
this.txtOrgName.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// lblOrgName
|
// lblOrgName
|
||||||
|
@ -253,7 +276,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
this.txtOrgId.Location = new System.Drawing.Point(155, 19);
|
this.txtOrgId.Location = new System.Drawing.Point(155, 19);
|
||||||
this.txtOrgId.Name = "txtOrgId";
|
this.txtOrgId.Name = "txtOrgId";
|
||||||
this.txtOrgId.ReadOnly = true;
|
this.txtOrgId.ReadOnly = true;
|
||||||
this.txtOrgId.Size = new System.Drawing.Size(418, 20);
|
this.txtOrgId.Size = new System.Drawing.Size(415, 20);
|
||||||
this.txtOrgId.TabIndex = 1;
|
this.txtOrgId.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// lblOrgId
|
// lblOrgId
|
||||||
|
@ -267,7 +290,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
// btnStart
|
// btnStart
|
||||||
//
|
//
|
||||||
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnStart.Location = new System.Drawing.Point(527, 461);
|
this.btnStart.Location = new System.Drawing.Point(524, 461);
|
||||||
this.btnStart.Name = "btnStart";
|
this.btnStart.Name = "btnStart";
|
||||||
this.btnStart.Size = new System.Drawing.Size(75, 23);
|
this.btnStart.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnStart.TabIndex = 9;
|
this.btnStart.TabIndex = 9;
|
||||||
|
@ -281,7 +304,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.progressBar.Location = new System.Drawing.Point(15, 427);
|
this.progressBar.Location = new System.Drawing.Point(15, 427);
|
||||||
this.progressBar.Name = "progressBar";
|
this.progressBar.Name = "progressBar";
|
||||||
this.progressBar.Size = new System.Drawing.Size(587, 23);
|
this.progressBar.Size = new System.Drawing.Size(584, 23);
|
||||||
this.progressBar.TabIndex = 8;
|
this.progressBar.TabIndex = 8;
|
||||||
//
|
//
|
||||||
// lblMessage
|
// lblMessage
|
||||||
|
@ -290,14 +313,14 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.lblMessage.Location = new System.Drawing.Point(12, 401);
|
this.lblMessage.Location = new System.Drawing.Point(12, 401);
|
||||||
this.lblMessage.Name = "lblMessage";
|
this.lblMessage.Name = "lblMessage";
|
||||||
this.lblMessage.Size = new System.Drawing.Size(593, 23);
|
this.lblMessage.Size = new System.Drawing.Size(590, 23);
|
||||||
this.lblMessage.TabIndex = 7;
|
this.lblMessage.TabIndex = 7;
|
||||||
//
|
//
|
||||||
// ApplicationForm
|
// ApplicationForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(617, 496);
|
this.ClientSize = new System.Drawing.Size(614, 496);
|
||||||
this.Controls.Add(this.lblMessage);
|
this.Controls.Add(this.lblMessage);
|
||||||
this.Controls.Add(this.progressBar);
|
this.Controls.Add(this.progressBar);
|
||||||
this.Controls.Add(this.btnStart);
|
this.Controls.Add(this.btnStart);
|
||||||
|
@ -346,6 +369,8 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
private System.Windows.Forms.RadioButton rbImport;
|
private System.Windows.Forms.RadioButton rbImport;
|
||||||
internal System.Windows.Forms.Button btnSelectAll;
|
internal System.Windows.Forms.Button btnSelectAll;
|
||||||
internal System.Windows.Forms.Button btnDeselectAll;
|
internal System.Windows.Forms.Button btnDeselectAll;
|
||||||
|
private System.Windows.Forms.ComboBox cbMailboxPlan;
|
||||||
|
private System.Windows.Forms.Label lblMailnoxPlan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2011, Outercurve Foundation.
|
// Copyright (c) 2014, 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,
|
||||||
|
@ -129,6 +129,30 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BindMailboxPlans(string orgId)
|
||||||
|
{
|
||||||
|
cbMailboxPlan.Items.Clear();
|
||||||
|
cbMailboxPlan.Items.Add("<not set>");
|
||||||
|
cbMailboxPlan.SelectedIndex = 0;
|
||||||
|
|
||||||
|
Organization org = OrganizationController.GetOrganizationById(orgId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
List<Organization> orgs = ExchangeServerController.GetExchangeOrganizations(1, false);
|
||||||
|
if (orgs.Count > 0)
|
||||||
|
org = orgs[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (org != null)
|
||||||
|
{
|
||||||
|
int itemId = org.Id;
|
||||||
|
List<ExchangeMailboxPlan> plans = ExchangeServerController.GetExchangeMailboxPlans(itemId, false);
|
||||||
|
cbMailboxPlan.Items.AddRange(plans.ToArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void LoadOrganizationData(DirectoryEntry parent)
|
private void LoadOrganizationData(DirectoryEntry parent)
|
||||||
{
|
{
|
||||||
string orgId = (string)parent.Properties["name"].Value;
|
string orgId = (string)parent.Properties["name"].Value;
|
||||||
|
@ -147,6 +171,9 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
rbImport.Checked = false;
|
rbImport.Checked = false;
|
||||||
txtOrgName.Text = orgId;
|
txtOrgName.Text = orgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BindMailboxPlans(orgId);
|
||||||
|
|
||||||
LoadOrganizationAccounts(parent);
|
LoadOrganizationAccounts(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,13 +191,38 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
type = null;
|
type = null;
|
||||||
email = null;
|
email = null;
|
||||||
name = (string)child.Properties["name"].Value;
|
name = (string)child.Properties["name"].Value;
|
||||||
|
|
||||||
//account type
|
//account type
|
||||||
typeProp = child.Properties["msExchRecipientDisplayType"];
|
typeProp = child.Properties["msExchRecipientDisplayType"];
|
||||||
|
|
||||||
|
int typeDetails = 0;
|
||||||
|
PropertyValueCollection typeDetailsProp = child.Properties["msExchRecipientTypeDetails"];
|
||||||
|
if (typeDetailsProp != null)
|
||||||
|
{
|
||||||
|
if (typeDetailsProp.Value != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
object adsLargeInteger = typeDetailsProp.Value;
|
||||||
|
typeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null);
|
||||||
|
}
|
||||||
|
catch { } // just skip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch (child.SchemaClassName)
|
switch (child.SchemaClassName)
|
||||||
{
|
{
|
||||||
case "user":
|
case "user":
|
||||||
email = (string)child.Properties["userPrincipalName"].Value;
|
email = (string)child.Properties["userPrincipalName"].Value;
|
||||||
|
|
||||||
|
if (typeDetails == 4)
|
||||||
|
{
|
||||||
|
type = "Shared Mailbox";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
if (typeProp == null || typeProp.Value == null)
|
if (typeProp == null || typeProp.Value == null)
|
||||||
{
|
{
|
||||||
type = "User";
|
type = "User";
|
||||||
|
@ -191,6 +243,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
type = "Equipment Mailbox";
|
type = "Equipment Mailbox";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(type))
|
if (!string.IsNullOrEmpty(type))
|
||||||
{
|
{
|
||||||
|
@ -300,6 +353,16 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
Global.OrganizationName = txtOrgName.Text;
|
Global.OrganizationName = txtOrgName.Text;
|
||||||
Global.ImportAccountsOnly = rbImport.Checked;
|
Global.ImportAccountsOnly = rbImport.Checked;
|
||||||
Global.HasErrors = false;
|
Global.HasErrors = false;
|
||||||
|
|
||||||
|
Global.defaultMailboxPlanId = 0;
|
||||||
|
if (cbMailboxPlan.SelectedItem!=null)
|
||||||
|
{
|
||||||
|
ExchangeMailboxPlan plan = cbMailboxPlan.SelectedItem as ExchangeMailboxPlan;
|
||||||
|
if (plan != null)
|
||||||
|
Global.defaultMailboxPlanId = plan.MailboxPlanId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
importer.Initialize(this.username, this);
|
importer.Initialize(this.username, this);
|
||||||
importer.Start();
|
importer.Start();
|
||||||
|
|
||||||
|
|
|
@ -112,79 +112,79 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="images.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="images.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>
|
<value>
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABM
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI
|
||||||
DQAAAk1TRnQBSQFMAgEBAwEAAQwBAAEMAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
DQAAAk1TRnQBSQFMAgEBAwEAAVwBAAFcAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||||
AwABEAMAAQEBAAEgBgABEGIAAa0BsgG1Af8BrQGuAa0B/wGtAa4BrQH/AaUBpgGlAf8BnAGeAaUB/wGc
|
AwABEAMAAQEBAAEgBgABEGIAAa0BsgG1Af8BrQGuAa0B/wGtAa4BrQH/AaUBpgGlAf8BnAGeAaUB/wGc
|
||||||
AZoBnAH/AZQBlgGUAf8BjAGOAZQB/wGMAYoBjAH/IAABrQGyAbUB/wGtAa4BrQH/Aa0BrgGtAf8BpQGm
|
AZoBnAH/AZQBlgGUAf8BjAGOAZQB/wGMAYoBjAH/IAABrQGyAbUB/wGtAa4BrQH/Aa0BrgGtAf8BpQGm
|
||||||
AaUB/wGcAZ4BpQH/AZwBmgGcAf8BlAGWAZQB/wGMAY4BlAH/AYwBigGMAf8BjAFtAWcB/1AAAxgBIQNN
|
AaUB/wGcAZ4BpQH/AZwBmgGcAf8BlAGWAZQB/wGMAY4BlAH/AYwBigGMAf8BjAFjAV0B/1AAAxgBIQNN
|
||||||
AZEDWAHBA2EB5gFqAWMBVwH8A2EB5gNYAcEDTAGQAygBPSAAAa0BsgG1Hf8BlAGWAZQB/yAAAa0BsgG1
|
AZEDWAHBA2EB5gFgAVkBRQH8A2EB5gNYAcEDTAGQAygBPSAAAa0BsgG1Hf8BlAGWAZQB/yAAAa0BsgG1
|
||||||
Hf8BlAGWAZQB/wG1AZIBZwH/AYQBaQFfAf9IAAMDAQQDXAHNAagBkwFHAf0B5gHLAbQB/wHeAbcBkAH/
|
Hf8BlAGWAZQB/wG1AZIBXQH/AYQBXwFVAf9IAAMDAQQDXAHNAagBkwFAAf0B5gHLAbQB/wHeAbcBkAH/
|
||||||
AeMBuwGUAf8B4AG6AZQB/wHOAasBiAH/AbgBmQFcAf8DWgHFIAABrQGyAbUF/wHvAesB5wH/Ac4BywHO
|
AeMBuwGUAf8B4AG6AZQB/wHOAasBiAH/AbgBmQFSAf8DWgHFIAABrQGyAbUF/wHvAesB5wH/Ac4BywHO
|
||||||
Af8BvQG6Ab0B/wG1AbIBtQn/AZQBkgGUAf8gAAGtAbIBtQX/Ae8B6wHnAf8BzgHLAc4B/wG9AboBvQH/
|
Af8BvQG6Ab0B/wG1AbIBtQn/AZQBkgGUAf8gAAGtAbIBtQX/Ae8B6wHnAf8BzgHLAc4B/wG9AboBvQH/
|
||||||
AbUBsgG1Cf8BlAGSAZQB/wHGAZ4BbwH/AYwBbQFfAf9IAAMEAQUDWQG+AcYBpQGFAf8B5gHQAb0B/wHi
|
AbUBsgG1Cf8BlAGSAZQB/wHGAZ4BZQH/AYwBYwFVAf9IAAMEAQUDWQG+AcYBpQGFAf8B5gHQAb0B/wHi
|
||||||
Ab0BnAH/AeYBvwGXAf8B6AHDAZ8B/wHbAboBmAH/AcABnwFfAf8DXAHMEAABvQHDAbUB/wE8ATsBPAH/
|
Ab0BnAH/AeYBvwGXAf8B6AHDAZ8B/wHbAboBmAH/AcABnwFVAf8DXAHMEAABvQHDAbUB/wEyATEBMgH/
|
||||||
ATwBOwE8Af8BPAE7ATwB/wGtAbIBtRX/ATwBOwH3Af8BIwEmAdYB/wGUAZIBlAH/ATwBOwE8Af8BPAE7
|
ATIBMQEyAf8BMgExATIB/wGtAbIBtRX/ATIBMQH3Af8BGQEcAdYB/wGUAZIBlAH/ATIBMQEyAf8BMgEx
|
||||||
ATwB/wE8ATsBPAH/CAABVwGOAW8B/wFGAYoBZwH/AU4BigFnAf8BrQGyAbUV/wE+AT0B9wH/ASUBKAHW
|
ATIB/wEyATEBMgH/CAABTQGOAWUB/wE8AYoBXQH/AUQBigFdAf8BrQGyAbUV/wE0ATMB9wH/ARsBHgHW
|
||||||
Af8BlAGSAZQB/wHeAbIBhAH/AZwBkgGEAf9LAAEBA1MBqgHZAbEBkAH/AeYB1AHBAf8B8wHSAbMB/wHq
|
Af8BlAGSAZQB/wHeAbIBhAH/AZwBkgGEAf9LAAEBA1MBqgHZAbEBkAH/AeYB1AHBAf8B8wHSAbMB/wHq
|
||||||
AcEBmAH/Ae0BzAGqAf8B4AHCAaQB/wHDAaMBggH/A14B3RAAAb0BwwG1C/8B9wH/Aa0BugG1Ff8BpQGi
|
AcEBmAH/Ae0BzAGqAf8B4AHCAaQB/wHDAaMBggH/A14B3RAAAb0BwwG1C/8B9wH/Aa0BugG1Ff8BpQGi
|
||||||
AfcB/wGMAY4B3gH/AZQBkgGUAf8B7wHjAdYC/wH3Ae8B/wGcAZ4BlAH/BAABVwG6AYwB/wFfAcsBnAH/
|
AfcB/wGMAY4B3gH/AZQBkgGUAf8B7wHjAdYC/wH3Ae8B/wGcAZ4BlAH/BAABTQG6AYwB/wFVAcsBnAH/
|
||||||
AU4BugGMAf8BhAHHAaUB/wGtAboBtRX/AaUBogH3Af8BjAGOAd4B/wGUAZIBlAH/Ac4BpgFvAf9MAAMB
|
AUQBugGMAf8BhAHHAaUB/wGtAboBtRX/AaUBogH3Af8BjAGOAd4B/wGUAZIBlAH/Ac4BpgFlAf9MAAMB
|
||||||
AQIDAQECA2UB5QHQAcMBsgH/AcgBwwG7Af8B1wG3AZcB/wHrAcQBnQH/AeEBvgGbAf8BzgGmAV8B/wNN
|
AQIDAQECA2UB5QHQAcMBsgH/AcgBwwG7Af8B1wG3AZcB/wHrAcQBnQH/AeEBvgGbAf8BzgGmAVUB/wNN
|
||||||
AZEQAAG9AcMBtQX/AfcB7wHnAf8B9wHvAecB/wGtAboBtQH/Aa0BsgG1Af8BrQGyAa0B/wGlAa4BrQH/
|
AZEQAAG9AcMBtQX/AfcB7wHnAf8B9wHvAecB/wGtAboBtQH/Aa0BsgG1Af8BrQGyAa0B/wGlAa4BrQH/
|
||||||
AaUBpgGlAf8BnAGiAZwB/wGcAZ4BlAH/AZwBlgGUAf8BlAGWAZQB/wH3Ae8B5wH/AfcB7wHnAf8BnAGe
|
AaUBpgGlAf8BnAGiAZwB/wGcAZ4BlAH/AZwBlgGUAf8BlAGWAZQB/wH3Ae8B5wH/AfcB7wHnAf8BnAGe
|
||||||
AZQB/wQAAW8BwwGlAf8BZwG6AZQB/wFGAa4BhAH/AcYB4wHOAf8BrQG6AbUB/wGtAbIBtQH/Aa0BsgGt
|
AZQB/wQAAWUBwwGlAf8BXQG6AZQB/wE8Aa4BhAH/AcYB4wHOAf8BrQG6AbUB/wGtAbIBtQH/Aa0BsgGt
|
||||||
Af8BpQGuAa0B/wGlAaYBpQH/AZwBogGcAf8BnAGeAZwB/wGcAZYBlAH/AZQBkgGUAf9XAAEBAx8BLQNc
|
Af8BpQGuAa0B/wGlAaYBpQH/AZwBogGcAf8BnAGeAZwB/wGcAZYBlAH/AZQBkgGUAf9XAAEBAx8BLQNc
|
||||||
AckBAAErAVwB/wEvAUkBgwH/AcYBpgGHAf8DYQHuA04BmAMHAQoQAAG9AcMBtQX/Ae8B3wHWAf8B1gG+
|
AckBAAEhAVIB/wElAT8BgwH/AcYBpgGHAf8DYQHuA04BmAMHAQoQAAG9AcMBtQX/Ae8B3wHWAf8B1gG+
|
||||||
Aa0B/wHGAbIBpQH/AcYBsgGlAf8BzgG6AaUB/wHnAd8B1gH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/
|
Aa0B/wHGAbIBpQH/AcYBsgGlAf8BzgG6AaUB/wHnAd8B1gH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/
|
||||||
AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wQAAYQBwwGlAf8BbwHPAaUB/wFX
|
AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wQAAYQBwwGlAf8BZQHPAaUB/wFN
|
||||||
AboBjAH/Ab0B1wHOAf8BpQHDAbUB/wFOAaYBbwH/ASUBhgFGAf8BVwGGAYQB/wE2AVEBhAH/AQABMAFn
|
AboBjAH/Ab0B1wHOAf8BpQHDAbUB/wFEAaYBZQH/ARsBhgE8Af8BTQGGAYQB/wEsAUcBhAH/AQABJgFd
|
||||||
Af8BDAE9AW8B/wG9AaoBlAH/VwABAQMAAQEDEAEWA1ABmgEQATUBXAH/AQcBMQFcAf8DVQG1Az8BbAQA
|
Af8BAgEzAWUB/wG9AaoBlAH/VwABAQMAAQEDEAEWA1ABmgEGASsBUgH/AQABJwFSAf8DVQG1Az8BbAQA
|
||||||
AwIBAxAAAb0BwwG1Bf8BxgGuAZwR/wHWAb4BrQH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHn
|
AwIBAxAAAb0BwwG1Bf8BxgGuAZwR/wHWAb4BrQH/AfcB7wHnAf8B9wHvAecB/wH3Ae8B5wH/AfcB7wHn
|
||||||
Af8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wgAAYwB2wGlAf8BVwGqAZQB/wFXAYIBvQH/
|
Af8B9wHvAecB/wH3Ae8B5wH/AfcB7wHnAf8BnAGeAZQB/wgAAYwB2wGlAf8BTQGqAZQB/wFNAYIBvQH/
|
||||||
AT4BXQFvAf8BVwGWAV8B/wGMAbYBpQH/ATYBYQGcAf8BLQFZAZQB/wE2AV0BjAH/AR0BRQFvAf9YAAMD
|
ATQBUwFlAf8BTQGWAVUB/wGMAbYBpQH/ASwBVwGcAf8BIwFPAZQB/wEsAVMBjAH/ARMBOwFlAf9YAAMD
|
||||||
AQQDAgEDAyEBMAFYAl8B4wEsAVMBmwH/AScBTAGTAf8BFQE7AYEB/wMkATYYAAG9AcMBtQL/AvcB/wHG
|
AQQDAgEDAyEBMAFYAl8B4wEiAUkBmwH/AR0BQgGTAf8BCwExAYEB/wMkATYYAAG9AcMBtQL/AvcB/wHG
|
||||||
Aa4BnBH/Ad4BwwG9Af8B9wHvAecB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGl
|
Aa4BnBH/Ad4BwwG9Af8B9wHvAecB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGl
|
||||||
Af8B9wHvAecB/wGcAZ4BlAH/DAABNgFpAW8B/wFXAYIBvQH/AT4BXQFvAf8D9wH/A/cB/wFvAZ4BxgH/
|
Af8B9wHvAecB/wGcAZ4BlAH/DAABLAFfAWUB/wFNAYIBvQH/ATQBUwFlAf8D9wH/A/cB/wFlAZ4BxgH/
|
||||||
AVcBigG1Af8BRgFxAaUB/wE2AV0BjAH/WAADBAEGBAADRwGCA2IB9gFKAZABtgH/ATsBgQGnAf8BIQFJ
|
AU0BigG1Af8BPAFnAaUB/wEsAVMBjAH/WAADBAEGBAADRwGCA2IB9gFAAZABtgH/ATEBgQGnAf8BFwE/
|
||||||
AZAB/wNSAaEDBQEHFAABvQHDAbUC/wL3Af8BzgG6AaUR/wHeAcMBvQH/AfcB7wHnAf8B1gHDAbUB/wHW
|
AZAB/wNSAaEDBQEHFAABvQHDAbUC/wL3Af8BzgG6AaUR/wHeAcMBvQH/AfcB7wHnAf8B1gHDAbUB/wHW
|
||||||
AccBvQH/AdYBxwG9Af8B1gHHAb0B/wHWAcMBtQH/AfcB7wHnAf8BnAGeAZQB/wgAAWcBhgGUAf8BPgFt
|
AccBvQH/AdYBxwG9Af8B1gHHAb0B/wHWAcMBtQH/AfcB7wHnAf8BnAGeAZQB/wgAAV0BhgGUAf8BNAFj
|
||||||
AZwB/wGMAbIB3gH/AYQBqgHWAf8BVwFlAYQB/wGMAZYBpQH/AZQBugHeAf8BhAGuAdYB/wFXAZIBvQH/
|
AZwB/wGMAbIB3gH/AYQBqgHWAf8BTQFbAYQB/wGMAZYBpQH/AZQBugHeAf8BhAGuAdYB/wFNAZIBvQH/
|
||||||
AS0BWQGMAf8BXwFlAWcB/1QAAwQBBgMAAQEDPwFsAVwBbwF2AfgBggGoAc4B/wFKAZEBuAH/ASwBTgGS
|
ASMBTwGMAf8BVQFbAV0B/1QAAwQBBgMAAQEDPwFsAVwBXQFrAfgBggGoAc4B/wFAAZEBuAH/ASIBRAGS
|
||||||
Af8BEQEhATEB/wMkATUUAAG9AcMBtQP/AfcB/wHOAcMBtRH/AdYBxwG9Af8B9wHvAecB/wHWAcMBtQH/
|
Af8BBwEXAScB/wMkATUUAAG9AcMBtQP/AfcB/wHOAcMBtRH/AdYBxwG9Af8B9wHvAecB/wHWAcMBtQH/
|
||||||
AdYBwwG1Af8B1gHDAbUB/wHWAccBvQH/AdYBwwG1Av8B9wHvAf8BnAGeAZQB/wgAAU4BjgGlAf8BlAG2
|
AdYBwwG1Af8B1gHDAbUB/wHWAccBvQH/AdYBwwG1Av8B9wHvAf8BnAGeAZQB/wgAAUQBjgGlAf8BlAG2
|
||||||
Ad4B/wG1AdsC/wGlAc8C/wFXAXEBnAH/AaUBtgHGAf8BvQHbAv8BnAHHAe8B/wFfAZ4BzgH/AS0BOQFG
|
Ad4B/wG1AdsC/wGlAc8C/wFNAWcBnAH/AaUBtgHGAf8BvQHbAv8BnAHHAe8B/wFVAZ4BzgH/ASMBLwE8
|
||||||
Af8BLQEsASUB/1QAAwEBAgMAAQEBwwHQAdoB/wFqAXoBhAH5AZsBvwHlAf8BUwGdAccB/wErAT8BVAH/
|
Af8BIwEiARsB/1QAAwEBAgMAAQEBwwHQAdoB/wJqAXEB+QGbAb8B5QH/AUkBnQHHAf8BIQE1AUoB/wEJ
|
||||||
ARMBDwEMAf8DMgFQFAABvQHDAbUF/wHvAd8B1gH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBrgGc
|
AQUBAgH/AzIBUBQAAb0BwwG1Bf8B7wHfAdYB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAa4BnAH/
|
||||||
Af8B7wHfAdYB/wH3Ae8B5wH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUC/wH3
|
Ae8B3wHWAf8B9wHvAecB/wHGAbIBpQH/AcYBsgGlAf8BxgGyAaUB/wHGAbIBpQH/AcYBsgGlAv8B9wHv
|
||||||
Ae8B/wGcAZYBlAH/CAABXwGeAb0B/wGtAc8B5wH/Ad4B+wL/AaUBywH3Af8BXwGeAc4B/wHeAecB7wH/
|
Af8BnAGWAZQB/wgAAVUBngG9Af8BrQHPAecB/wHeAfsC/wGlAcsB9wH/AVUBngHOAf8B3gHnAe8B/wGt
|
||||||
Aa0BvgHWAf8BhAGeAb0B/wFXAYIBnAH/AS0BLAEtAf8BRgFBAT4B/1cAAQEIAAJZAVwB9QFfAZIBpgH/
|
Ab4B1gH/AYQBngG9Af8BTQGCAZwB/wEjASIBIwH/ATwBNwE0Af9XAAEBCAADWQH1AVUBkgGmAf8BPwFS
|
||||||
AUkBXAGOAf8BLwEyATYB/wEZARgBFwH/AyQBNRQAAb0BwwG1Bf8B9wHvAecC/wHvAecB/wH3Ae8B5wL/
|
AY4B/wElASgBLAH/AQ8BDgENAf8DJAE1FAABvQHDAbUF/wH3Ae8B5wL/Ae8B5wH/AfcB7wHnAv8B9wHv
|
||||||
AfcB7wH/AfcB7wHnAf8B9wHvAecH/wH3Av8C9wH/A/cB/wH3AfMB7wH/AfcB7wHnA/8B9wH/AZwBngGU
|
Af8B9wHvAecB/wH3Ae8B5wf/AfcC/wL3Af8D9wH/AfcB8wHvAf8B9wHvAecD/wH3Af8BnAGeAZQB/wgA
|
||||||
Af8IAAFvAaoBvQH/AWcBrgHGAf8BnAHDAc4B/wGUAbYB3gH/AUYBaQGcAf8EAAHGAb4BvQH/AYQBcQFv
|
AWUBqgG9Af8BXQGuAcYB/wGcAcMBzgH/AZQBtgHeAf8BPAFfAZwB/wQAAcYBvgG9Af8BhAFnAWUB/wFN
|
||||||
Af8BVwFVAU4B/wFXAVEBTgH/XwABAQQAA0wBkgNiAekBQwE/ATwB/ANZAfIDUQGcAwQBBRQAAb0BwwG1
|
AUsBRAH/AU0BRwFEAf9fAAEBBAADTAGSA2IB6QE3ATUBMgH8A1kB8gNRAZwDBAEFFAABvQHDAbUd/wGc
|
||||||
Hf8BnAGeAZQB/wG9Ab4BtQH/Ab0BvgG1Af8BvQHDAbUB/wG9Ab4BtQH/Ab0BvgG1Af8BvQG+AbUB/wG9
|
AZ4BlAH/Ab0BvgG1Af8BvQG+AbUB/wG9AcMBtQH/Ab0BvgG1Af8BvQG+AbUB/wG9Ab4BtQH/Ab0BvgG1
|
||||||
Ab4BtQH/CAABrQHDAcYB/wGEAccB1gH/AVcBngG1Af8BTgGWAbUB/wEtAV0BbwH/bAADCgENBAADCgEN
|
Af8IAAGtAcMBxgH/AYQBxwHWAf8BTQGeAbUB/wFEAZYBtQH/ASMBUwFlAf9sAAMKAQ0EAAMKAQ0EAAMV
|
||||||
BAADFQEdAygBPAMeASscAAG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHD
|
AR0DKAE8Ax4BKxwAAb0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/
|
||||||
AbUB/wG9AcMBtQH/Ab0BwwG1Af8BvQHDAbUB/ygAAc4C7wH/AaUB4wH3Af8BhAHLAdYB/wFvAbIBvQH/
|
Ab0BwwG1Af8BvQHDAbUB/wG9AcMBtQH/KAABzgLvAf8BpQHjAfcB/wGEAcsB1gH/AWUBsgG9Af//AGUA
|
||||||
/wBlAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAC/wHwAQcB+AEBAgAB4AEP
|
AUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAL/AfABBwH4AQECAAHgAQ8B8AEH
|
||||||
AfABBwH4AwABwAEPAfABBwH4AwABwAEPAgABwAMAAcABDwIAAYABAQIAAcABDwIAAYABAwIAAeABDwIA
|
AfgDAAHAAQ8B8AEHAfgDAAHAAQ8CAAHAAwABwAEPAgABgAEBAgABwAEPAgABgAEDAgAB4AEPAgABgAEH
|
||||||
AYABBwIAAcABLwIAAcABDwIAAcABPwIAAeABDwIAAdABHwIAAcABBwIAAcABHwIAAcABBwIAAcABHwIA
|
AgABwAEvAgABwAEPAgABwAE/AgAB4AEPAgAB0AEfAgABwAEHAgABwAEfAgABwAEHAgABwAEfAgABwAEH
|
||||||
AcABBwIAAdgBHwIAAcEBDwIAAegBHwIAAcEB/wIAAdQBfwEAAX8B4QH/AgAG/wIACw==
|
AgAB2AEfAgABwQEPAgAB6AEfAgABwQH/AgAB1AF/AQABfwHhAf8CAAb/AgAL
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAoAAAAAAAEACADKTwAApgAAADAwAAABAAgAqA4AAHBQAAAgIAAAAQAIAKgIAAAYXwAAGBgAAAEA
|
AAABAAoAAAAAAAEACADKTwAApgAAADAwAAABAAgAqA4AAHBQAAAgIAAAAQAIAKgIAAAYXwAAGBgAAAEA
|
||||||
|
|
|
@ -81,6 +81,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
public static string ErrorMessage;
|
public static string ErrorMessage;
|
||||||
public static bool ImportAccountsOnly;
|
public static bool ImportAccountsOnly;
|
||||||
public static bool HasErrors;
|
public static bool HasErrors;
|
||||||
|
public static int defaultMailboxPlanId;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private ApplicationForm appForm;
|
private ApplicationForm appForm;
|
||||||
private Button btnImport;
|
private Button btnImport;
|
||||||
|
|
||||||
private Thread thread;
|
private Thread thread;
|
||||||
|
|
||||||
|
|
||||||
|
@ -780,7 +779,32 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
int mailboxType = (int)type.Value;
|
int mailboxType = (int)type.Value;
|
||||||
|
|
||||||
|
int mailboxTypeDetails = 0;
|
||||||
|
PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"];
|
||||||
|
if (typeDetails!=null)
|
||||||
|
{
|
||||||
|
if (typeDetails.Value != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
object adsLargeInteger = typeDetails.Value;
|
||||||
|
mailboxTypeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null);
|
||||||
|
}
|
||||||
|
catch { } // just skip
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ExchangeAccountType accountType = ExchangeAccountType.Undefined;
|
ExchangeAccountType accountType = ExchangeAccountType.Undefined;
|
||||||
|
|
||||||
|
if (mailboxTypeDetails == 4)
|
||||||
|
{
|
||||||
|
Log.WriteInfo("Account type : shared mailbox");
|
||||||
|
accountType = ExchangeAccountType.SharedMailbox;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
switch (mailboxType)
|
switch (mailboxType)
|
||||||
{
|
{
|
||||||
case 1073741824:
|
case 1073741824:
|
||||||
|
@ -798,9 +822,10 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
default:
|
default:
|
||||||
Log.WriteInfo("Account type : unknown");
|
Log.WriteInfo("Account type : unknown");
|
||||||
return userId;
|
return userId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty);
|
UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty, Global.defaultMailboxPlanId);
|
||||||
|
|
||||||
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
string defaultEmail = (string)entry.Properties["extensionAttribute3"].Value;
|
||||||
|
|
||||||
|
@ -813,12 +838,11 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
if (emailAddress.ToLower().StartsWith("smtp:"))
|
if (emailAddress.ToLower().StartsWith("smtp:"))
|
||||||
emailAddress = emailAddress.Substring(5);
|
emailAddress = emailAddress.Substring(5);
|
||||||
|
|
||||||
|
|
||||||
if (!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
if (EmailAddressExists(emailAddress))
|
if (EmailAddressExists(emailAddress))
|
||||||
{
|
{
|
||||||
|
if ((!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase)) && (!emailAddress.Equals(email, StringComparison.InvariantCultureIgnoreCase)))
|
||||||
Log.WriteInfo(string.Format("Email address {0} already exists. Skipped", emailAddress));
|
Log.WriteInfo(string.Format("Email address {0} already exists. Skipped", emailAddress));
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// register email address
|
// register email address
|
||||||
|
@ -826,7 +850,6 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
AddAccountEmailAddress(userId, emailAddress);
|
AddAccountEmailAddress(userId, emailAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Log.WriteEnd("User imported");
|
Log.WriteEnd("User imported");
|
||||||
return userId;
|
return userId;
|
||||||
|
|
||||||
|
@ -963,7 +986,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
|
|
||||||
private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
|
private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
|
||||||
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
|
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
|
||||||
string mailboxManagerActions, string samAccountName, string accountPassword)
|
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId)
|
||||||
{
|
{
|
||||||
DataProvider.UpdateExchangeAccount(accountId,
|
DataProvider.UpdateExchangeAccount(accountId,
|
||||||
accountName,
|
accountName,
|
||||||
|
@ -973,7 +996,7 @@ namespace WebsitePanel.Import.Enterprise
|
||||||
mailEnabledPublicFolder,
|
mailEnabledPublicFolder,
|
||||||
mailboxManagerActions,
|
mailboxManagerActions,
|
||||||
samAccountName,
|
samAccountName,
|
||||||
CryptoUtils.Encrypt(accountPassword), 0, -1, string.Empty, false);
|
CryptoUtils.Encrypt(accountPassword), mailboxPlanId , -1, string.Empty, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,9 @@ order by rg.groupOrder
|
||||||
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving
|
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving
|
||||||
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
|
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
|
||||||
|
|
||||||
|
public const string EXCHANGE2013_SHAREDMAILBOXES = "Exchange2013.SharedMailboxes"; // Shared and resource mailboxes
|
||||||
|
public const string EXCHANGE2013_RESOURCEMAILBOXES = "Exchange2013.ResourceMailboxes";
|
||||||
|
|
||||||
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
||||||
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
|
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
|
||||||
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
|
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
|
||||||
|
|
|
@ -147,5 +147,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
get { return this.instantAliasName; }
|
get { return this.instantAliasName; }
|
||||||
set { this.instantAliasName = value; }
|
set { this.instantAliasName = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DateTime? CreationDate { get; set; }
|
||||||
|
public DateTime? ExpirationDate { get; set; }
|
||||||
|
public DateTime? LastUpdateDate { get; set; }
|
||||||
|
public string RegistrarName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public const string HOSTED_SOLUTION_REPORT = "HostedSoluitonReportSummaryLetter";
|
public const string HOSTED_SOLUTION_REPORT = "HostedSoluitonReportSummaryLetter";
|
||||||
public const string ORGANIZATION_USER_SUMMARY_LETTER = "OrganizationUserSummaryLetter";
|
public const string ORGANIZATION_USER_SUMMARY_LETTER = "OrganizationUserSummaryLetter";
|
||||||
public const string VPS_SUMMARY_LETTER = "VpsSummaryLetter";
|
public const string VPS_SUMMARY_LETTER = "VpsSummaryLetter";
|
||||||
|
public const string DOMAIN_EXPIRATION_LETTER = "DomainExpirationLetter";
|
||||||
|
public const string DOMAIN_LOOKUP_LETTER = "DomainLookupLetter";
|
||||||
public const string WEB_POLICY = "WebPolicy";
|
public const string WEB_POLICY = "WebPolicy";
|
||||||
public const string FTP_POLICY = "FtpPolicy";
|
public const string FTP_POLICY = "FtpPolicy";
|
||||||
public const string MAIL_POLICY = "MailPolicy";
|
public const string MAIL_POLICY = "MailPolicy";
|
||||||
|
|
|
@ -1,7 +1,41 @@
|
||||||
|
// Copyright (c) 2014, Outercurve Foundation.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
// are permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// - Redistributions of source code must retain the above copyright notice, this
|
||||||
|
// list of conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
// this list of conditions and the following disclaimer in the documentation
|
||||||
|
// and/or other materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from this
|
||||||
|
// software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
using WebsitePanel.Providers;
|
||||||
|
using WebsitePanel.Providers.Common;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
|
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.6413
|
// Runtime Version:2.0.50727.5466
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
@ -11,13 +45,6 @@
|
||||||
//
|
//
|
||||||
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
|
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
|
||||||
//
|
//
|
||||||
|
|
||||||
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
|
||||||
using WebsitePanel.Providers;
|
|
||||||
using WebsitePanel.Providers.Common;
|
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
|
@ -44,8 +71,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetOrganizationsOperationCompleted;
|
private System.Threading.SendOrPostCallback GetOrganizationsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetOrganizationByIdOperationCompleted;
|
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetOrganizationUserSummuryLetterOperationCompleted;
|
private System.Threading.SendOrPostCallback GetOrganizationUserSummuryLetterOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SendOrganizationUserSummuryLetterOperationCompleted;
|
private System.Threading.SendOrPostCallback SendOrganizationUserSummuryLetterOperationCompleted;
|
||||||
|
@ -72,6 +97,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SetOrganizationDefaultDomainOperationCompleted;
|
private System.Threading.SendOrPostCallback SetOrganizationDefaultDomainOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetOrganizationObjectsByDomainOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback CheckDomainUsedByHostedOrganizationOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback CreateUserOperationCompleted;
|
private System.Threading.SendOrPostCallback CreateUserOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback ImportUserOperationCompleted;
|
private System.Threading.SendOrPostCallback ImportUserOperationCompleted;
|
||||||
|
@ -145,9 +174,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetOrganizationsCompletedEventHandler GetOrganizationsCompleted;
|
public event GetOrganizationsCompletedEventHandler GetOrganizationsCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public event GetOrganizationByIdCompletedEventHandler GetOrganizationByIdCompleted;
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetOrganizationUserSummuryLetterCompletedEventHandler GetOrganizationUserSummuryLetterCompleted;
|
public event GetOrganizationUserSummuryLetterCompletedEventHandler GetOrganizationUserSummuryLetterCompleted;
|
||||||
|
|
||||||
|
@ -187,6 +213,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SetOrganizationDefaultDomainCompletedEventHandler SetOrganizationDefaultDomainCompleted;
|
public event SetOrganizationDefaultDomainCompletedEventHandler SetOrganizationDefaultDomainCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetOrganizationObjectsByDomainCompletedEventHandler GetOrganizationObjectsByDomainCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event CheckDomainUsedByHostedOrganizationCompletedEventHandler CheckDomainUsedByHostedOrganizationCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event CreateUserCompletedEventHandler CreateUserCompleted;
|
public event CreateUserCompletedEventHandler CreateUserCompleted;
|
||||||
|
|
||||||
|
@ -465,47 +497,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationById", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
|
||||||
public Organization GetOrganizationById(string organizationId) {
|
|
||||||
object[] results = this.Invoke("GetOrganizationById", new object[] {
|
|
||||||
organizationId});
|
|
||||||
return ((Organization)(results[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public System.IAsyncResult BeginGetOrganizationById(string organizationId, System.AsyncCallback callback, object asyncState) {
|
|
||||||
return this.BeginInvoke("GetOrganizationById", new object[] {
|
|
||||||
organizationId}, callback, asyncState);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public Organization EndGetOrganizationById(System.IAsyncResult asyncResult) {
|
|
||||||
object[] results = this.EndInvoke(asyncResult);
|
|
||||||
return ((Organization)(results[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public void GetOrganizationByIdAsync(string organizationId) {
|
|
||||||
this.GetOrganizationByIdAsync(organizationId, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public void GetOrganizationByIdAsync(string organizationId, object userState) {
|
|
||||||
if ((this.GetOrganizationByIdOperationCompleted == null)) {
|
|
||||||
this.GetOrganizationByIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationByIdOperationCompleted);
|
|
||||||
}
|
|
||||||
this.InvokeAsync("GetOrganizationById", new object[] {
|
|
||||||
organizationId}, this.GetOrganizationByIdOperationCompleted, userState);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnGetOrganizationByIdOperationCompleted(object arg) {
|
|
||||||
if ((this.GetOrganizationByIdCompleted != null)) {
|
|
||||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
|
||||||
this.GetOrganizationByIdCompleted(this, new GetOrganizationByIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserSummuryLetter", 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/GetOrganizationUserSummuryLetter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) {
|
public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) {
|
||||||
|
@ -1082,6 +1073,94 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationObjectsByDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public System.Data.DataSet GetOrganizationObjectsByDomain(int itemId, string domainName) {
|
||||||
|
object[] results = this.Invoke("GetOrganizationObjectsByDomain", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainName});
|
||||||
|
return ((System.Data.DataSet)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetOrganizationObjectsByDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetOrganizationObjectsByDomain", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainName}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.Data.DataSet EndGetOrganizationObjectsByDomain(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((System.Data.DataSet)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetOrganizationObjectsByDomainAsync(int itemId, string domainName) {
|
||||||
|
this.GetOrganizationObjectsByDomainAsync(itemId, domainName, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetOrganizationObjectsByDomainAsync(int itemId, string domainName, object userState) {
|
||||||
|
if ((this.GetOrganizationObjectsByDomainOperationCompleted == null)) {
|
||||||
|
this.GetOrganizationObjectsByDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationObjectsByDomainOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetOrganizationObjectsByDomain", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainName}, this.GetOrganizationObjectsByDomainOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetOrganizationObjectsByDomainOperationCompleted(object arg) {
|
||||||
|
if ((this.GetOrganizationObjectsByDomainCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetOrganizationObjectsByDomainCompleted(this, new GetOrganizationObjectsByDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckDomainUsedByHostedOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public bool CheckDomainUsedByHostedOrganization(int itemId, int domainId) {
|
||||||
|
object[] results = this.Invoke("CheckDomainUsedByHostedOrganization", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId});
|
||||||
|
return ((bool)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginCheckDomainUsedByHostedOrganization(int itemId, int domainId, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("CheckDomainUsedByHostedOrganization", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public bool EndCheckDomainUsedByHostedOrganization(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((bool)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void CheckDomainUsedByHostedOrganizationAsync(int itemId, int domainId) {
|
||||||
|
this.CheckDomainUsedByHostedOrganizationAsync(itemId, domainId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void CheckDomainUsedByHostedOrganizationAsync(int itemId, int domainId, object userState) {
|
||||||
|
if ((this.CheckDomainUsedByHostedOrganizationOperationCompleted == null)) {
|
||||||
|
this.CheckDomainUsedByHostedOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckDomainUsedByHostedOrganizationOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("CheckDomainUsedByHostedOrganization", new object[] {
|
||||||
|
itemId,
|
||||||
|
domainId}, this.CheckDomainUsedByHostedOrganizationOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCheckDomainUsedByHostedOrganizationOperationCompleted(object arg) {
|
||||||
|
if ((this.CheckDomainUsedByHostedOrganizationCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.CheckDomainUsedByHostedOrganizationCompleted(this, new CheckDomainUsedByHostedOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", 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/CreateUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) {
|
public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) {
|
||||||
|
@ -2713,32 +2792,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
|
||||||
public delegate void GetOrganizationByIdCompletedEventHandler(object sender, GetOrganizationByIdCompletedEventArgs e);
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
|
||||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
|
||||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
||||||
public partial class GetOrganizationByIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
|
||||||
|
|
||||||
private object[] results;
|
|
||||||
|
|
||||||
internal GetOrganizationByIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
|
||||||
base(exception, cancelled, userState) {
|
|
||||||
this.results = results;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
|
||||||
public Organization Result {
|
|
||||||
get {
|
|
||||||
this.RaiseExceptionIfNecessary();
|
|
||||||
return ((Organization)(this.results[0]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
public delegate void GetOrganizationUserSummuryLetterCompletedEventHandler(object sender, GetOrganizationUserSummuryLetterCompletedEventArgs e);
|
public delegate void GetOrganizationUserSummuryLetterCompletedEventHandler(object sender, GetOrganizationUserSummuryLetterCompletedEventArgs e);
|
||||||
|
@ -3055,6 +3108,58 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
|
public delegate void GetOrganizationObjectsByDomainCompletedEventHandler(object sender, GetOrganizationObjectsByDomainCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetOrganizationObjectsByDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetOrganizationObjectsByDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.Data.DataSet Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((System.Data.DataSet)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
|
public delegate void CheckDomainUsedByHostedOrganizationCompletedEventHandler(object sender, CheckDomainUsedByHostedOrganizationCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class CheckDomainUsedByHostedOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal CheckDomainUsedByHostedOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public bool Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((bool)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e);
|
public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -36,6 +36,8 @@ using Microsoft.ApplicationBlocks.Data;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -3265,6 +3267,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteDataset(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetOrganizationObjectsByDomain",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@DomainName", domainName)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region CRM
|
#region CRM
|
||||||
|
@ -4636,10 +4650,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public static void UpdateRDSServer(RdsServer server)
|
public static void UpdateRDSServer(RdsServer server)
|
||||||
{
|
{
|
||||||
UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description,
|
UpdateRDSServer(server.Id, server.ItemId, server.Name, server.FqdName, server.Description,
|
||||||
server.RdsCollectionId);
|
server.RdsCollectionId, server.ConnectionEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId)
|
public static void UpdateRDSServer(int id, int? itemId, string name, string fqdName, string description, int? rdsCollectionId, bool connectionEnabled)
|
||||||
{
|
{
|
||||||
SqlHelper.ExecuteNonQuery(
|
SqlHelper.ExecuteNonQuery(
|
||||||
ConnectionString,
|
ConnectionString,
|
||||||
|
@ -4650,7 +4664,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
new SqlParameter("@Name", name),
|
new SqlParameter("@Name", name),
|
||||||
new SqlParameter("@FqdName", fqdName),
|
new SqlParameter("@FqdName", fqdName),
|
||||||
new SqlParameter("@Description", description),
|
new SqlParameter("@Description", description),
|
||||||
new SqlParameter("@RDSCollectionId", rdsCollectionId)
|
new SqlParameter("@RDSCollectionId", rdsCollectionId),
|
||||||
|
new SqlParameter("@ConnectionEnabled", connectionEnabled)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4729,5 +4744,127 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region MX|NX Services
|
||||||
|
|
||||||
|
public static IDataReader GetAllPackages()
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetAllPackages"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetDomainDnsRecords(int domainId, DnsRecordType recordType)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetDomainDnsRecords",
|
||||||
|
new SqlParameter("@DomainId", domainId),
|
||||||
|
new SqlParameter("@RecordType", recordType)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetDomainAllDnsRecords(int domainId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetDomainAllDnsRecords",
|
||||||
|
new SqlParameter("@DomainId", domainId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddDomainDnsRecord(DnsRecordInfo domainDnsRecord)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"AddDomainDnsRecord",
|
||||||
|
new SqlParameter("@DomainId", domainDnsRecord.DomainId),
|
||||||
|
new SqlParameter("@RecordType", domainDnsRecord.RecordType),
|
||||||
|
new SqlParameter("@DnsServer", domainDnsRecord.DnsServer),
|
||||||
|
new SqlParameter("@Value", domainDnsRecord.Value),
|
||||||
|
new SqlParameter("@Date", domainDnsRecord.Date)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetScheduleTaskEmailTemplate(string taskId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetScheduleTaskEmailTemplate",
|
||||||
|
new SqlParameter("@taskId", taskId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DeleteDomainDnsRecord(int id)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"DeleteDomainDnsRecord",
|
||||||
|
new SqlParameter("@Id", id)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateDomainCreationDate(int domainId, DateTime date)
|
||||||
|
{
|
||||||
|
UpdateDomainDate(domainId, "UpdateDomainCreationDate", date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateDomainExpirationDate(int domainId, DateTime date)
|
||||||
|
{
|
||||||
|
UpdateDomainDate(domainId, "UpdateDomainExpirationDate", date);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateDomainLastUpdateDate(int domainId, DateTime date)
|
||||||
|
{
|
||||||
|
UpdateDomainDate(domainId, "UpdateDomainLastUpdateDate", date);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UpdateDomainDate(int domainId, string stroredProcedure, DateTime date)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
stroredProcedure,
|
||||||
|
new SqlParameter("@DomainId", domainId),
|
||||||
|
new SqlParameter("@Date", date)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateDomainDates(int domainId, DateTime? domainCreationDate, DateTime? domainExpirationDate, DateTime? domainLastUpdateDate)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"UpdateDomainDates",
|
||||||
|
new SqlParameter("@DomainId", domainId),
|
||||||
|
new SqlParameter("@DomainCreationDate", domainCreationDate),
|
||||||
|
new SqlParameter("@DomainExpirationDate", domainExpirationDate),
|
||||||
|
new SqlParameter("@DomainLastUpdateDate", domainLastUpdateDate)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateWhoisDomainInfo(int domainId, DateTime? domainCreationDate, DateTime? domainExpirationDate, DateTime? domainLastUpdateDate, string registrarName)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"UpdateWhoisDomainInfo",
|
||||||
|
new SqlParameter("@DomainId", domainId),
|
||||||
|
new SqlParameter("@DomainCreationDate", domainCreationDate),
|
||||||
|
new SqlParameter("@DomainExpirationDate", domainExpirationDate),
|
||||||
|
new SqlParameter("@DomainLastUpdateDate", domainLastUpdateDate),
|
||||||
|
new SqlParameter("@DomainRegistrarName", registrarName)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
@ -38,6 +40,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
public class DnsServerController : IImportController, IBackupController
|
public class DnsServerController : IImportController, IBackupController
|
||||||
{
|
{
|
||||||
|
private static string GetAsciiZoneName(string zoneName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(zoneName)) return zoneName;
|
||||||
|
var idn = new IdnMapping();
|
||||||
|
return idn.GetAscii(zoneName);
|
||||||
|
}
|
||||||
|
|
||||||
private static DNSServer GetDNSServer(int serviceId)
|
private static DNSServer GetDNSServer(int serviceId)
|
||||||
{
|
{
|
||||||
DNSServer dns = new DNSServer();
|
DNSServer dns = new DNSServer();
|
||||||
|
@ -55,6 +64,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get DNS provider
|
// get DNS provider
|
||||||
DNSServer dns = GetDNSServer(serviceId);
|
DNSServer dns = GetDNSServer(serviceId);
|
||||||
|
|
||||||
|
// Ensure zoneName is in ascii before saving to database
|
||||||
|
zoneName = GetAsciiZoneName(zoneName);
|
||||||
|
|
||||||
// check if zone already exists
|
// check if zone already exists
|
||||||
if (dns.ZoneExists(zoneName))
|
if (dns.ZoneExists(zoneName))
|
||||||
return BusinessErrorCodes.ERROR_DNS_ZONE_EXISTS;
|
return BusinessErrorCodes.ERROR_DNS_ZONE_EXISTS;
|
||||||
|
@ -199,7 +211,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
// zone item
|
// zone item
|
||||||
DnsZone zone = primaryZone ? new DnsZone() : new SecondaryDnsZone();
|
DnsZone zone = primaryZone ? new DnsZone() : new SecondaryDnsZone();
|
||||||
zone.Name = zoneName;
|
zone.Name = GetAsciiZoneName(zoneName);
|
||||||
zone.PackageId = spaceId;
|
zone.PackageId = spaceId;
|
||||||
zone.ServiceId = serviceId;
|
zone.ServiceId = serviceId;
|
||||||
int zoneItemId = PackageController.AddPackageItem(zone);
|
int zoneItemId = PackageController.AddPackageItem(zone);
|
||||||
|
@ -280,6 +292,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
foreach (GlobalDnsRecord record in records)
|
foreach (GlobalDnsRecord record in records)
|
||||||
{
|
{
|
||||||
|
domainName = GetAsciiZoneName(domainName);
|
||||||
|
|
||||||
DnsRecord rr = new DnsRecord();
|
DnsRecord rr = new DnsRecord();
|
||||||
rr.RecordType = (DnsRecordType)Enum.Parse(typeof(DnsRecordType), record.RecordType, true);
|
rr.RecordType = (DnsRecordType)Enum.Parse(typeof(DnsRecordType), record.RecordType, true);
|
||||||
rr.RecordName = Utils.ReplaceStringVariable(record.RecordName, "host_name", hostName, true);
|
rr.RecordName = Utils.ReplaceStringVariable(record.RecordName, "host_name", hostName, true);
|
||||||
|
@ -359,8 +373,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
DNSServer dns = new DNSServer();
|
DNSServer dns = new DNSServer();
|
||||||
ServiceProviderProxy.Init(dns, serviceId);
|
ServiceProviderProxy.Init(dns, serviceId);
|
||||||
|
|
||||||
|
// IDN: The list of importable names is populated with unicode names, to make it easier for the user
|
||||||
|
var idn = new IdnMapping();
|
||||||
|
|
||||||
if (itemType == typeof(DnsZone))
|
if (itemType == typeof(DnsZone))
|
||||||
items.AddRange(dns.GetZones());
|
items.AddRange(dns.GetZones().Select(z => idn.GetUnicode(z)));
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
@ -377,7 +394,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
// add DNS zone
|
// add DNS zone
|
||||||
DnsZone zone = new DnsZone();
|
DnsZone zone = new DnsZone();
|
||||||
zone.Name = itemName;
|
zone.Name = GetAsciiZoneName(itemName);
|
||||||
zone.ServiceId = serviceId;
|
zone.ServiceId = serviceId;
|
||||||
zone.PackageId = packageId;
|
zone.PackageId = packageId;
|
||||||
int zoneId = PackageController.AddPackageItem(zone);
|
int zoneId = PackageController.AddPackageItem(zone);
|
||||||
|
|
|
@ -193,6 +193,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
|
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
|
||||||
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
|
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
|
||||||
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
|
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
|
||||||
|
|
||||||
|
stats.CreatedSharedMailboxes = tempStats.CreatedSharedMailboxes;
|
||||||
|
stats.CreatedResourceMailboxes = tempStats.CreatedResourceMailboxes;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -221,6 +224,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
|
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
|
||||||
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
|
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
|
||||||
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
|
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
|
||||||
|
|
||||||
|
stats.CreatedSharedMailboxes += tempStats.CreatedSharedMailboxes;
|
||||||
|
stats.CreatedResourceMailboxes += tempStats.CreatedResourceMailboxes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,6 +247,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
|
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
|
||||||
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
|
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
|
||||||
|
|
||||||
|
stats.AllocatedSharedMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue;
|
||||||
|
stats.AllocatedResourceMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue;
|
||||||
|
|
||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -1679,8 +1688,21 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// check mailbox quota
|
// check mailbox quota
|
||||||
OrganizationStatistics orgStats = GetOrganizationStatistics(itemId);
|
OrganizationStatistics orgStats = GetOrganizationStatistics(itemId);
|
||||||
|
if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
|
{
|
||||||
|
if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||||
|
}
|
||||||
|
else if ((accountType == ExchangeAccountType.Room) || (accountType == ExchangeAccountType.Equipment))
|
||||||
|
{
|
||||||
|
if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
|
||||||
|
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
|
if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
|
|
|
@ -507,6 +507,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool CheckDomainUsedByHostedOrganization(int itemId, int domainId)
|
||||||
|
{
|
||||||
|
DomainInfo domain = ServerController.GetDomain(domainId);
|
||||||
|
if (domain == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (DataProvider.CheckDomainUsedByHostedOrganization(domain.DomainName) == 1);
|
||||||
|
}
|
||||||
|
|
||||||
private static void DeleteOCSUsers(int itemId, ref bool successful)
|
private static void DeleteOCSUsers(int itemId, ref bool successful)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -3080,5 +3089,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public static DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return DataProvider.GetOrganizationObjectsByDomain(itemId, domainName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,10 +279,15 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
private static void PopulateOrganizationData(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateOrganizationData(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Stat populate organization data "+org.Name);
|
||||||
|
|
||||||
if (report.ExchangeReport != null)
|
if (report.ExchangeReport != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate exchange report items");
|
||||||
|
|
||||||
PopulateExchangeReportItems(org, report, topReseller);
|
PopulateExchangeReportItems(org, report, topReseller);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
|
@ -295,6 +300,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate populate CRM report items");
|
||||||
|
|
||||||
PopulateCRMReportItems(org, report, topReseller);
|
PopulateCRMReportItems(org, report, topReseller);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
|
@ -307,6 +314,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate SharePoint item ");
|
||||||
|
|
||||||
PopulateSharePointItem(org, report, topReseller);
|
PopulateSharePointItem(org, report, topReseller);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
|
@ -319,6 +328,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate Lync report items");
|
||||||
|
|
||||||
PopulateLyncReportItems(org, report, topReseller);
|
PopulateLyncReportItems(org, report, topReseller);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -331,6 +342,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate Organization statistics report");
|
||||||
|
|
||||||
PopulateOrganizationStatisticsReport(org, report, topReseller);
|
PopulateOrganizationStatisticsReport(org, report, topReseller);
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
|
@ -339,7 +352,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End populate organization data " + org.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int GetExchangeServiceID(int packageId)
|
private static int GetExchangeServiceID(int packageId)
|
||||||
|
@ -408,6 +421,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateExchangeReportItems(Organization org, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Exchange Report Items " + org.Name);
|
||||||
|
|
||||||
//Check if exchange organization
|
//Check if exchange organization
|
||||||
if (string.IsNullOrEmpty(org.GlobalAddressList))
|
if (string.IsNullOrEmpty(org.GlobalAddressList))
|
||||||
return;
|
return;
|
||||||
|
@ -420,10 +435,14 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
|
||||||
throw new ApplicationException(
|
throw new ApplicationException(
|
||||||
string.Format("Could not get mailboxes for current organization {0}", org.Id), ex);
|
string.Format("Could not get mailboxes for current organization {0}", org.Id), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("mailboxes.Count", mailboxes.Count);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
|
@ -431,6 +450,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
|
||||||
throw new ApplicationException(
|
throw new ApplicationException(
|
||||||
string.Format("Could not get exchange server. PackageId: {0}", org.PackageId), ex);
|
string.Format("Could not get exchange server. PackageId: {0}", org.PackageId), ex);
|
||||||
}
|
}
|
||||||
|
@ -440,6 +461,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.WriteParameter("mailbox", mailbox.UserPrincipalName);
|
||||||
|
|
||||||
stats = null;
|
stats = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -448,6 +471,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
|
||||||
TaskManager.WriteError(ex, "Could not get mailbox statistics. AccountName: {0}",
|
TaskManager.WriteError(ex, "Could not get mailbox statistics. AccountName: {0}",
|
||||||
mailbox.UserPrincipalName);
|
mailbox.UserPrincipalName);
|
||||||
}
|
}
|
||||||
|
@ -466,6 +491,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
stats.BlackberryEnabled = BlackBerryController.CheckBlackBerryUserExists(mailbox.AccountId);
|
stats.BlackberryEnabled = BlackBerryController.CheckBlackBerryUserExists(mailbox.AccountId);
|
||||||
report.ExchangeReport.Items.Add(stats);
|
report.ExchangeReport.Items.Add(stats);
|
||||||
|
|
||||||
|
TaskManager.Write("Items.Add");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
|
@ -474,6 +501,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End Populate Exchange Report Items " + org.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -547,6 +575,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
|
|
||||||
private static void PopulateSpaceData(int packageId, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateSpaceData(int packageId, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate SpaceData " + packageId);
|
||||||
|
|
||||||
List<Organization> organizations;
|
List<Organization> organizations;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -570,10 +600,14 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
TaskManager.WriteError(ex);
|
TaskManager.WriteError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End Populate SpaceData " + packageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PopulateUserData(UserInfo user, EnterpriseSolutionStatisticsReport report, string topReseller)
|
private static void PopulateUserData(UserInfo user, EnterpriseSolutionStatisticsReport report, string topReseller)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Populate UserData " + user.Username);
|
||||||
|
|
||||||
DataSet ds;
|
DataSet ds;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -597,10 +631,13 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End Populate UserData " + user.Username);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void GetUsersData(EnterpriseSolutionStatisticsReport report, int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport, string topReseller)
|
private static void GetUsersData(EnterpriseSolutionStatisticsReport report, int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport, string topReseller)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Get UsersData " + userId);
|
||||||
|
|
||||||
List<UserInfo> users;
|
List<UserInfo> users;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -611,9 +648,12 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
throw new ApplicationException("Cannot get users for report", ex);
|
throw new ApplicationException("Cannot get users for report", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("users.Count", users.Count);
|
||||||
|
|
||||||
foreach (UserInfo user in users)
|
foreach (UserInfo user in users)
|
||||||
{
|
{
|
||||||
|
TaskManager.WriteParameter("User", user.Username);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PopulateUserData(user, report, topReseller);
|
PopulateUserData(user, report, topReseller);
|
||||||
|
@ -632,10 +672,15 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
TaskManager.WriteError(ex);
|
TaskManager.WriteError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End get UsersData " + userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EnterpriseSolutionStatisticsReport GetEnterpriseSolutionStatisticsReport(int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport)
|
public static EnterpriseSolutionStatisticsReport GetEnterpriseSolutionStatisticsReport(int userId, bool generateExchangeReport, bool generateSharePointReport, bool generateCRMReport, bool generateOrganizationReport, bool generateLyncReport)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Get enterprise solution statistics report " + userId);
|
||||||
|
|
||||||
EnterpriseSolutionStatisticsReport report = new EnterpriseSolutionStatisticsReport();
|
EnterpriseSolutionStatisticsReport report = new EnterpriseSolutionStatisticsReport();
|
||||||
|
|
||||||
if (generateExchangeReport || generateOrganizationReport)
|
if (generateExchangeReport || generateOrganizationReport)
|
||||||
|
@ -647,7 +692,6 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
if (generateLyncReport || generateOrganizationReport)
|
if (generateLyncReport || generateOrganizationReport)
|
||||||
report.LyncReport = new LyncStatisticsReport();
|
report.LyncReport = new LyncStatisticsReport();
|
||||||
|
|
||||||
|
|
||||||
if (generateCRMReport || generateOrganizationReport)
|
if (generateCRMReport || generateOrganizationReport)
|
||||||
report.CRMReport = new CRMStatisticsReport();
|
report.CRMReport = new CRMStatisticsReport();
|
||||||
|
|
||||||
|
@ -664,6 +708,8 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
||||||
TaskManager.WriteError(ex, "Cannot get enterprise solution statistics report");
|
TaskManager.WriteError(ex, "Cannot get enterprise solution statistics report");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End get enterprise solution statistics report " + userId);
|
||||||
|
|
||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1505,6 +1505,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
/// <returns>True if quota will exceed. Otherwise, false.</returns>
|
/// <returns>True if quota will exceed. Otherwise, false.</returns>
|
||||||
protected bool VerifyIfQuotaWillBeExceeded(int packageId, string quotaName, int numberOfItemsToAdd)
|
protected bool VerifyIfQuotaWillBeExceeded(int packageId, string quotaName, int numberOfItemsToAdd)
|
||||||
{
|
{
|
||||||
|
// Don't bother to check quota if the number of items to add is zero or less otherwise IsQuotasWillExceed
|
||||||
|
// will fail when quota is set to 0 on lists or groups and still thera are no items to import
|
||||||
|
if (numberOfItemsToAdd <= 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
QuotaValueInfo quotaInfo = PackageController.GetPackageQuota(packageId, quotaName);
|
QuotaValueInfo quotaInfo = PackageController.GetPackageQuota(packageId, quotaName);
|
||||||
|
|
|
@ -40,6 +40,9 @@ using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Providers.OS;
|
using WebsitePanel.Providers.OS;
|
||||||
using OS = WebsitePanel.Providers.OS;
|
using OS = WebsitePanel.Providers.OS;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
|
@ -811,5 +814,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -980,11 +980,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
homeFolder.PackageId = packageId;
|
homeFolder.PackageId = packageId;
|
||||||
homeFolder.Name = path;
|
homeFolder.Name = path;
|
||||||
|
|
||||||
|
int res = AddPackageItem(homeFolder);
|
||||||
|
|
||||||
// Added By Haya
|
// Added By Haya
|
||||||
UpdatePackageHardQuota(packageId);
|
UpdatePackageHardQuota(packageId);
|
||||||
|
|
||||||
// save package item
|
// save package item
|
||||||
return AddPackageItem(homeFolder);
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DateTime GetPackageBandwidthUpdate(int packageId)
|
public static DateTime GetPackageBandwidthUpdate(int packageId)
|
||||||
|
|
|
@ -68,6 +68,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return AddRdsCollectionInternal(itemId, collection);
|
return AddRdsCollectionInternal(itemId, collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ResultObject EditRdsCollection(int itemId, RdsCollection collection)
|
||||||
|
{
|
||||||
|
return EditRdsCollectionInternal(itemId, collection);
|
||||||
|
}
|
||||||
|
|
||||||
public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||||
|
@ -93,9 +98,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
return GetOrganizationRdsServersPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
return GetOrganizationRdsServersPagedInternal(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
public static RdsServersPaged GetOrganizationFreeRdsServersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
|
@ -108,6 +113,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return GetRdsServerInternal(rdsSeverId);
|
return GetRdsServerInternal(rdsSeverId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||||
|
{
|
||||||
|
return SetRDServerNewConnectionAllowedInternal(itemId, newConnectionAllowed, rdsSeverId);
|
||||||
|
}
|
||||||
|
|
||||||
public static List<RdsServer> GetCollectionRdsServers(int collectionId)
|
public static List<RdsServer> GetCollectionRdsServers(int collectionId)
|
||||||
{
|
{
|
||||||
return GetCollectionRdsServersInternal(collectionId);
|
return GetCollectionRdsServersInternal(collectionId);
|
||||||
|
@ -193,6 +203,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return GetOrganizationRdsUsersCountInternal(itemId);
|
return GetOrganizationRdsUsersCountInternal(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<string> GetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp)
|
||||||
|
{
|
||||||
|
return GetApplicationUsersInternal(itemId, collectionId, remoteApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResultObject SetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp, List<string> users)
|
||||||
|
{
|
||||||
|
return SetApplicationUsersInternal(itemId, collectionId, remoteApp, users);
|
||||||
|
}
|
||||||
|
|
||||||
private static RdsCollection GetRdsCollectionInternal(int collectionId)
|
private static RdsCollection GetRdsCollectionInternal(int collectionId)
|
||||||
{
|
{
|
||||||
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
||||||
|
@ -280,6 +300,58 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static ResultObject EditRdsCollectionInternal(int itemId, RdsCollection collection)
|
||||||
|
{
|
||||||
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "EDIT_RDS_COLLECTION");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.AddError("", new NullReferenceException("Organization not found"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
|
var existingServers =
|
||||||
|
ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
|
||||||
|
var removedServers = existingServers.Where(x => !collection.Servers.Select(y => y.Id).Contains(x.Id));
|
||||||
|
var newServers = collection.Servers.Where(x => !existingServers.Select(y => y.Id).Contains(x.Id));
|
||||||
|
|
||||||
|
foreach(var server in removedServers)
|
||||||
|
{
|
||||||
|
DataProvider.RemoveRDSServerFromCollection(server.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
rds.AddRdsServersToDeployment(newServers.ToArray());
|
||||||
|
|
||||||
|
foreach (var server in newServers)
|
||||||
|
{
|
||||||
|
DataProvider.AddRDSServerToCollection(server.Id, collection.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_COLLECTION", ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
|
||||||
|
@ -420,9 +492,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true);
|
DataSet ds = DataProvider.GetRDSServersPaged(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: !collectionId.HasValue);
|
||||||
|
|
||||||
RdsServersPaged result = new RdsServersPaged();
|
RdsServersPaged result = new RdsServersPaged();
|
||||||
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
|
||||||
|
@ -457,6 +529,54 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return ObjectUtils.FillObjectFromDataReader<RdsServer>(DataProvider.GetRDSServerById(rdsSeverId));
|
return ObjectUtils.FillObjectFromDataReader<RdsServer>(DataProvider.GetRDSServerById(rdsSeverId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static ResultObject SetRDServerNewConnectionAllowedInternal(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||||
|
{
|
||||||
|
ResultObject result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED"); ;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.AddError("", new NullReferenceException("Organization not found"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
|
|
||||||
|
var rdsServer = GetRdsServer(rdsSeverId);
|
||||||
|
|
||||||
|
if (rdsServer == null)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.AddError("", new NullReferenceException("RDS Server not found"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
rds.SetRDServerNewConnectionAllowed(newConnectionAllowed, rdsServer);
|
||||||
|
rdsServer.ConnectionEnabled = newConnectionAllowed;
|
||||||
|
DataProvider.UpdateRDSServer(rdsServer);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.AddError("REMOTE_DESKTOP_SERVICES_SET_RDS_SERVER_NEW_CONNECTIONS_ALLOWED", ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static int GetOrganizationRdsUsersCountInternal(int itemId)
|
private static int GetOrganizationRdsUsersCountInternal(int itemId)
|
||||||
{
|
{
|
||||||
return DataProvider.GetOrganizationRdsUsersCount(itemId);
|
return DataProvider.GetOrganizationRdsUsersCount(itemId);
|
||||||
|
@ -479,19 +599,26 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (1 == 1)//(CheckRDSServerAvaliable(rdsServer.FqdName))
|
if (CheckRDSServerAvaliable(rdsServer.FqdName))
|
||||||
{
|
{
|
||||||
rdsServer.Id = DataProvider.AddRDSServer(rdsServer.Name, rdsServer.FqdName, rdsServer.Description);
|
rdsServer.Id = DataProvider.AddRDSServer(rdsServer.Name, rdsServer.FqdName, rdsServer.Description);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result.AddError("", new Exception("The server that you are adding, is not available"));
|
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER", new Exception("The server that you are adding, is not available"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER", ex);
|
if (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
result.AddError("Unable to add RDS Server", ex.InnerException);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.AddError("Unable to add RDS Server", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -639,7 +766,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
RdsServer rdsServer = GetRdsServer(serverId);
|
RdsServer rdsServer = GetRdsServer(serverId);
|
||||||
|
|
||||||
if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName))
|
//if (!rds.CheckSessionHostFeatureInstallation(rdsServer.FqdName))
|
||||||
{
|
{
|
||||||
rds.AddSessionHostFeatureToServer(rdsServer.FqdName);
|
rds.AddSessionHostFeatureToServer(rdsServer.FqdName);
|
||||||
}
|
}
|
||||||
|
@ -802,6 +929,61 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<string> GetApplicationUsersInternal(int itemId, int collectionId, RemoteApplication remoteApp)
|
||||||
|
{
|
||||||
|
var result = new List<string>();
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
|
var collection = GetRdsCollection(collectionId);
|
||||||
|
|
||||||
|
result.AddRange(rds.GetApplicationUsers(collection.Name, remoteApp.DisplayName));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ResultObject SetApplicationUsersInternal(int itemId, int collectionId, RemoteApplication remoteApp, List<string> users)
|
||||||
|
{
|
||||||
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "SET_REMOTE_APP_USERS");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.AddError("", new NullReferenceException("Organization not found"));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var collection = GetRdsCollection(collectionId);
|
||||||
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
|
rds.SetApplicationUsers(collection.Name, remoteApp, users.ToArray());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.AddError("REMOTE_DESKTOP_SERVICES_SET_REMOTE_APP_USERS", ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static ResultObject AddRemoteApplicationToCollectionInternal(int itemId, RdsCollection collection, RemoteApplication remoteApp)
|
private static ResultObject AddRemoteApplicationToCollectionInternal(int itemId, RdsCollection collection, RemoteApplication remoteApp)
|
||||||
{
|
{
|
||||||
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_REMOTE_APP_TO_COLLECTION");
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_REMOTE_APP_TO_COLLECTION");
|
||||||
|
@ -992,18 +1174,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
private static bool CheckRDSServerAvaliable(string hostname)
|
private static bool CheckRDSServerAvaliable(string hostname)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var ping = new Ping();
|
var ping = new Ping();
|
||||||
var reply = ping.Send(hostname, 1000); // 1 second time out (in ms)
|
var reply = ping.Send(hostname, 1000);
|
||||||
|
|
||||||
if (reply.Status == IPStatus.Success)
|
if (reply.Status == IPStatus.Success)
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
{
|
||||||
result = false;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -200,11 +200,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
//TaskManager.Write(String.Format("{0} - Invoke GetServiceItemsDiskSpace method ('{1}' items) - {2} attempt",
|
//TaskManager.Write(String.Format("{0} - Invoke GetServiceItemsDiskSpace method ('{1}' items) - {2} attempt",
|
||||||
// DateTime.Now, objItems.Count, attempt));
|
// DateTime.Now, objItems.Count, attempt));
|
||||||
|
|
||||||
|
if (objItems.Count > 0)
|
||||||
|
{
|
||||||
ServiceProvider prov = new ServiceProvider();
|
ServiceProvider prov = new ServiceProvider();
|
||||||
ServiceProviderProxy.Init(prov, serviceId);
|
ServiceProviderProxy.Init(prov, serviceId);
|
||||||
ServiceProviderItemDiskSpace[] itemsDiskSpace = prov.GetServiceItemsDiskSpace(objItems.ToArray());
|
ServiceProviderItemDiskSpace[] itemsDiskSpace = prov.GetServiceItemsDiskSpace(objItems.ToArray());
|
||||||
if (itemsDiskSpace != null && itemsDiskSpace.Length > 0)
|
if (itemsDiskSpace != null && itemsDiskSpace.Length > 0)
|
||||||
organizationDiskSpaces.AddRange(itemsDiskSpace);
|
organizationDiskSpaces.AddRange(itemsDiskSpace);
|
||||||
|
}
|
||||||
|
|
||||||
return organizationDiskSpaces.ToArray();
|
return organizationDiskSpaces.ToArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,210 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Mail;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using Whois.NET;
|
||||||
|
|
||||||
|
namespace WebsitePanel.EnterpriseServer
|
||||||
|
{
|
||||||
|
public class DomainExpirationTask: SchedulerTask
|
||||||
|
{
|
||||||
|
private static readonly string TaskId = "SCHEDULE_TASK_DOMAIN_EXPIRATION";
|
||||||
|
|
||||||
|
// Input parameters:
|
||||||
|
private static readonly string DaysBeforeNotify = "DAYS_BEFORE";
|
||||||
|
private static readonly string MailToParameter = "MAIL_TO";
|
||||||
|
private static readonly string EnableNotification = "ENABLE_NOTIFICATION";
|
||||||
|
private static readonly string IncludeNonExistenDomains = "INCLUDE_NONEXISTEN_DOMAINS";
|
||||||
|
|
||||||
|
|
||||||
|
private static readonly string MailBodyTemplateParameter = "MAIL_BODY";
|
||||||
|
private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD";
|
||||||
|
|
||||||
|
public override void DoWork()
|
||||||
|
{
|
||||||
|
BackgroundTask topTask = TaskManager.TopTask;
|
||||||
|
var domainUsers = new Dictionary<int, UserInfo>();
|
||||||
|
var checkedDomains = new List<int>();
|
||||||
|
var expiredDomains = new List<DomainInfo>();
|
||||||
|
var nonExistenDomains = new List<DomainInfo>();
|
||||||
|
var allDomains = new List<DomainInfo>();
|
||||||
|
var allTopLevelDomains = new List<DomainInfo>();
|
||||||
|
|
||||||
|
// get input parameters
|
||||||
|
int daysBeforeNotify;
|
||||||
|
bool sendEmailNotifcation = Convert.ToBoolean( topTask.GetParamValue(EnableNotification));
|
||||||
|
bool includeNonExistenDomains = Convert.ToBoolean(topTask.GetParamValue(IncludeNonExistenDomains));
|
||||||
|
|
||||||
|
// check input parameters
|
||||||
|
if (String.IsNullOrEmpty((string)topTask.GetParamValue("MAIL_TO")))
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning("The e-mail message has not been sent because 'Mail To' is empty.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int.TryParse((string)topTask.GetParamValue(DaysBeforeNotify), out daysBeforeNotify);
|
||||||
|
|
||||||
|
var user = UserController.GetUser(topTask.EffectiveUserId);
|
||||||
|
|
||||||
|
var packages = GetUserPackages(user.UserId, user.Role);
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var package in packages)
|
||||||
|
{
|
||||||
|
var domains = ServerController.GetDomains(package.PackageId);
|
||||||
|
|
||||||
|
allDomains.AddRange(domains);
|
||||||
|
|
||||||
|
domains = domains.Where(x => !x.IsSubDomain && !x.IsDomainPointer).ToList(); //Selecting top-level domains
|
||||||
|
|
||||||
|
allTopLevelDomains.AddRange(domains);
|
||||||
|
|
||||||
|
var domainUser = UserController.GetUser(package.UserId);
|
||||||
|
|
||||||
|
if (!domainUsers.ContainsKey(package.PackageId))
|
||||||
|
{
|
||||||
|
domainUsers.Add(package.PackageId, domainUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var domain in domains)
|
||||||
|
{
|
||||||
|
if (checkedDomains.Contains(domain.DomainId))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
checkedDomains.Add(domain.DomainId);
|
||||||
|
|
||||||
|
ServerController.UpdateDomainWhoisData(domain);
|
||||||
|
|
||||||
|
if (CheckDomainExpiration(domain.ExpirationDate, daysBeforeNotify))
|
||||||
|
{
|
||||||
|
expiredDomains.Add(domain);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (domain.ExpirationDate == null && domain.CreationDate == null)
|
||||||
|
{
|
||||||
|
nonExistenDomains.Add(domain);
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var subDomains = allDomains.Where(x => x.ExpirationDate == null || CheckDomainExpiration(x.ExpirationDate, daysBeforeNotify)).GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
|
||||||
|
allTopLevelDomains = allTopLevelDomains.GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
|
||||||
|
|
||||||
|
foreach (var subDomain in subDomains)
|
||||||
|
{
|
||||||
|
var mainDomain = allTopLevelDomains.Where(x => subDomain.DomainId != x.DomainId && subDomain.DomainName.ToLowerInvariant().Contains(x.DomainName.ToLowerInvariant())).OrderByDescending(s => s.DomainName.Length).FirstOrDefault(); ;
|
||||||
|
|
||||||
|
if (mainDomain != null)
|
||||||
|
{
|
||||||
|
ServerController.UpdateDomainWhoisData(subDomain, mainDomain.CreationDate, mainDomain.ExpirationDate, mainDomain.RegistrarName);
|
||||||
|
|
||||||
|
var nonExistenDomain = nonExistenDomains.FirstOrDefault(x => subDomain.DomainId == x.DomainId);
|
||||||
|
|
||||||
|
if (nonExistenDomain != null)
|
||||||
|
{
|
||||||
|
nonExistenDomains.Remove(nonExistenDomain);
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
expiredDomains = expiredDomains.GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
|
||||||
|
|
||||||
|
if (expiredDomains.Count > 0 && sendEmailNotifcation)
|
||||||
|
{
|
||||||
|
SendMailMessage(user, expiredDomains, domainUsers, nonExistenDomains, includeNonExistenDomains);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<PackageInfo> GetUserPackages(int userId,UserRole userRole)
|
||||||
|
{
|
||||||
|
var packages = new List<PackageInfo>();
|
||||||
|
|
||||||
|
switch (userRole)
|
||||||
|
{
|
||||||
|
case UserRole.Administrator:
|
||||||
|
{
|
||||||
|
packages = ObjectUtils.CreateListFromDataReader<PackageInfo>(DataProvider.GetAllPackages());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
packages = PackageController.GetMyPackages(userId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool CheckDomainExpiration(DateTime? date, int daysBeforeNotify)
|
||||||
|
{
|
||||||
|
if (date == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (date.Value - DateTime.Now).Days < daysBeforeNotify;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SendMailMessage(UserInfo user, IEnumerable<DomainInfo> domains, Dictionary<int, UserInfo> domainUsers, IEnumerable<DomainInfo> nonExistenDomains, bool includeNonExistenDomains)
|
||||||
|
{
|
||||||
|
BackgroundTask topTask = TaskManager.TopTask;
|
||||||
|
|
||||||
|
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.DOMAIN_EXPIRATION_LETTER);
|
||||||
|
|
||||||
|
string from = settings["From"];
|
||||||
|
|
||||||
|
var bcc = settings["CC"];
|
||||||
|
|
||||||
|
string subject = settings["Subject"];
|
||||||
|
string body = user.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
|
||||||
|
bool isHtml = user.HtmlMail;
|
||||||
|
|
||||||
|
MailPriority priority = MailPriority.Normal;
|
||||||
|
if (!String.IsNullOrEmpty(settings["Priority"]))
|
||||||
|
priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
|
||||||
|
|
||||||
|
// input parameters
|
||||||
|
string mailTo = (string)topTask.GetParamValue("MAIL_TO");
|
||||||
|
|
||||||
|
Hashtable items = new Hashtable();
|
||||||
|
|
||||||
|
items["user"] = user;
|
||||||
|
|
||||||
|
items["Domains"] = domains.Select(x => new { DomainName = x.DomainName,
|
||||||
|
ExpirationDate = x.ExpirationDate < DateTime.Now ? "Expired" : x.ExpirationDate.ToString(),
|
||||||
|
ExpirationDateOrdering = x.ExpirationDate,
|
||||||
|
Registrar = x.RegistrarName,
|
||||||
|
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName) })
|
||||||
|
.OrderBy(x => x.ExpirationDateOrdering).ThenBy(x => x.Customer).ThenBy(x => x.DomainName);
|
||||||
|
|
||||||
|
items["IncludeNonExistenDomains"] = includeNonExistenDomains;
|
||||||
|
|
||||||
|
items["NonExistenDomains"] = nonExistenDomains.Select(x => new
|
||||||
|
{
|
||||||
|
DomainName = x.DomainName,
|
||||||
|
Customer = string.Format("{0} {1}", domainUsers[x.PackageId].FirstName, domainUsers[x.PackageId].LastName)
|
||||||
|
}).OrderBy(x => x.Customer).ThenBy(x => x.DomainName);
|
||||||
|
|
||||||
|
|
||||||
|
body = PackageController.EvaluateTemplate(body, items);
|
||||||
|
|
||||||
|
// send mail message
|
||||||
|
MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,394 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Mail;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using WebsitePanel.Server;
|
||||||
|
|
||||||
|
namespace WebsitePanel.EnterpriseServer
|
||||||
|
{
|
||||||
|
public class DomainLookupViewTask : SchedulerTask
|
||||||
|
{
|
||||||
|
private static readonly string TaskId = "SCHEDULE_TASK_DOMAIN_LOOKUP";
|
||||||
|
|
||||||
|
// Input parameters:
|
||||||
|
private static readonly string DnsServersParameter = "DNS_SERVERS";
|
||||||
|
private static readonly string MailToParameter = "MAIL_TO";
|
||||||
|
|
||||||
|
private static readonly string MailBodyTemplateParameter = "MAIL_BODY";
|
||||||
|
private static readonly string MailBodyDomainRecordTemplateParameter = "MAIL_DOMAIN_RECORD";
|
||||||
|
private static readonly string ServerNameParameter = "SERVER_NAME";
|
||||||
|
private static readonly string PauseBetweenQueriesParameter = "PAUSE_BETWEEN_QUERIES";
|
||||||
|
|
||||||
|
private const string MxRecordPattern = @"mail exchanger = (.+)";
|
||||||
|
private const string NsRecordPattern = @"nameserver = (.+)";
|
||||||
|
private const string DnsTimeOutMessage = @"dns request timed out";
|
||||||
|
private const int DnsTimeOutRetryCount = 3;
|
||||||
|
|
||||||
|
public override void DoWork()
|
||||||
|
{
|
||||||
|
BackgroundTask topTask = TaskManager.TopTask;
|
||||||
|
|
||||||
|
List<DomainDnsChanges> domainsChanges = new List<DomainDnsChanges>();
|
||||||
|
var domainUsers = new Dictionary<int, UserInfo>();
|
||||||
|
|
||||||
|
// get input parameters
|
||||||
|
string dnsServersString = (string)topTask.GetParamValue(DnsServersParameter);
|
||||||
|
string serverName = (string)topTask.GetParamValue(ServerNameParameter);
|
||||||
|
|
||||||
|
int pause;
|
||||||
|
|
||||||
|
// check input parameters
|
||||||
|
if (String.IsNullOrEmpty(dnsServersString))
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning("Specify 'DNS' task parameter.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty((string)topTask.GetParamValue("MAIL_TO")))
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning("The e-mail message has not been sent because 'Mail To' is empty.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!int.TryParse((string)topTask.GetParamValue(PauseBetweenQueriesParameter), out pause))
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning("The 'pause between queries' parameter is not valid.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find server by name
|
||||||
|
ServerInfo server = ServerController.GetServerByName(serverName);
|
||||||
|
if (server == null)
|
||||||
|
{
|
||||||
|
TaskManager.WriteWarning(String.Format("Server with the name '{0}' was not found", serverName));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
WindowsServer winServer = new WindowsServer();
|
||||||
|
ServiceProviderProxy.ServerInit(winServer, server.ServerId);
|
||||||
|
|
||||||
|
var user = UserController.GetUser(topTask.UserId);
|
||||||
|
|
||||||
|
var dnsServers = dnsServersString.Split(';');
|
||||||
|
|
||||||
|
var packages = ObjectUtils.CreateListFromDataReader<PackageInfo>(DataProvider.GetAllPackages());
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var package in packages)
|
||||||
|
{
|
||||||
|
var domains = ServerController.GetDomains(package.PackageId);
|
||||||
|
|
||||||
|
domains = domains.Where(x => !x.IsSubDomain && !x.IsDomainPointer).ToList(); //Selecting top-level domains
|
||||||
|
|
||||||
|
//domains = domains.Where(x => x.ZoneItemId > 0).ToList(); //Selecting only dns enabled domains
|
||||||
|
|
||||||
|
foreach (var domain in domains)
|
||||||
|
{
|
||||||
|
if (domainsChanges.Any(x => x.DomainName == domain.DomainName))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!domainUsers.ContainsKey(domain.PackageId))
|
||||||
|
{
|
||||||
|
var domainUser = UserController.GetUser(packages.First(x=>x.PackageId == domain.PackageId).UserId);
|
||||||
|
|
||||||
|
domainUsers.Add(domain.PackageId, domainUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
DomainDnsChanges domainChanges = new DomainDnsChanges();
|
||||||
|
domainChanges.DomainName = domain.DomainName;
|
||||||
|
domainChanges.PackageId = domain.PackageId;
|
||||||
|
domainChanges.Registrar = domain.RegistrarName;
|
||||||
|
domainChanges.ExpirationDate = domain.ExpirationDate;
|
||||||
|
|
||||||
|
var dbDnsRecords = ObjectUtils.CreateListFromDataReader<DnsRecordInfo>(DataProvider.GetDomainAllDnsRecords(domain.DomainId));
|
||||||
|
|
||||||
|
//execute server
|
||||||
|
foreach (var dnsServer in dnsServers)
|
||||||
|
{
|
||||||
|
var dnsMxRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.MX, pause) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.MX).ToList();
|
||||||
|
var dnsNsRecords = GetDomainDnsRecords(winServer, domain.DomainName, dnsServer, DnsRecordType.NS, pause) ?? dbDnsRecords.Where(x => x.RecordType == DnsRecordType.NS).ToList();
|
||||||
|
|
||||||
|
FillRecordData(dnsMxRecords, domain, dnsServer);
|
||||||
|
FillRecordData(dnsNsRecords, domain, dnsServer);
|
||||||
|
|
||||||
|
domainChanges.DnsChanges.AddRange(ApplyDomainRecordsChanges(dbDnsRecords.Where(x => x.RecordType == DnsRecordType.MX), dnsMxRecords, dnsServer));
|
||||||
|
domainChanges.DnsChanges.AddRange(ApplyDomainRecordsChanges(dbDnsRecords.Where(x => x.RecordType == DnsRecordType.NS), dnsNsRecords, dnsServer));
|
||||||
|
|
||||||
|
domainChanges.DnsChanges = CombineDnsRecordChanges(domainChanges.DnsChanges, dnsServer).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
domainsChanges.Add(domainChanges);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var changedDomains = FindDomainsWithChangedRecords(domainsChanges);
|
||||||
|
|
||||||
|
SendMailMessage(user, changedDomains, domainUsers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region Helpers
|
||||||
|
|
||||||
|
private IEnumerable<DomainDnsChanges> FindDomainsWithChangedRecords(IEnumerable<DomainDnsChanges> domainsChanges)
|
||||||
|
{
|
||||||
|
var changedDomains = new List<DomainDnsChanges>();
|
||||||
|
|
||||||
|
foreach (var domainChanges in domainsChanges)
|
||||||
|
{
|
||||||
|
var firstTimeAdditon = domainChanges.DnsChanges.All(x => x.Status == DomainDnsRecordStatuses.Added);
|
||||||
|
|
||||||
|
if (firstTimeAdditon)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isChanged = domainChanges.DnsChanges.Any(d => d.Status != DomainDnsRecordStatuses.NotChanged);
|
||||||
|
|
||||||
|
if (isChanged)
|
||||||
|
{
|
||||||
|
changedDomains.Add(domainChanges);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return changedDomains;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<DnsRecordInfoChange> ApplyDomainRecordsChanges(IEnumerable<DnsRecordInfo> dbRecords, List<DnsRecordInfo> dnsRecords, string dnsServer)
|
||||||
|
{
|
||||||
|
var dnsRecordChanges = new List<DnsRecordInfoChange>();
|
||||||
|
|
||||||
|
var filteredDbRecords = dbRecords.Where(x => x.DnsServer == dnsServer);
|
||||||
|
|
||||||
|
foreach (var record in filteredDbRecords)
|
||||||
|
{
|
||||||
|
var dnsRecord = dnsRecords.FirstOrDefault(x => x.Value == record.Value);
|
||||||
|
|
||||||
|
if (dnsRecord != null)
|
||||||
|
{
|
||||||
|
dnsRecordChanges.Add(new DnsRecordInfoChange { OldRecord = record, NewRecord = dnsRecord, Type = record.RecordType, Status = DomainDnsRecordStatuses.NotChanged, DnsServer = dnsServer });
|
||||||
|
|
||||||
|
dnsRecords.Remove(dnsRecord);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dnsRecordChanges.Add(new DnsRecordInfoChange { OldRecord = record, NewRecord = new DnsRecordInfo { Value = string.Empty}, Type = record.RecordType, Status = DomainDnsRecordStatuses.Removed, DnsServer = dnsServer });
|
||||||
|
|
||||||
|
RemoveRecord(record);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var record in dnsRecords)
|
||||||
|
{
|
||||||
|
dnsRecordChanges.Add(new DnsRecordInfoChange { OldRecord = new DnsRecordInfo { Value = string.Empty }, NewRecord = record, Type = record.RecordType, Status = DomainDnsRecordStatuses.Added, DnsServer = dnsServer });
|
||||||
|
|
||||||
|
AddRecord(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dnsRecordChanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<DnsRecordInfoChange> CombineDnsRecordChanges(IEnumerable<DnsRecordInfoChange> records, string dnsServer)
|
||||||
|
{
|
||||||
|
var resultRecords = records.Where(x => x.DnsServer == dnsServer).ToList();
|
||||||
|
|
||||||
|
var recordsToRemove = new List<DnsRecordInfoChange>();
|
||||||
|
|
||||||
|
var removedRecords = records.Where(x => x.Status == DomainDnsRecordStatuses.Removed);
|
||||||
|
var addedRecords = records.Where(x => x.Status == DomainDnsRecordStatuses.Added);
|
||||||
|
|
||||||
|
foreach (DnsRecordType type in (DnsRecordType[])Enum.GetValues(typeof(DnsRecordType)))
|
||||||
|
{
|
||||||
|
foreach (var removedRecord in removedRecords.Where(x => x.Type == type))
|
||||||
|
{
|
||||||
|
var addedRecord = addedRecords.FirstOrDefault(x => x.Type == type && !recordsToRemove.Contains(x));
|
||||||
|
|
||||||
|
if (addedRecord != null)
|
||||||
|
{
|
||||||
|
recordsToRemove.Add(addedRecord);
|
||||||
|
|
||||||
|
removedRecord.NewRecord = addedRecord.NewRecord;
|
||||||
|
removedRecord.Status = DomainDnsRecordStatuses.Updated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var record in recordsToRemove)
|
||||||
|
{
|
||||||
|
resultRecords.Remove(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FillRecordData(IEnumerable<DnsRecordInfo> records, DomainInfo domain, string dnsServer)
|
||||||
|
{
|
||||||
|
foreach (var record in records)
|
||||||
|
{
|
||||||
|
FillRecordData(record, domain, dnsServer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FillRecordData(DnsRecordInfo record, DomainInfo domain, string dnsServer)
|
||||||
|
{
|
||||||
|
record.DomainId = domain.DomainId;
|
||||||
|
record.Date = DateTime.Now;
|
||||||
|
record.DnsServer = dnsServer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveRecords(IEnumerable<DnsRecordInfo> dnsRecords)
|
||||||
|
{
|
||||||
|
foreach (var record in dnsRecords)
|
||||||
|
{
|
||||||
|
RemoveRecord(record);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveRecord(DnsRecordInfo dnsRecord)
|
||||||
|
{
|
||||||
|
DataProvider.DeleteDomainDnsRecord(dnsRecord.Id);
|
||||||
|
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddRecords(IEnumerable<DnsRecordInfo> dnsRecords)
|
||||||
|
{
|
||||||
|
foreach (var record in dnsRecords)
|
||||||
|
{
|
||||||
|
AddRecord(record);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddRecord(DnsRecordInfo dnsRecord)
|
||||||
|
{
|
||||||
|
DataProvider.AddDomainDnsRecord(dnsRecord);
|
||||||
|
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SendMailMessage(UserInfo user, IEnumerable<DomainDnsChanges> domainsChanges, Dictionary<int, UserInfo> domainUsers)
|
||||||
|
{
|
||||||
|
BackgroundTask topTask = TaskManager.TopTask;
|
||||||
|
|
||||||
|
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.DOMAIN_LOOKUP_LETTER);
|
||||||
|
|
||||||
|
string from = settings["From"];
|
||||||
|
|
||||||
|
var bcc = settings["CC"];
|
||||||
|
|
||||||
|
string subject = settings["Subject"];
|
||||||
|
|
||||||
|
MailPriority priority = MailPriority.Normal;
|
||||||
|
if (!String.IsNullOrEmpty(settings["Priority"]))
|
||||||
|
priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
|
||||||
|
|
||||||
|
// input parameters
|
||||||
|
string mailTo = (string)topTask.GetParamValue("MAIL_TO");
|
||||||
|
|
||||||
|
string body = string.Empty;
|
||||||
|
bool isHtml = user.HtmlMail;
|
||||||
|
|
||||||
|
if (domainsChanges.Any())
|
||||||
|
{
|
||||||
|
body = user.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
body = user.HtmlMail ? settings["NoChangesHtmlBody"] : settings["NoChangesTextBody"];
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashtable items = new Hashtable();
|
||||||
|
|
||||||
|
items["user"] = user;
|
||||||
|
items["DomainUsers"] = domainUsers;
|
||||||
|
items["Domains"] = domainsChanges;
|
||||||
|
|
||||||
|
body = PackageController.EvaluateTemplate(body, items);
|
||||||
|
|
||||||
|
// send mail message
|
||||||
|
MailHelper.SendMessage(from, mailTo, bcc, subject, body, priority, isHtml);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DnsRecordInfo> GetDomainDnsRecords(WindowsServer winServer, string domain, string dnsServer, DnsRecordType recordType, int pause)
|
||||||
|
{
|
||||||
|
Thread.Sleep(pause);
|
||||||
|
|
||||||
|
//nslookup -type=mx google.com 195.46.39.39
|
||||||
|
var command = "nslookup";
|
||||||
|
var args = string.Format("-type={0} {1} {2}", recordType, domain, dnsServer);
|
||||||
|
|
||||||
|
// execute system command
|
||||||
|
var raw = string.Empty;
|
||||||
|
int triesCount = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
raw = winServer.ExecuteSystemCommand(command, args);
|
||||||
|
}
|
||||||
|
while (raw.ToLowerInvariant().Contains(DnsTimeOutMessage) && ++triesCount < DnsTimeOutRetryCount);
|
||||||
|
|
||||||
|
//timeout check
|
||||||
|
if (raw.ToLowerInvariant().Contains(DnsTimeOutMessage))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var records = ParseNsLookupResult(raw, dnsServer, recordType);
|
||||||
|
|
||||||
|
return records.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<DnsRecordInfo> ParseNsLookupResult(string raw, string dnsServer, DnsRecordType recordType)
|
||||||
|
{
|
||||||
|
var records = new List<DnsRecordInfo>();
|
||||||
|
|
||||||
|
var recordTypePattern = string.Empty;
|
||||||
|
|
||||||
|
switch (recordType)
|
||||||
|
{
|
||||||
|
case DnsRecordType.NS:
|
||||||
|
{
|
||||||
|
recordTypePattern = NsRecordPattern;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DnsRecordType.MX:
|
||||||
|
{
|
||||||
|
recordTypePattern = MxRecordPattern;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var regex = new Regex(recordTypePattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
foreach (Match match in regex.Matches(raw))
|
||||||
|
{
|
||||||
|
if (match.Groups.Count != 2)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dnsRecord = new DnsRecordInfo
|
||||||
|
{
|
||||||
|
Value = match.Groups[1].Value != null ? match.Groups[1].Value.Replace("\r\n", "").Replace("\r", "").Replace("\n", "").ToLowerInvariant().Trim() : null,
|
||||||
|
RecordType = recordType,
|
||||||
|
DnsServer = dnsServer
|
||||||
|
};
|
||||||
|
|
||||||
|
records.Add(dnsRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -32,6 +32,7 @@ using System.IO;
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
|
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
|
||||||
|
@ -51,6 +52,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("Start HostedSolutionReportTask");
|
||||||
|
|
||||||
BackgroundTask topTask = TaskManager.TopTask;
|
BackgroundTask topTask = TaskManager.TopTask;
|
||||||
|
|
||||||
bool isExchange = Utils.ParseBool(topTask.GetParamValue(EXCHANGE_REPORT), false);
|
bool isExchange = Utils.ParseBool(topTask.GetParamValue(EXCHANGE_REPORT), false);
|
||||||
|
@ -61,23 +64,41 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
string email = topTask.GetParamValue(EMAIL).ToString();
|
string email = topTask.GetParamValue(EMAIL).ToString();
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("isExchange",isExchange);
|
||||||
|
TaskManager.WriteParameter("isSharePoint",isSharePoint);
|
||||||
|
TaskManager.WriteParameter("isLync", isLync);
|
||||||
|
TaskManager.WriteParameter("isCRM", isCRM);
|
||||||
|
TaskManager.WriteParameter("isOrganization", isOrganization);
|
||||||
|
TaskManager.WriteParameter("email", email);
|
||||||
|
|
||||||
UserInfo user = PackageController.GetPackageOwner(topTask.PackageId);
|
UserInfo user = PackageController.GetPackageOwner(topTask.PackageId);
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("user", user.Username);
|
||||||
|
|
||||||
EnterpriseSolutionStatisticsReport report =
|
EnterpriseSolutionStatisticsReport report =
|
||||||
ReportController.GetEnterpriseSolutionStatisticsReport(user.UserId, isExchange, isSharePoint, isCRM,
|
ReportController.GetEnterpriseSolutionStatisticsReport(user.UserId, isExchange, isSharePoint, isCRM,
|
||||||
isOrganization, isLync);
|
isOrganization, isLync);
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("report.ExchangeReport.Items.Count", report.ExchangeReport.Items.Count);
|
||||||
|
TaskManager.WriteParameter("report.SharePointReport.Items.Count", report.SharePointReport.Items.Count);
|
||||||
|
TaskManager.WriteParameter("report.CRMReport.Items.Count", report.CRMReport.Items.Count);
|
||||||
|
TaskManager.WriteParameter("report.OrganizationReport.Items.Count", report.OrganizationReport.Items.Count);
|
||||||
|
TaskManager.WriteParameter("report.LyncReport.Items.Count", report.LyncReport.Items.Count);
|
||||||
|
|
||||||
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);
|
isLync && report.LyncReport != null ? report.LyncReport.ToCSV() : string.Empty);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
TaskManager.WriteError(ex);
|
TaskManager.WriteError(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskManager.Write("End HostedSolutionReportTask");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,6 +118,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
private void SendMessage(UserInfo user,string email, string exchange_csv, string sharepoint_csv, string crm_csv, string organization_csv, string lync_csv)
|
private void SendMessage(UserInfo user,string email, string exchange_csv, string sharepoint_csv, string crm_csv, string organization_csv, string lync_csv)
|
||||||
{
|
{
|
||||||
|
TaskManager.Write("SendMessage");
|
||||||
|
|
||||||
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);
|
||||||
|
@ -104,9 +127,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
PrepareAttament("crm.csv", crm_csv, attacments);
|
PrepareAttament("crm.csv", crm_csv, attacments);
|
||||||
PrepareAttament("organization.csv", organization_csv, attacments);
|
PrepareAttament("organization.csv", organization_csv, attacments);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// get letter settings
|
// get letter settings
|
||||||
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.HOSTED_SOLUTION_REPORT);
|
UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.HOSTED_SOLUTION_REPORT);
|
||||||
|
|
||||||
|
@ -118,7 +138,27 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
MailPriority priority = MailPriority.Normal;
|
MailPriority priority = MailPriority.Normal;
|
||||||
|
|
||||||
MailHelper.SendMessage(from, email, cc, subject, body, priority, isHtml, attacments.ToArray());
|
TaskManager.WriteParameter("from", from);
|
||||||
|
TaskManager.WriteParameter("email", email);
|
||||||
|
TaskManager.WriteParameter("subject", subject);
|
||||||
|
TaskManager.WriteParameter("body", body);
|
||||||
|
|
||||||
|
|
||||||
|
int res = MailHelper.SendMessage(from, email, cc, subject, body, priority, isHtml, attacments.ToArray());
|
||||||
|
|
||||||
|
if (res==0)
|
||||||
|
{
|
||||||
|
TaskManager.Write("SendMessage OK");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskManager.WriteError("SendMessage error ", "error code", res.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager.WriteParameter("", res);
|
||||||
|
|
||||||
|
TaskManager.Write("End SendMessage");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
@ -39,6 +40,11 @@ using WebsitePanel.Server;
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
using WebsitePanel.Providers.Web;
|
using WebsitePanel.Providers.Web;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using Whois.NET;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -49,6 +55,35 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
private const string LOG_SOURCE_SERVERS = "SERVERS";
|
private const string LOG_SOURCE_SERVERS = "SERVERS";
|
||||||
|
|
||||||
|
private static List<string> _createdDatePatterns = new List<string> { @"Creation Date:(.+)", // base
|
||||||
|
@"created:(.+)",
|
||||||
|
@"Created On:(.+) UTC",
|
||||||
|
@"Created On:(.+)",
|
||||||
|
@"Domain Registration Date:(.+)",
|
||||||
|
@"Domain Create Date:(.+)",
|
||||||
|
@"Registered on:(.+)"};
|
||||||
|
|
||||||
|
private static List<string> _expiredDatePatterns = new List<string> { @"Expiration Date:(.+) UTC", //base UTC
|
||||||
|
@"Expiration Date:(.+)", // base
|
||||||
|
@"Registry Expiry Date:(.+)", //.org
|
||||||
|
@"paid-till:(.+)", //.ru
|
||||||
|
@"Expires On:(.+)", //.name
|
||||||
|
@"Domain Expiration Date:(.+)", //.us
|
||||||
|
@"renewal date:(.+)", //.pl
|
||||||
|
@"Expiry date:(.+)", //.uk
|
||||||
|
@"anniversary:(.+)", //.fr
|
||||||
|
@"expires:(.+)" //.fi
|
||||||
|
};
|
||||||
|
|
||||||
|
private static List<string> _registrarNamePatterns = new List<string> {
|
||||||
|
@"Created by Registrar:(.+)",
|
||||||
|
@"Registrar:(.+)",
|
||||||
|
@"Registrant Name:(.+)"
|
||||||
|
};
|
||||||
|
|
||||||
|
private static List<string> _datePatterns = new List<string> { @"ddd MMM dd HH:mm:ss G\MT yyyy"
|
||||||
|
};
|
||||||
|
|
||||||
#region Servers
|
#region Servers
|
||||||
public static List<ServerInfo> GetAllServers()
|
public static List<ServerInfo> GetAllServers()
|
||||||
{
|
{
|
||||||
|
@ -1613,6 +1648,26 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Domains
|
#region Domains
|
||||||
|
|
||||||
|
public static List<DnsRecordInfo> GetDomainDnsRecords(int domainId)
|
||||||
|
{
|
||||||
|
var result = new List<DnsRecordInfo>();
|
||||||
|
|
||||||
|
var records = ObjectUtils.CreateListFromDataReader<DnsRecordInfo>(DataProvider.GetDomainAllDnsRecords(domainId));
|
||||||
|
|
||||||
|
var activeDomain = records.OrderByDescending(x => x.Date).FirstOrDefault();
|
||||||
|
|
||||||
|
if (activeDomain != null)
|
||||||
|
{
|
||||||
|
records = records.Where(x => x.DnsServer == activeDomain.DnsServer).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
result.AddRange(records);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int CheckDomain(string domainName)
|
public static int CheckDomain(string domainName)
|
||||||
{
|
{
|
||||||
int checkDomainResult = DataProvider.CheckDomain(-10, domainName, false);
|
int checkDomainResult = DataProvider.CheckDomain(-10, domainName, false);
|
||||||
|
@ -1787,6 +1842,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPS, domain, "");
|
||||||
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
|
ServerController.AddServiceDNSRecords(packageId, ResourceGroups.VPSForPC, domain, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateDomainWhoisData(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add instant alias
|
// add instant alias
|
||||||
|
@ -2138,11 +2195,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find and delete all zone items for this domain
|
||||||
|
var zoneItems = PackageController.GetPackageItemsByType(domain.PackageId, ResourceGroups.Dns, typeof (DnsZone));
|
||||||
|
zoneItems.AddRange(PackageController.GetPackageItemsByType(domain.PackageId, ResourceGroups.Dns, typeof(SecondaryDnsZone)));
|
||||||
|
|
||||||
// remove DNS zone meta-item if required
|
foreach (var zoneItem in zoneItems.Where(z => z.Name == domain.ZoneName))
|
||||||
if (domain.ZoneItemId > 0)
|
|
||||||
{
|
{
|
||||||
PackageController.DeletePackageItem(domain.ZoneItemId);
|
PackageController.DeletePackageItem(zoneItem.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete domain
|
// delete domain
|
||||||
|
@ -2637,6 +2696,79 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
TaskManager.CompleteTask();
|
TaskManager.CompleteTask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DomainInfo UpdateDomainWhoisData(DomainInfo domain)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var whoisResult = WhoisClient.Query(domain.DomainName.ToLowerInvariant());
|
||||||
|
|
||||||
|
string creationDateString = ParseWhoisDomainInfo(whoisResult.Raw, _createdDatePatterns);
|
||||||
|
string expirationDateString = ParseWhoisDomainInfo(whoisResult.Raw, _expiredDatePatterns);
|
||||||
|
|
||||||
|
domain.CreationDate = ParseDate(creationDateString);
|
||||||
|
domain.ExpirationDate = ParseDate(expirationDateString);
|
||||||
|
domain.RegistrarName = ParseWhoisDomainInfo(whoisResult.Raw, _registrarNamePatterns);
|
||||||
|
|
||||||
|
DataProvider.UpdateWhoisDomainInfo(domain.DomainId, domain.CreationDate, domain.ExpirationDate, DateTime.Now, domain.RegistrarName);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
//wrong domain
|
||||||
|
}
|
||||||
|
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DomainInfo UpdateDomainWhoisData(DomainInfo domain, DateTime? creationDate, DateTime? expirationDate, string registrarName)
|
||||||
|
{
|
||||||
|
DataProvider.UpdateWhoisDomainInfo(domain.DomainId, creationDate, expirationDate, DateTime.Now, registrarName);
|
||||||
|
|
||||||
|
domain.CreationDate = creationDate;
|
||||||
|
domain.ExpirationDate = expirationDate;
|
||||||
|
domain.RegistrarName = registrarName;
|
||||||
|
|
||||||
|
return domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ParseWhoisDomainInfo(string raw, IEnumerable<string> patterns)
|
||||||
|
{
|
||||||
|
foreach (var createdRegex in patterns)
|
||||||
|
{
|
||||||
|
var regex = new Regex(createdRegex, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
foreach (Match match in regex.Matches(raw))
|
||||||
|
{
|
||||||
|
if (match.Success && match.Groups.Count == 2)
|
||||||
|
{
|
||||||
|
return match.Groups[1].ToString().Trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DateTime? ParseDate(string dateString)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(dateString))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = DateTime.MinValue;
|
||||||
|
|
||||||
|
foreach (var datePattern in _datePatterns)
|
||||||
|
{
|
||||||
|
if (DateTime.TryParseExact(dateString, datePattern, CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return DateTime.Parse(dateString);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region DNS Zones
|
#region DNS Zones
|
||||||
|
@ -2654,7 +2786,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
DNSServer dns = new DNSServer();
|
DNSServer dns = new DNSServer();
|
||||||
ServiceProviderProxy.Init(dns, zoneItem.ServiceId);
|
ServiceProviderProxy.Init(dns, zoneItem.ServiceId);
|
||||||
|
|
||||||
return dns.GetZoneRecords(domain.DomainName);
|
return dns.GetZoneRecords(zoneItem.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DnsRecord[] { };
|
return new DnsRecord[] { };
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
<Reference Include="Ionic.Zip.Reduced">
|
<Reference Include="Ionic.Zip.Reduced">
|
||||||
<HintPath>..\..\Lib\Ionic.Zip.Reduced.dll</HintPath>
|
<HintPath>..\..\Lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="IPAddressRange">
|
||||||
|
<HintPath>..\..\Lib\References\Whois.NET\IPAddressRange.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Web.Services3">
|
<Reference Include="Microsoft.Web.Services3">
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
@ -62,6 +65,9 @@
|
||||||
<Reference Include="WebsitePanel.Server.Client">
|
<Reference Include="WebsitePanel.Server.Client">
|
||||||
<HintPath>..\..\Bin\WebsitePanel.Server.Client.dll</HintPath>
|
<HintPath>..\..\Bin\WebsitePanel.Server.Client.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="WhoisClient">
|
||||||
|
<HintPath>..\..\Lib\References\Whois.NET\WhoisClient.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Comments\CommentsController.cs" />
|
<Compile Include="Comments\CommentsController.cs" />
|
||||||
|
@ -140,9 +146,11 @@
|
||||||
<Compile Include="SchedulerTasks\CalculatePackagesDiskspaceTask.cs" />
|
<Compile Include="SchedulerTasks\CalculatePackagesDiskspaceTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\CancelOverdueInvoicesTask.cs" />
|
<Compile Include="SchedulerTasks\CancelOverdueInvoicesTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\CheckWebSiteTask.cs" />
|
<Compile Include="SchedulerTasks\CheckWebSiteTask.cs" />
|
||||||
|
<Compile Include="SchedulerTasks\DomainExpirationTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\FTPFilesTask.cs" />
|
<Compile Include="SchedulerTasks\FTPFilesTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\GenerateInvoicesTask.cs" />
|
<Compile Include="SchedulerTasks\GenerateInvoicesTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\HostedSolutionReport.cs" />
|
<Compile Include="SchedulerTasks\HostedSolutionReport.cs" />
|
||||||
|
<Compile Include="SchedulerTasks\DomainLookupViewTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\NotifyOverusedDatabasesTask.cs" />
|
<Compile Include="SchedulerTasks\NotifyOverusedDatabasesTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\RunPaymentQueueTask.cs" />
|
<Compile Include="SchedulerTasks\RunPaymentQueueTask.cs" />
|
||||||
<Compile Include="SchedulerTasks\RunSystemCommandTask.cs" />
|
<Compile Include="SchedulerTasks\RunSystemCommandTask.cs" />
|
||||||
|
|
|
@ -164,6 +164,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return OrganizationController.SetOrganizationDefaultDomain(itemId, domainId);
|
return OrganizationController.SetOrganizationDefaultDomain(itemId, domainId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
|
||||||
|
{
|
||||||
|
return OrganizationController.GetOrganizationObjectsByDomain(itemId, domainName);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public bool CheckDomainUsedByHostedOrganization(int itemId, int domainId)
|
||||||
|
{
|
||||||
|
return OrganizationController.CheckDomainUsedByHostedOrganization(itemId, domainId);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Users
|
#region Users
|
||||||
|
|
|
@ -70,6 +70,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
|
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject EditRdsCollection(int itemId, RdsCollection collection)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.EditRdsCollection(itemId, collection);
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
|
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
|
||||||
string sortColumn, int startRow, int maximumRows)
|
string sortColumn, int startRow, int maximumRows)
|
||||||
|
@ -101,10 +107,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, string filterColumn, string filterValue,
|
public RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue,
|
||||||
string sortColumn, int startRow, int maximumRows)
|
string sortColumn, int startRow, int maximumRows)
|
||||||
{
|
{
|
||||||
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, filterColumn, filterValue,
|
return RemoteDesktopServicesController.GetOrganizationRdsServersPaged(itemId, collectionId, filterColumn, filterValue,
|
||||||
sortColumn, startRow, maximumRows);
|
sortColumn, startRow, maximumRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +128,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return RemoteDesktopServicesController.GetRdsServer(rdsSeverId);
|
return RemoteDesktopServicesController.GetRdsServer(rdsSeverId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject SetRDServerNewConnectionAllowed(int itemId, bool newConnectionAllowed, int rdsSeverId)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.SetRDServerNewConnectionAllowed(itemId, newConnectionAllowed, rdsSeverId);
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<RdsServer> GetCollectionRdsServers(int collectionId)
|
public List<RdsServer> GetCollectionRdsServers(int collectionId)
|
||||||
{
|
{
|
||||||
|
@ -224,5 +236,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return RemoteDesktopServicesController.GetOrganizationRdsUsersCount(itemId);
|
return RemoteDesktopServicesController.GetOrganizationRdsUsersCount(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public List<string> GetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.GetApplicationUsers(itemId, collectionId, remoteApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject SetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp, List<string> users)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.SetApplicationUsers(itemId, collectionId, remoteApp, users);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ using WebsitePanel.Providers.DNS;
|
||||||
using WebsitePanel.Server;
|
using WebsitePanel.Server;
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -521,6 +522,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Domains
|
#region Domains
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public List<DnsRecordInfo> GetDomainDnsRecords(int domainId)
|
||||||
|
{
|
||||||
|
return ServerController.GetDomainDnsRecords(domainId);
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public List<DomainInfo> GetDomains(int packageId)
|
public List<DomainInfo> GetDomains(int packageId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.DomainLookup
|
||||||
|
{
|
||||||
|
public class DnsRecordInfo
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int DomainId { get; set; }
|
||||||
|
public string DnsServer { get; set; }
|
||||||
|
public DnsRecordType RecordType { get; set; }
|
||||||
|
public string Value { get; set; }
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.DomainLookup
|
||||||
|
{
|
||||||
|
public class DnsRecordInfoChange
|
||||||
|
{
|
||||||
|
public string DnsServer { get; set; }
|
||||||
|
public DnsRecordInfo OldRecord { get; set; }
|
||||||
|
public DnsRecordInfo NewRecord { get; set; }
|
||||||
|
public DomainDnsRecordStatuses Status { get; set; }
|
||||||
|
public DnsRecordType Type { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.DomainLookup
|
||||||
|
{
|
||||||
|
public class DomainDnsChanges
|
||||||
|
{
|
||||||
|
public string DomainName { get; set; }
|
||||||
|
public string Registrar { get; set; }
|
||||||
|
public DateTime? ExpirationDate { get; set; }
|
||||||
|
public int PackageId { get; set; }
|
||||||
|
|
||||||
|
public List<DnsRecordInfoChange> DnsChanges { get; set; }
|
||||||
|
|
||||||
|
public DomainDnsChanges()
|
||||||
|
{
|
||||||
|
DnsChanges = new List<DnsRecordInfoChange>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.DomainLookup
|
||||||
|
{
|
||||||
|
public enum DomainDnsRecordStatuses
|
||||||
|
{
|
||||||
|
NotChanged,
|
||||||
|
Removed,
|
||||||
|
Added,
|
||||||
|
Updated
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,7 +39,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
Equipment = 6,
|
Equipment = 6,
|
||||||
User = 7,
|
User = 7,
|
||||||
SecurityGroup = 8,
|
SecurityGroup = 8,
|
||||||
DefaultSecurityGroup = 9
|
DefaultSecurityGroup = 9,
|
||||||
|
SharedMailbox = 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,15 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
int itemId;
|
int itemId;
|
||||||
int mailboxPlanId;
|
int mailboxPlanId;
|
||||||
string mailboxPlan;
|
string mailboxPlan;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
if (mailboxPlan != null)
|
||||||
|
return mailboxPlan;
|
||||||
|
|
||||||
|
return base.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
int mailboxSizeMB;
|
int mailboxSizeMB;
|
||||||
int maxRecipients;
|
int maxRecipients;
|
||||||
int maxSendMessageSizeKB;
|
int maxSendMessageSizeKB;
|
||||||
|
@ -63,7 +72,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
string litigationHoldUrl;
|
string litigationHoldUrl;
|
||||||
string litigationHoldMsg;
|
string litigationHoldMsg;
|
||||||
|
|
||||||
|
|
||||||
public int ItemId
|
public int ItemId
|
||||||
{
|
{
|
||||||
get { return this.itemId; }
|
get { return this.itemId; }
|
||||||
|
|
|
@ -341,6 +341,36 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
get { return usedArchingStorage; }
|
get { return usedArchingStorage; }
|
||||||
set { usedArchingStorage = value; }
|
set { usedArchingStorage = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int allocatedSharedMailboxes;
|
||||||
|
public int AllocatedSharedMailboxes
|
||||||
|
{
|
||||||
|
get { return allocatedSharedMailboxes; }
|
||||||
|
set { allocatedSharedMailboxes = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
int createdSharedMailboxes;
|
||||||
|
public int CreatedSharedMailboxes
|
||||||
|
{
|
||||||
|
get { return createdSharedMailboxes; }
|
||||||
|
set { createdSharedMailboxes = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
int allocatedResourceMailboxes;
|
||||||
|
public int AllocatedResourceMailboxes
|
||||||
|
{
|
||||||
|
get { return allocatedResourceMailboxes; }
|
||||||
|
set { allocatedResourceMailboxes = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
int createdResourceMailboxes;
|
||||||
|
public int CreatedResourceMailboxes
|
||||||
|
{
|
||||||
|
get { return createdResourceMailboxes; }
|
||||||
|
set { createdResourceMailboxes = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,6 +368,10 @@ namespace WebsitePanel.Providers.Mail
|
||||||
|
|
||||||
#region IceWarp
|
#region IceWarp
|
||||||
|
|
||||||
|
public bool UseDomainDiskQuota { get; set; }
|
||||||
|
public bool UseDomainLimits { get; set; }
|
||||||
|
public bool UseUserLimits { get; set; }
|
||||||
|
|
||||||
public int MegaByteSendLimit { get; set; }
|
public int MegaByteSendLimit { get; set; }
|
||||||
public int NumberSendLimit { get; set; }
|
public int NumberSendLimit { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
|
||||||
namespace WebsitePanel.Providers.OS
|
namespace WebsitePanel.Providers.OS
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
public interface IRemoteDesktopServices
|
public interface IRemoteDesktopServices
|
||||||
{
|
{
|
||||||
bool CreateCollection(string organizationId, RdsCollection collection);
|
bool CreateCollection(string organizationId, RdsCollection collection);
|
||||||
|
bool AddRdsServersToDeployment(RdsServer[] servers);
|
||||||
RdsCollection GetCollection(string collectionName);
|
RdsCollection GetCollection(string collectionName);
|
||||||
bool RemoveCollection(string organizationId, string collectionName);
|
bool RemoveCollection(string organizationId, string collectionName);
|
||||||
bool SetUsersInCollection(string organizationId, string collectionName, List<string> users);
|
bool SetUsersInCollection(string organizationId, string collectionName, List<string> users);
|
||||||
|
@ -48,6 +49,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server);
|
void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server);
|
||||||
void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers);
|
void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, List<RdsServer> servers);
|
||||||
|
|
||||||
|
void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server);
|
||||||
|
|
||||||
List<StartMenuApp> GetAvailableRemoteApplications(string collectionName);
|
List<StartMenuApp> GetAvailableRemoteApplications(string collectionName);
|
||||||
List<RemoteApplication> GetCollectionRemoteApplications(string collectionName);
|
List<RemoteApplication> GetCollectionRemoteApplications(string collectionName);
|
||||||
bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp);
|
bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp);
|
||||||
|
@ -58,5 +61,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
bool CheckSessionHostFeatureInstallation(string hostName);
|
bool CheckSessionHostFeatureInstallation(string hostName);
|
||||||
|
|
||||||
bool CheckServerAvailability(string hostName);
|
bool CheckServerAvailability(string hostName);
|
||||||
|
string[] GetApplicationUsers(string collectionName, string applicationName);
|
||||||
|
bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users);
|
||||||
|
bool CheckRDSServerAvaliable(string hostname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
{
|
||||||
|
public enum RdsPolicyTypes
|
||||||
|
{
|
||||||
|
RdCap,
|
||||||
|
RdRap
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,5 +18,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
public string ItemName { get; set; }
|
public string ItemName { get; set; }
|
||||||
public int? RdsCollectionId { get; set; }
|
public int? RdsCollectionId { get; set; }
|
||||||
|
public bool ConnectionEnabled { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -85,6 +85,10 @@
|
||||||
<Compile Include="Common\ErrorCodes.cs" />
|
<Compile Include="Common\ErrorCodes.cs" />
|
||||||
<Compile Include="Common\PasswdHelper.cs" />
|
<Compile Include="Common\PasswdHelper.cs" />
|
||||||
<Compile Include="Common\WPIEntries.cs" />
|
<Compile Include="Common\WPIEntries.cs" />
|
||||||
|
<Compile Include="DomainLookup\DnsRecordInfo.cs" />
|
||||||
|
<Compile Include="DomainLookup\DnsRecordInfoChange.cs" />
|
||||||
|
<Compile Include="DomainLookup\DomainDnsChanges.cs" />
|
||||||
|
<Compile Include="DomainLookup\DomainDnsRecordStatuses.cs" />
|
||||||
<Compile Include="EnterpriseStorage\IEnterpriseStorage.cs" />
|
<Compile Include="EnterpriseStorage\IEnterpriseStorage.cs" />
|
||||||
<Compile Include="HeliconZoo\IHeliconZooServer.cs" />
|
<Compile Include="HeliconZoo\IHeliconZooServer.cs" />
|
||||||
<Compile Include="HostedSolution\BaseReport.cs" />
|
<Compile Include="HostedSolution\BaseReport.cs" />
|
||||||
|
@ -125,6 +129,7 @@
|
||||||
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
|
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
|
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
|
||||||
|
<Compile Include="RemoteDesktopServices\RdsPolicyTypes.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsServer.cs" />
|
<Compile Include="RemoteDesktopServices\RdsServer.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
|
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" />
|
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" />
|
||||||
|
|
|
@ -106,9 +106,6 @@ namespace WebsitePanel.Providers.DNS
|
||||||
public virtual void AddSecondaryZone( string zoneName, string[] masterServers )
|
public virtual void AddSecondaryZone( string zoneName, string[] masterServers )
|
||||||
{
|
{
|
||||||
ps.Add_DnsServerSecondaryZone( zoneName, masterServers );
|
ps.Add_DnsServerSecondaryZone( zoneName, masterServers );
|
||||||
|
|
||||||
// remove ns records
|
|
||||||
ps.Remove_DnsServerResourceRecords(zoneName, "NS");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void DeleteZone( string zoneName )
|
public virtual void DeleteZone( string zoneName )
|
||||||
|
|
|
@ -1942,6 +1942,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("Equipment");
|
cmd.Parameters.Add("Equipment");
|
||||||
else if (accountType == ExchangeAccountType.Room)
|
else if (accountType == ExchangeAccountType.Room)
|
||||||
cmd.Parameters.Add("Room");
|
cmd.Parameters.Add("Room");
|
||||||
|
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
|
cmd.Parameters.Add("Shared");
|
||||||
|
|
||||||
|
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
@ -4790,6 +4793,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckOrganizationRootPublicFolderPermission(runSpace, organizationId);
|
CheckOrganizationRootPublicFolderPermission(runSpace, organizationId);
|
||||||
|
|
||||||
|
// exchange transport needs access to create new items in order to deliver email
|
||||||
|
AddPublicFolderClientPermission(runSpace, folder, "Anonymous", "CreateItems");
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -369,6 +369,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("Equipment");
|
cmd.Parameters.Add("Equipment");
|
||||||
else if (accountType == ExchangeAccountType.Room)
|
else if (accountType == ExchangeAccountType.Room)
|
||||||
cmd.Parameters.Add("Room");
|
cmd.Parameters.Add("Room");
|
||||||
|
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
|
cmd.Parameters.Add("Shared");
|
||||||
|
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
|
|
@ -624,7 +624,10 @@ namespace WebsitePanel.Providers.Mail
|
||||||
DefaultUserQuotaInMB = Convert.ToInt32((object) domain.GetProperty("D_UserMailbox"))/1024,
|
DefaultUserQuotaInMB = Convert.ToInt32((object) domain.GetProperty("D_UserMailbox"))/1024,
|
||||||
DefaultUserMaxMessageSizeMegaByte = Convert.ToInt32((object) domain.GetProperty("D_UserMsg"))/1024,
|
DefaultUserMaxMessageSizeMegaByte = Convert.ToInt32((object) domain.GetProperty("D_UserMsg"))/1024,
|
||||||
DefaultUserMegaByteSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserMB")),
|
DefaultUserMegaByteSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserMB")),
|
||||||
DefaultUserNumberSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserNumber"))
|
DefaultUserNumberSendLimit = Convert.ToInt32((object) domain.GetProperty("D_UserNumber")),
|
||||||
|
UseDomainDiskQuota = Convert.ToBoolean(ProviderSettings["UseDomainDiskQuota"]),
|
||||||
|
UseDomainLimits = Convert.ToBoolean(ProviderSettings["UseDomainLimits"]),
|
||||||
|
UseUserLimits = Convert.ToBoolean(ProviderSettings["UseUserLimits"])
|
||||||
};
|
};
|
||||||
|
|
||||||
return mailDomain;
|
return mailDomain;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
<OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
<OutputPath>..\WebsitePanel.Server\bin\IceWarp\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -48,10 +48,12 @@
|
||||||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||||
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
|
||||||
<Name>WebsitePanel.Providers.Base</Name>
|
<Name>WebsitePanel.Providers.Base</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||||
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
|
||||||
<Name>WebsitePanel.Server.Utils</Name>
|
<Name>WebsitePanel.Server.Utils</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|
|
@ -34,6 +34,10 @@ using Microsoft.Win32;
|
||||||
|
|
||||||
using WebsitePanel.Server.Utils;
|
using WebsitePanel.Server.Utils;
|
||||||
using WebsitePanel.Providers.Utils;
|
using WebsitePanel.Providers.Utils;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace WebsitePanel.Providers.OS
|
namespace WebsitePanel.Providers.OS
|
||||||
{
|
{
|
||||||
|
@ -53,6 +57,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
private const string MSACCESS_DRIVER = "Microsoft Access Driver (*.mdb)";
|
private const string MSACCESS_DRIVER = "Microsoft Access Driver (*.mdb)";
|
||||||
private const string MSEXCEL_DRIVER = "Microsoft Excel Driver (*.xls)";
|
private const string MSEXCEL_DRIVER = "Microsoft Excel Driver (*.xls)";
|
||||||
private const string TEXT_DRIVER = "Microsoft Text Driver (*.txt; *.csv)";
|
private const string TEXT_DRIVER = "Microsoft Text Driver (*.txt; *.csv)";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
@ -744,7 +749,6 @@ namespace WebsitePanel.Providers.OS
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
public override bool IsInstalled()
|
public override bool IsInstalled()
|
||||||
{
|
{
|
||||||
return WebsitePanel.Server.Utils.OS.GetVersion() == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2003;
|
return WebsitePanel.Server.Utils.OS.GetVersion() == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2003;
|
||||||
|
|
|
@ -49,6 +49,9 @@ using System.Management.Automation.Runspaces;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Linq;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.Providers.OS
|
namespace WebsitePanel.Providers.OS
|
||||||
|
@ -77,10 +80,12 @@ namespace WebsitePanel.Providers.OS
|
||||||
{
|
{
|
||||||
Log.WriteStart("SetQuotaLimitOnFolder");
|
Log.WriteStart("SetQuotaLimitOnFolder");
|
||||||
Log.WriteInfo("FolderPath : {0}", folderPath);
|
Log.WriteInfo("FolderPath : {0}", folderPath);
|
||||||
Log.WriteInfo("ShareNameDrive : {0}", shareNameDrive);
|
|
||||||
Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
|
Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
|
||||||
|
|
||||||
string path = Path.Combine(shareNameDrive + @":\", folderPath);
|
string path = folderPath;
|
||||||
|
|
||||||
|
if (shareNameDrive != null)
|
||||||
|
path = Path.Combine(shareNameDrive + @":\", folderPath);
|
||||||
|
|
||||||
Runspace runSpace = null;
|
Runspace runSpace = null;
|
||||||
try
|
try
|
||||||
|
|
|
@ -129,16 +129,89 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
public override bool IsInstalled()
|
public override bool IsInstalled()
|
||||||
{
|
{
|
||||||
// TODO: Remove it.
|
|
||||||
//return true;
|
|
||||||
Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion();
|
Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion();
|
||||||
return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012;
|
return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012 || version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012R2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string[] Install()
|
||||||
|
{
|
||||||
|
Runspace runSpace = null;
|
||||||
|
PSObject feature = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
|
if (!IsFeatureInstalled("Desktop-Experience", runSpace))
|
||||||
|
{
|
||||||
|
feature = AddFeature(runSpace, "Desktop-Experience", true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsFeatureInstalled("NET-Framework-Core", runSpace))
|
||||||
|
{
|
||||||
|
feature = AddFeature(runSpace, "NET-Framework-Core", true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsFeatureInstalled("NET-Framework-45-Core", runSpace))
|
||||||
|
{
|
||||||
|
feature = AddFeature(runSpace, "NET-Framework-45-Core", true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new string[]{};
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CheckRDSServerAvaliable(string hostname)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
var ping = new Ping();
|
||||||
|
var reply = ping.Send(hostname, 1000);
|
||||||
|
|
||||||
|
if (reply.Status == IPStatus.Success)
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region RDS Collections
|
#region RDS Collections
|
||||||
|
|
||||||
|
public bool AddRdsServersToDeployment(RdsServer[] servers)
|
||||||
|
{
|
||||||
|
var result = true;
|
||||||
|
Runspace runSpace = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
|
foreach (var server in servers)
|
||||||
|
{
|
||||||
|
if (!ExistRdsServerInDeployment(runSpace, server))
|
||||||
|
{
|
||||||
|
AddRdsServerToDeployment(runSpace, server);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public bool CreateCollection(string organizationId, RdsCollection collection)
|
public bool CreateCollection(string organizationId, RdsCollection collection)
|
||||||
{
|
{
|
||||||
var result = true;
|
var result = true;
|
||||||
|
@ -194,19 +267,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
ActiveDirectoryUtils.CreateGroup(orgPath, GetUsersGroupName(collection.Name));
|
ActiveDirectoryUtils.CreateGroup(orgPath, GetUsersGroupName(collection.Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var capPolicyName = GetPolicyName(organizationId, collection.Name, RdsPolicyTypes.RdCap);
|
||||||
|
var rapPolicyName = GetPolicyName(organizationId, collection.Name, RdsPolicyTypes.RdRap);
|
||||||
|
|
||||||
foreach (var gateway in Gateways)
|
foreach (var gateway in Gateways)
|
||||||
{
|
{
|
||||||
if (!CentralNps)
|
if (!CentralNps)
|
||||||
{
|
{
|
||||||
CreateRdCapForce(runSpace, gateway, collection.Name, new List<string> { GetUsersGroupName(collection.Name) });
|
CreateRdCapForce(runSpace, gateway, capPolicyName, collection.Name, new List<string> { GetUsersGroupName(collection.Name) });
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateRdRapForce(runSpace, gateway, collection.Name, new List<string> { GetUsersGroupName(collection.Name) });
|
CreateRdRapForce(runSpace, gateway, rapPolicyName, collection.Name, new List<string> { GetUsersGroupName(collection.Name) });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CentralNps)
|
if (CentralNps)
|
||||||
{
|
{
|
||||||
CreateCentralNpsPolicy(runSpace, CentralNpsHost, collection.Name, organizationId);
|
CreateCentralNpsPolicy(runSpace, CentralNpsHost, capPolicyName, collection.Name, organizationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//add user group to collection
|
//add user group to collection
|
||||||
|
@ -278,19 +354,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
var capPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdCap);
|
||||||
|
var rapPolicyName = GetPolicyName(organizationId, collectionName, RdsPolicyTypes.RdRap);
|
||||||
|
|
||||||
foreach (var gateway in Gateways)
|
foreach (var gateway in Gateways)
|
||||||
{
|
{
|
||||||
if (!CentralNps)
|
if (!CentralNps)
|
||||||
{
|
{
|
||||||
RemoveRdCap(runSpace, gateway, collectionName);
|
RemoveRdCap(runSpace, gateway, capPolicyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveRdRap(runSpace, gateway, collectionName);
|
RemoveRdRap(runSpace, gateway, rapPolicyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CentralNps)
|
if (CentralNps)
|
||||||
{
|
{
|
||||||
RemoveNpsPolicy(runSpace, CentralNpsHost, collectionName);
|
RemoveNpsPolicy(runSpace, CentralNpsHost, capPolicyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remove security group
|
//Remove security group
|
||||||
|
@ -405,8 +484,96 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
|
||||||
|
{
|
||||||
|
Runspace runSpace = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
|
Command cmd = new Command("Set-RDSessionHost");
|
||||||
|
cmd.Parameters.Add("SessionHost", server.FqdName);
|
||||||
|
cmd.Parameters.Add("NewConnectionAllowed", string.Format("${0}", newConnectionAllowed.ToString()));
|
||||||
|
|
||||||
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Remote Applications
|
#region Remote Applications
|
||||||
|
|
||||||
|
public string[] GetApplicationUsers(string collectionName, string applicationName)
|
||||||
|
{
|
||||||
|
Runspace runspace = null;
|
||||||
|
List<string> result = new List<string>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runspace = OpenRunspace();
|
||||||
|
|
||||||
|
Command cmd = new Command("Get-RDRemoteApp");
|
||||||
|
cmd.Parameters.Add("CollectionName", collectionName);
|
||||||
|
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
|
||||||
|
cmd.Parameters.Add("DisplayName", applicationName);
|
||||||
|
|
||||||
|
var application = ExecuteShellCommand(runspace, cmd, false).FirstOrDefault();
|
||||||
|
|
||||||
|
if (application != null)
|
||||||
|
{
|
||||||
|
var users = (string[])(GetPSObjectProperty(application, "UserGroups"));
|
||||||
|
|
||||||
|
if (users != null)
|
||||||
|
{
|
||||||
|
result.AddRange(users);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runspace);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users)
|
||||||
|
{
|
||||||
|
Runspace runspace = null;
|
||||||
|
bool result = true;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runspace = OpenRunspace();
|
||||||
|
|
||||||
|
Command cmd = new Command("Set-RDRemoteApp");
|
||||||
|
cmd.Parameters.Add("CollectionName", collectionName);
|
||||||
|
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
|
||||||
|
cmd.Parameters.Add("DisplayName", remoteApp.DisplayName);
|
||||||
|
cmd.Parameters.Add("UserGroups", users);
|
||||||
|
cmd.Parameters.Add("Alias", remoteApp.Alias);
|
||||||
|
|
||||||
|
ExecuteShellCommand(runspace, cmd, false).FirstOrDefault();
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runspace);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
||||||
{
|
{
|
||||||
var startApps = new List<StartMenuApp>();
|
var startApps = new List<StartMenuApp>();
|
||||||
|
@ -537,7 +704,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
#region Gateaway (RD CAP | RD RAP)
|
#region Gateaway (RD CAP | RD RAP)
|
||||||
|
|
||||||
internal void CreateCentralNpsPolicy(Runspace runSpace, string centralNpshost, string collectionName, string organizationId)
|
internal void CreateCentralNpsPolicy(Runspace runSpace, string centralNpshost, string policyName, string collectionName, string organizationId)
|
||||||
{
|
{
|
||||||
var showCmd = new Command("netsh nps show np");
|
var showCmd = new Command("netsh nps show np");
|
||||||
|
|
||||||
|
@ -545,39 +712,39 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
var count = showResult.Count(x => Convert.ToString(x).Contains("policy conf")) + 1001;
|
var count = showResult.Count(x => Convert.ToString(x).Contains("policy conf")) + 1001;
|
||||||
|
|
||||||
var groupAd = ActiveDirectoryUtils.GetADObject(GetUsersGroupPath(organizationId, collectionName));
|
var userGroupAd = ActiveDirectoryUtils.GetADObject(GetUsersGroupPath(organizationId, collectionName));
|
||||||
|
|
||||||
var sid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(groupAd, "objectSid");
|
var userGroupSid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(userGroupAd, "objectSid");
|
||||||
|
|
||||||
var addCmdString = string.Format(AddNpsString, collectionName.Replace(" ", "_"), count, ConvertByteToStringSid(sid));
|
var addCmdString = string.Format(AddNpsString, policyName.Replace(" ", "_"), count, ConvertByteToStringSid(userGroupSid));
|
||||||
|
|
||||||
Command addCmd = new Command(addCmdString);
|
Command addCmd = new Command(addCmdString);
|
||||||
|
|
||||||
var result = ExecuteRemoteShellCommand(runSpace, centralNpshost, addCmd);
|
var result = ExecuteRemoteShellCommand(runSpace, centralNpshost, addCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void RemoveNpsPolicy(Runspace runSpace, string centralNpshost, string collectionName)
|
internal void RemoveNpsPolicy(Runspace runSpace, string centralNpshost, string policyName)
|
||||||
{
|
{
|
||||||
var removeCmd = new Command(string.Format("netsh nps delete np {0}", collectionName.Replace(" ", "_")));
|
var removeCmd = new Command(string.Format("netsh nps delete np {0}", policyName.Replace(" ", "_")));
|
||||||
|
|
||||||
var removeResult = ExecuteRemoteShellCommand(runSpace, centralNpshost, removeCmd);
|
var removeResult = ExecuteRemoteShellCommand(runSpace, centralNpshost, removeCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string name, List<string> groups)
|
internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string policyName, string collectionName, List<string> groups)
|
||||||
{
|
{
|
||||||
//New-Item -Path "RDS:\GatewayServer\CAP" -Name "Allow Admins" -UserGroups "Administrators@." -AuthMethod 1
|
//New-Item -Path "RDS:\GatewayServer\CAP" -Name "Allow Admins" -UserGroups "Administrators@." -AuthMethod 1
|
||||||
//Set-Item -Path "RDS:\GatewayServer\CAP\Allow Admins\SessionTimeout" -Value 480 -SessionTimeoutAction 0
|
//Set-Item -Path "RDS:\GatewayServer\CAP\Allow Admins\SessionTimeout" -Value 480 -SessionTimeoutAction 0
|
||||||
|
|
||||||
if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(CapPath, name)))
|
if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(CapPath, policyName)))
|
||||||
{
|
{
|
||||||
RemoveRdCap(runSpace, gatewayHost, name);
|
RemoveRdCap(runSpace, gatewayHost, policyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
var userGroupParametr = string.Format("@({0})",string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
|
var userGroupParametr = string.Format("@({0})",string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
|
||||||
|
|
||||||
Command rdCapCommand = new Command("New-Item");
|
Command rdCapCommand = new Command("New-Item");
|
||||||
rdCapCommand.Parameters.Add("Path", string.Format("\"{0}\"", CapPath));
|
rdCapCommand.Parameters.Add("Path", string.Format("\"{0}\"", CapPath));
|
||||||
rdCapCommand.Parameters.Add("Name", string.Format("\"{0}\"", name));
|
rdCapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName));
|
||||||
rdCapCommand.Parameters.Add("UserGroups", userGroupParametr);
|
rdCapCommand.Parameters.Add("UserGroups", userGroupParametr);
|
||||||
rdCapCommand.Parameters.Add("AuthMethod", 1);
|
rdCapCommand.Parameters.Add("AuthMethod", 1);
|
||||||
|
|
||||||
|
@ -589,22 +756,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
RemoveItemRemote(runSpace, gatewayHost, string.Format(@"{0}\{1}", CapPath, name), RdsModuleName);
|
RemoveItemRemote(runSpace, gatewayHost, string.Format(@"{0}\{1}", CapPath, name), RdsModuleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void CreateRdRapForce(Runspace runSpace, string gatewayHost, string name, List<string> groups)
|
internal void CreateRdRapForce(Runspace runSpace, string gatewayHost, string policyName, string collectionName, List<string> groups)
|
||||||
{
|
{
|
||||||
//New-Item -Path "RDS:\GatewayServer\RAP" -Name "Allow Connections To Everywhere" -UserGroups "Administrators@." -ComputerGroupType 1
|
//New-Item -Path "RDS:\GatewayServer\RAP" -Name "Allow Connections To Everywhere" -UserGroups "Administrators@." -ComputerGroupType 1
|
||||||
//Set-Item -Path "RDS:\GatewayServer\RAP\Allow Connections To Everywhere\PortNumbers" -Value 3389,3390
|
//Set-Item -Path "RDS:\GatewayServer\RAP\Allow Connections To Everywhere\PortNumbers" -Value 3389,3390
|
||||||
|
|
||||||
if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(RapPath, name)))
|
if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(RapPath, policyName)))
|
||||||
{
|
{
|
||||||
RemoveRdRap(runSpace, gatewayHost, name);
|
RemoveRdRap(runSpace, gatewayHost, policyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
var userGroupParametr = string.Format("@({0})", string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
|
var userGroupParametr = string.Format("@({0})", string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
|
||||||
var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(name), RootDomain);
|
var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(collectionName), RootDomain);
|
||||||
|
|
||||||
Command rdRapCommand = new Command("New-Item");
|
Command rdRapCommand = new Command("New-Item");
|
||||||
rdRapCommand.Parameters.Add("Path", string.Format("\"{0}\"", RapPath));
|
rdRapCommand.Parameters.Add("Path", string.Format("\"{0}\"", RapPath));
|
||||||
rdRapCommand.Parameters.Add("Name", string.Format("\"{0}\"", name));
|
rdRapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName));
|
||||||
rdRapCommand.Parameters.Add("UserGroups", userGroupParametr);
|
rdRapCommand.Parameters.Add("UserGroups", userGroupParametr);
|
||||||
rdRapCommand.Parameters.Add("ComputerGroupType", 1);
|
rdRapCommand.Parameters.Add("ComputerGroupType", 1);
|
||||||
rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr);
|
rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr);
|
||||||
|
@ -629,6 +796,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server)
|
private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server)
|
||||||
{
|
{
|
||||||
Command cmd = new Command("Get-RDserver");
|
Command cmd = new Command("Get-RDserver");
|
||||||
|
@ -729,6 +898,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName));
|
ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetRDServerNewConnectionAllowed(false, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveComputerFromCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server)
|
private void RemoveComputerFromCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server)
|
||||||
|
@ -756,15 +927,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
public bool AddSessionHostFeatureToServer(string hostName)
|
public bool AddSessionHostFeatureToServer(string hostName)
|
||||||
{
|
{
|
||||||
bool installationResult = false;
|
bool installationResult = false;
|
||||||
|
|
||||||
Runspace runSpace = null;
|
Runspace runSpace = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
runSpace = OpenRunspace();
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
|
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
|
||||||
|
|
||||||
installationResult = (bool)GetPSObjectProperty(feature, "Success");
|
installationResult = (bool)GetPSObjectProperty(feature, "Success");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -924,6 +1092,27 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
ExecuteRemoteShellCommand(runSpace, hostname, rdRapCommand, imports);
|
ExecuteRemoteShellCommand(runSpace, hostname, rdRapCommand, imports);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetPolicyName(string organizationId, string collectionName, RdsPolicyTypes policyType)
|
||||||
|
{
|
||||||
|
string policyName = string.Format("{0}-{1}-", organizationId, collectionName);
|
||||||
|
|
||||||
|
switch (policyType)
|
||||||
|
{
|
||||||
|
case RdsPolicyTypes.RdCap:
|
||||||
|
{
|
||||||
|
policyName += "RDCAP";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case RdsPolicyTypes.RdRap:
|
||||||
|
{
|
||||||
|
policyName += "RDRAP";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return policyName;
|
||||||
|
}
|
||||||
|
|
||||||
private string GetComputersGroupName(string collectionName)
|
private string GetComputersGroupName(string collectionName)
|
||||||
{
|
{
|
||||||
return string.Format(RdsGroupFormat, collectionName, Computers.ToLowerInvariant());
|
return string.Format(RdsGroupFormat, collectionName, Computers.ToLowerInvariant());
|
||||||
|
@ -1058,38 +1247,55 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
#region Windows Feature PowerShell
|
#region Windows Feature PowerShell
|
||||||
|
|
||||||
internal bool IsFeatureInstalled(string hostName, string featureName)
|
internal bool IsFeatureInstalled(string featureName, Runspace runSpace)
|
||||||
{
|
{
|
||||||
bool isInstalled = false;
|
bool isInstalled = false;
|
||||||
|
|
||||||
Runspace runSpace = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
runSpace = OpenRunspace();
|
|
||||||
|
|
||||||
Command cmd = new Command("Get-WindowsFeature");
|
Command cmd = new Command("Get-WindowsFeature");
|
||||||
cmd.Parameters.Add("Name", featureName);
|
cmd.Parameters.Add("Name", featureName);
|
||||||
|
var feature = ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
|
||||||
|
|
||||||
|
if (feature != null)
|
||||||
|
{
|
||||||
|
isInstalled = (bool)GetPSObjectProperty(feature, "Installed");
|
||||||
|
}
|
||||||
|
|
||||||
|
return isInstalled;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal bool IsFeatureInstalled(string hostName, string featureName, Runspace runSpace)
|
||||||
|
{
|
||||||
|
bool isInstalled = false;
|
||||||
|
Command cmd = new Command("Get-WindowsFeature");
|
||||||
|
cmd.Parameters.Add("Name", featureName);
|
||||||
var feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
var feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
||||||
|
|
||||||
if (feature != null)
|
if (feature != null)
|
||||||
{
|
{
|
||||||
isInstalled = (bool) GetPSObjectProperty(feature, "Installed");
|
isInstalled = (bool) GetPSObjectProperty(feature, "Installed");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
CloseRunspace(runSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
return isInstalled;
|
return isInstalled;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
internal PSObject AddFeature(Runspace runSpace, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
||||||
{
|
{
|
||||||
PSObject feature;
|
Command cmd = new Command("Add-WindowsFeature");
|
||||||
|
cmd.Parameters.Add("Name", featureName);
|
||||||
|
|
||||||
try
|
if (includeAllSubFeature)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add("IncludeAllSubFeature", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (restart)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add("Restart", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ExecuteShellCommand(runSpace, cmd, false).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal PSObject AddFeature(Runspace runSpace, string hostName, string featureName, bool includeAllSubFeature = true, bool restart = false)
|
||||||
{
|
{
|
||||||
Command cmd = new Command("Add-WindowsFeature");
|
Command cmd = new Command("Add-WindowsFeature");
|
||||||
cmd.Parameters.Add("Name", featureName);
|
cmd.Parameters.Add("Name", featureName);
|
||||||
|
@ -1104,14 +1310,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
cmd.Parameters.Add("Restart", "");
|
cmd.Parameters.Add("Restart", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
feature = ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
return ExecuteRemoteShellCommand(runSpace, hostName, cmd).FirstOrDefault();
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
CloseRunspace(runSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
return feature;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -49,14 +49,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
// We need to move it into "WebHosting" store
|
// We need to move it into "WebHosting" store
|
||||||
// Get certificate
|
// Get certificate
|
||||||
var servercert = GetServerCertificates(StoreName.My.ToString()).Single(c => c.FriendlyName == cert.FriendlyName);
|
var servercert = GetServerCertificates(StoreName.My.ToString()).Single(c => c.FriendlyName == cert.FriendlyName);
|
||||||
if (UseCCS)
|
|
||||||
{
|
|
||||||
// Delete existing certificate, if any. This is needed to install a new binding
|
|
||||||
if (CheckCertificate(website))
|
|
||||||
{
|
|
||||||
DeleteCertificate(GetCurrentSiteCertificate(website), website);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get certificate data - the one we just added to "Personal" store
|
// Get certificate data - the one we just added to "Personal" store
|
||||||
var storeMy = new X509Store(StoreName.My, StoreLocation.LocalMachine);
|
var storeMy = new X509Store(StoreName.My, StoreLocation.LocalMachine);
|
||||||
|
@ -64,6 +56,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
||||||
var certData = existCerts2[0].Export(X509ContentType.Pfx);
|
var certData = existCerts2[0].Export(X509ContentType.Pfx);
|
||||||
storeMy.Close();
|
storeMy.Close();
|
||||||
|
var x509Cert = new X509Certificate2(certData);
|
||||||
|
|
||||||
if (UseCCS)
|
if (UseCCS)
|
||||||
{
|
{
|
||||||
|
@ -74,7 +67,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
{
|
{
|
||||||
// Add new certificate to "WebHosting" store
|
// Add new certificate to "WebHosting" store
|
||||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
||||||
var x509Cert = new X509Certificate2(certData);
|
|
||||||
store.Open(OpenFlags.ReadWrite);
|
store.Open(OpenFlags.ReadWrite);
|
||||||
store.Add(x509Cert);
|
store.Add(x509Cert);
|
||||||
store.Close();
|
store.Close();
|
||||||
|
@ -85,6 +77,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
X509CertificateCollection existCerts = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
X509CertificateCollection existCerts = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
||||||
storeMy.Remove((X509Certificate2)existCerts[0]);
|
storeMy.Remove((X509Certificate2)existCerts[0]);
|
||||||
storeMy.Close();
|
storeMy.Close();
|
||||||
|
|
||||||
// Fill object with certificate data
|
// Fill object with certificate data
|
||||||
cert.SerialNumber = servercert.SerialNumber;
|
cert.SerialNumber = servercert.SerialNumber;
|
||||||
cert.ValidFrom = servercert.ValidFrom;
|
cert.ValidFrom = servercert.ValidFrom;
|
||||||
|
@ -99,7 +92,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
DeleteCertificate(GetCurrentSiteCertificate(website), website);
|
DeleteCertificate(GetCurrentSiteCertificate(website), website);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddBinding(cert, website);
|
AddBinding(x509Cert, website);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -113,8 +106,10 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
|
|
||||||
public new List<SSLCertificate> GetServerCertificates()
|
public new List<SSLCertificate> GetServerCertificates()
|
||||||
{
|
{
|
||||||
// Use Web Hosting store - new for IIS 8.0
|
// Get certificates from both WebHosting and My (Personal) store
|
||||||
return GetServerCertificates(CertificateStoreName);
|
var certificates = GetServerCertificates(CertificateStoreName);
|
||||||
|
certificates.AddRange(GetServerCertificates(StoreName.My.ToString()));
|
||||||
|
return certificates;
|
||||||
}
|
}
|
||||||
|
|
||||||
public new SSLCertificate ImportCertificate(WebSite website)
|
public new SSLCertificate ImportCertificate(WebSite website)
|
||||||
|
@ -134,12 +129,12 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return certificate;
|
return certificate ?? (new SSLCertificate {Success = false, Certificate = "No certificate in binding on server, please remove or edit binding"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public new SSLCertificate InstallPfx(byte[] certificate, string password, WebSite website)
|
public new SSLCertificate InstallPfx(byte[] certificate, string password, WebSite website)
|
||||||
{
|
{
|
||||||
SSLCertificate newcert, oldcert = null;
|
SSLCertificate newcert = null, oldcert = null;
|
||||||
|
|
||||||
// Ensure we perform operations safely and preserve the original state during all manipulations, save the oldcert if one is used
|
// Ensure we perform operations safely and preserve the original state during all manipulations, save the oldcert if one is used
|
||||||
if (CheckCertificate(website))
|
if (CheckCertificate(website))
|
||||||
|
@ -170,7 +165,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
writer.Write(certData);
|
writer.Write(certData);
|
||||||
writer.Flush();
|
writer.Flush();
|
||||||
writer.Close();
|
writer.Close();
|
||||||
// Certificated saved
|
// Certificate saved
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -189,7 +184,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
store.Open(OpenFlags.ReadWrite);
|
store.Open(OpenFlags.ReadWrite);
|
||||||
|
|
||||||
store.Add(x509Cert);
|
store.Add(x509Cert);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -207,79 +201,35 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
// Step 2: Instantiate a copy of new X.509 certificate
|
// Step 2: Instantiate a copy of new X.509 certificate
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
store.Open(OpenFlags.ReadWrite);
|
|
||||||
newcert = GetSSLCertificateFromX509Certificate2(x509Cert);
|
newcert = GetSSLCertificateFromX509Certificate2(x509Cert);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (!UseCCS)
|
HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, "SSLModuleService could not instantiate a copy of new X.509 certificate.", ex);
|
||||||
{
|
|
||||||
// Rollback X.509 store changes
|
|
||||||
store.Remove(x509Cert);
|
|
||||||
}
|
|
||||||
// Log error
|
|
||||||
Log.WriteError("SSLModuleService could not instantiate a copy of new X.509 certificate. All previous changes have been rolled back.", ex);
|
|
||||||
// Re-throw
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
store.Close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UseCCS)
|
|
||||||
{
|
|
||||||
// Step 3: Remove old certificate from the web site if any
|
// Step 3: Remove old certificate from the web site if any
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
store.Open(OpenFlags.ReadWrite);
|
|
||||||
// Check if certificate already exists, remove it.
|
// Check if certificate already exists, remove it.
|
||||||
if (oldcert != null)
|
if (oldcert != null)
|
||||||
|
{
|
||||||
DeleteCertificate(oldcert, website);
|
DeleteCertificate(oldcert, website);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// Rollback X.509 store changes
|
HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, string.Format("SSLModuleService could not remove existing certificate from '{0}' web site.", website.Name), ex);
|
||||||
store.Remove(x509Cert);
|
|
||||||
// Log the error
|
|
||||||
Log.WriteError(
|
|
||||||
String.Format("SSLModuleService could not remove existing certificate from '{0}' web site. All changes have been rolled back.", website.Name), ex);
|
|
||||||
// Re-throw
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
store.Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 4: Register new certificate with HTTPS binding on the web site
|
// Step 4: Register new certificate with HTTPS binding on the web site
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//if (!UseCCS)
|
AddBinding(x509Cert, website);
|
||||||
//{
|
|
||||||
// store.Open(OpenFlags.ReadWrite);
|
|
||||||
//}
|
|
||||||
|
|
||||||
AddBinding(newcert, website);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (!UseCCS)
|
HandleExceptionAndRollbackCertificate(store, x509Cert, oldcert, website, String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site.", website.Name), ex);
|
||||||
{
|
|
||||||
// Install old certificate back if any
|
|
||||||
store.Open(OpenFlags.ReadWrite);
|
|
||||||
if (oldcert != null)
|
|
||||||
InstallCertificate(oldcert, website);
|
|
||||||
// Rollback X.509 store changes
|
|
||||||
store.Remove(x509Cert);
|
|
||||||
store.Close();
|
|
||||||
}
|
|
||||||
// Log the error
|
|
||||||
Log.WriteError(
|
|
||||||
String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site. All changes have been rolled back.", website.Name), ex);
|
|
||||||
// Re-throw
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return newcert;
|
return newcert;
|
||||||
|
@ -319,23 +269,39 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public new void AddBinding(SSLCertificate certificate, WebSite website)
|
public void AddBinding(X509Certificate2 certificate, WebSite website)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
|
||||||
store.Open(OpenFlags.ReadOnly);
|
|
||||||
|
|
||||||
// Look for dedicated ip
|
// Look for dedicated ip
|
||||||
var dedicatedIp = SiteHasBindingWithDedicatedIp(srvman, website);
|
var dedicatedIp = SiteHasBindingWithDedicatedIp(srvman, website);
|
||||||
|
|
||||||
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress, dedicatedIp ? "" : certificate.Hostname);
|
// Look for all the hostnames this certificate is valid for if we are using SNI
|
||||||
|
var hostNames = new List<string>();
|
||||||
|
|
||||||
|
if (!dedicatedIp)
|
||||||
|
{
|
||||||
|
hostNames.AddRange(certificate.Extensions.Cast<X509Extension>()
|
||||||
|
.Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names
|
||||||
|
.SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Split('=')[1])));
|
||||||
|
}
|
||||||
|
|
||||||
|
var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false);
|
||||||
|
if (hostNames.All(h => h != simpleName))
|
||||||
|
{
|
||||||
|
hostNames.Add(simpleName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For every hostname (only one if using old school dedicated IP binding)
|
||||||
|
foreach (var hostName in hostNames)
|
||||||
|
{
|
||||||
|
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress ?? "*", dedicatedIp ? "" : hostName);
|
||||||
|
|
||||||
Binding siteBinding = UseCCS ?
|
Binding siteBinding = UseCCS ?
|
||||||
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, "https") :
|
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, "https") :
|
||||||
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.Hash, store.Name);
|
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.GetCertHash(), CertificateStoreName);
|
||||||
|
|
||||||
if (UseSNI)
|
if (UseSNI && !dedicatedIp)
|
||||||
{
|
{
|
||||||
siteBinding.SslFlags |= SslFlags.Sni;
|
siteBinding.SslFlags |= SslFlags.Sni;
|
||||||
}
|
}
|
||||||
|
@ -343,8 +309,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
{
|
{
|
||||||
siteBinding.SslFlags |= SslFlags.CentralCertStore;
|
siteBinding.SslFlags |= SslFlags.CentralCertStore;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
store.Close();
|
|
||||||
|
|
||||||
srvman.CommitChanges();
|
srvman.CommitChanges();
|
||||||
}
|
}
|
||||||
|
@ -352,7 +317,9 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
|
|
||||||
public new ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
|
public new ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
|
||||||
{
|
{
|
||||||
var result = new ResultObject() { IsSuccess = true };
|
// This method removes all https bindings and all certificates associated with them.
|
||||||
|
// Old implementation (IIS70) removed a single binding (there could not be more than one) and the first certificate that matched via serial number
|
||||||
|
var result = new ResultObject { IsSuccess = true };
|
||||||
|
|
||||||
if (certificate == null)
|
if (certificate == null)
|
||||||
{
|
{
|
||||||
|
@ -361,9 +328,19 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Regardless of the CCS setting on the server, we try to find and remove the certificate from both CCS and WebHosting Store.
|
var certificatesAndStoreNames = new List<Tuple<string, byte[]>>();
|
||||||
// This is because we don't know how this was set when the certificate was added
|
|
||||||
|
|
||||||
|
// User servermanager to get aLL SSL-bindings on this website and try to remove the certificates used
|
||||||
|
using (var srvman = GetServerManager())
|
||||||
|
{
|
||||||
|
|
||||||
|
var site = srvman.Sites[website.Name];
|
||||||
|
var bindings = site.Bindings.Where(b => b.Protocol == "https");
|
||||||
|
|
||||||
|
foreach (Binding binding in bindings.ToList())
|
||||||
|
{
|
||||||
|
if (binding.SslFlags.HasFlag(SslFlags.CentralCertStore))
|
||||||
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(CCSUncPath) && Directory.Exists(CCSUncPath))
|
if (!string.IsNullOrWhiteSpace(CCSUncPath) && Directory.Exists(CCSUncPath))
|
||||||
{
|
{
|
||||||
// This is where it will be if CCS is used
|
// This is where it will be if CCS is used
|
||||||
|
@ -372,24 +349,49 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
{
|
{
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If binding with hostname, also try to delete with the hostname in the binding
|
||||||
|
// This is because if SNI is used, several bindings are created for every valid name in the cerificate, but only one name exists in the SSLCertificate
|
||||||
|
if (!string.IsNullOrEmpty(binding.Host))
|
||||||
|
{
|
||||||
|
path = GetCCSPath(binding.Host);
|
||||||
|
if (File.Exists(path))
|
||||||
|
{
|
||||||
|
File.Delete(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var certificateAndStoreName = new Tuple<string, byte[]>(binding.CertificateStoreName, binding.CertificateHash);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(binding.CertificateStoreName) && !certificatesAndStoreNames.Contains(certificateAndStoreName))
|
||||||
|
{
|
||||||
|
certificatesAndStoreNames.Add(certificateAndStoreName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now delete all certs with the same serialnumber in WebHosting Store
|
// Remove binding from site
|
||||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
site.Bindings.Remove(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
srvman.CommitChanges();
|
||||||
|
|
||||||
|
foreach (var certificateAndStoreName in certificatesAndStoreNames)
|
||||||
|
{
|
||||||
|
// Delete all certs with the same serialnumber in Store
|
||||||
|
var store = new X509Store(certificateAndStoreName.Item1, StoreLocation.LocalMachine);
|
||||||
store.Open(OpenFlags.MaxAllowed);
|
store.Open(OpenFlags.MaxAllowed);
|
||||||
|
|
||||||
var certs = store.Certificates.Find(X509FindType.FindBySerialNumber, certificate.SerialNumber, false);
|
var certs = store.Certificates.Find(X509FindType.FindByThumbprint, BitConverter.ToString(certificateAndStoreName.Item2).Replace("-", ""), false);
|
||||||
foreach (var cert in certs)
|
foreach (var cert in certs)
|
||||||
{
|
{
|
||||||
store.Remove(cert);
|
store.Remove(cert);
|
||||||
}
|
}
|
||||||
|
|
||||||
store.Close();
|
store.Close();
|
||||||
|
}
|
||||||
// Remove binding from site
|
|
||||||
if (CheckCertificate(website))
|
|
||||||
{
|
|
||||||
RemoveBinding(certificate, website);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -409,8 +411,6 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
var site = srvman.Sites[website.SiteId];
|
var site = srvman.Sites[website.SiteId];
|
||||||
var sslBinding = site.Bindings.First(b => b.Protocol == "https");
|
var sslBinding = site.Bindings.First(b => b.Protocol == "https");
|
||||||
|
|
||||||
X509Certificate2 cert = null;
|
|
||||||
|
|
||||||
// If the certificate is in the central store
|
// If the certificate is in the central store
|
||||||
if (((SslFlags)Enum.Parse(typeof(SslFlags), sslBinding["sslFlags"].ToString())).HasFlag(SslFlags.CentralCertStore))
|
if (((SslFlags)Enum.Parse(typeof(SslFlags), sslBinding["sslFlags"].ToString())).HasFlag(SslFlags.CentralCertStore))
|
||||||
{
|
{
|
||||||
|
@ -423,23 +423,19 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
// Read certificate data from file
|
// Read certificate data from file
|
||||||
var certData = new byte[fileStream.Length];
|
var certData = new byte[fileStream.Length];
|
||||||
fileStream.Read(certData, 0, (int) fileStream.Length);
|
fileStream.Read(certData, 0, (int) fileStream.Length);
|
||||||
cert = new X509Certificate2(certData, CCSCommonPassword);
|
var cert = new X509Certificate2(certData, CCSCommonPassword);
|
||||||
fileStream.Close();
|
fileStream.Close();
|
||||||
|
return GetSSLCertificateFromX509Certificate2(cert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var currentHash = sslBinding.CertificateHash;
|
var currentHash = Convert.ToBase64String(sslBinding.CertificateHash);
|
||||||
var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine);
|
return GetServerCertificates().FirstOrDefault(c => Convert.ToBase64String(c.Hash) == currentHash);
|
||||||
store.Open(OpenFlags.ReadOnly);
|
}
|
||||||
|
|
||||||
cert = store.Certificates.Cast<X509Certificate2>().Single(c => Convert.ToBase64String(c.GetCertHash()) == Convert.ToBase64String(currentHash));
|
|
||||||
|
|
||||||
store.Close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetSSLCertificateFromX509Certificate2(cert);
|
return null;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<SSLCertificate> GetServerCertificates(string certificateStoreName)
|
private static List<SSLCertificate> GetServerCertificates(string certificateStoreName)
|
||||||
|
@ -504,5 +500,33 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleExceptionAndRollbackCertificate(X509Store store, X509Certificate2 x509Cert, SSLCertificate oldCert, WebSite webSite, string errorMessage, Exception ex)
|
||||||
|
{
|
||||||
|
if (!UseCCS)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Rollback X.509 store changes
|
||||||
|
store.Open(OpenFlags.ReadWrite);
|
||||||
|
store.Remove(x509Cert);
|
||||||
|
store.Close();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Log.WriteError("SSLModuleService could not rollback and remove certificate from store", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install old certificate back if any
|
||||||
|
if (oldCert != null)
|
||||||
|
InstallCertificate(oldCert, webSite);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log the error
|
||||||
|
Log.WriteError(errorMessage + " All changes have been rolled back.", ex);
|
||||||
|
|
||||||
|
// Re-throw
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
<OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
|
<OutputPath>..\WebsitePanel.Server\bin\IIs80\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -56,18 +56,22 @@
|
||||||
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
|
||||||
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
|
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
|
||||||
<Name>WebsitePanel.Providers.Base</Name>
|
<Name>WebsitePanel.Providers.Base</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
|
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
|
||||||
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
|
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
|
||||||
<Name>WebsitePanel.Providers.Web.IIs60</Name>
|
<Name>WebsitePanel.Providers.Web.IIs60</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj">
|
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj">
|
||||||
<Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project>
|
<Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project>
|
||||||
<Name>WebsitePanel.Providers.Web.IIs70</Name>
|
<Name>WebsitePanel.Providers.Web.IIs70</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
|
||||||
<Project>{e91e52f3-9555-4d00-b577-2b1dbdd87ca7}</Project>
|
<Project>{e91e52f3-9555-4d00-b577-2b1dbdd87ca7}</Project>
|
||||||
<Name>WebsitePanel.Server.Utils</Name>
|
<Name>WebsitePanel.Server.Utils</Name>
|
||||||
|
<Private>False</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|
|
@ -35,15 +35,16 @@ namespace WebsitePanel.SchedulerService
|
||||||
public partial class SchedulerService : ServiceBase
|
public partial class SchedulerService : ServiceBase
|
||||||
{
|
{
|
||||||
private Timer _Timer;
|
private Timer _Timer;
|
||||||
private static bool _isRuninng;
|
private static object _isRuninng;
|
||||||
#region Construcor
|
#region Construcor
|
||||||
|
|
||||||
public SchedulerService()
|
public SchedulerService()
|
||||||
{
|
{
|
||||||
|
_isRuninng = new object();
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
_Timer = new Timer(Process, null, 5000, 5000);
|
_Timer = new Timer(Process, null, 5000, 5000);
|
||||||
_isRuninng = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -57,12 +58,18 @@ namespace WebsitePanel.SchedulerService
|
||||||
protected static void Process(object callback)
|
protected static void Process(object callback)
|
||||||
{
|
{
|
||||||
//check running service
|
//check running service
|
||||||
if (_isRuninng)
|
if (!Monitor.TryEnter(_isRuninng))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_isRuninng = true;
|
try
|
||||||
|
{
|
||||||
Scheduler.Start();
|
Scheduler.Start();
|
||||||
_isRuninng = false;
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Monitor.Exit(_isRuninng);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="Server=VITALIK-VAIO\SQL2008R2;Database=WebsitePanel;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>
|
<add name="EnterpriseServer" connectionString="server=dev-sql;database=WebsitePanel;uid=WebsitePanel;pwd=sbbk40q85dc7jzj8b5kn;" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Globalization;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
using System.Web.Services.Protocols;
|
using System.Web.Services.Protocols;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
|
@ -51,6 +52,13 @@ namespace WebsitePanel.Server
|
||||||
get { return (IDnsServer)Provider; }
|
get { return (IDnsServer)Provider; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetAsciiZoneName(string zoneName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(zoneName)) return zoneName;
|
||||||
|
var idn = new IdnMapping();
|
||||||
|
return idn.GetAscii(zoneName);
|
||||||
|
}
|
||||||
|
|
||||||
#region Zones
|
#region Zones
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public bool ZoneExists(string zoneName)
|
public bool ZoneExists(string zoneName)
|
||||||
|
@ -58,7 +66,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' ZoneExists", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' ZoneExists", ProviderSettings.ProviderName);
|
||||||
bool result = DnsProvider.ZoneExists(zoneName);
|
bool result = DnsProvider.ZoneExists(GetAsciiZoneName(zoneName));
|
||||||
Log.WriteEnd("'{0}' ZoneExists", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' ZoneExists", ProviderSettings.ProviderName);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +100,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' AddPrimaryZone", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' AddPrimaryZone", ProviderSettings.ProviderName);
|
||||||
DnsProvider.AddPrimaryZone(zoneName, secondaryServers);
|
DnsProvider.AddPrimaryZone(GetAsciiZoneName(zoneName), secondaryServers);
|
||||||
Log.WriteEnd("'{0}' AddPrimaryZone", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' AddPrimaryZone", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -108,7 +116,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' AddSecondaryZone", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' AddSecondaryZone", ProviderSettings.ProviderName);
|
||||||
DnsProvider.AddSecondaryZone(zoneName, masterServers);
|
DnsProvider.AddSecondaryZone(GetAsciiZoneName(zoneName), masterServers);
|
||||||
Log.WriteEnd("'{0}' AddSecondaryZone", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' AddSecondaryZone", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -124,7 +132,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' DeleteZone", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' DeleteZone", ProviderSettings.ProviderName);
|
||||||
DnsProvider.DeleteZone(zoneName);
|
DnsProvider.DeleteZone(GetAsciiZoneName(zoneName));
|
||||||
Log.WriteEnd("'{0}' DeleteZone", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' DeleteZone", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -140,7 +148,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' UpdateSoaRecord", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' UpdateSoaRecord", ProviderSettings.ProviderName);
|
||||||
DnsProvider.UpdateSoaRecord(zoneName, host, primaryNsServer, primaryPerson);
|
DnsProvider.UpdateSoaRecord(GetAsciiZoneName(zoneName), host, primaryNsServer, primaryPerson);
|
||||||
Log.WriteEnd("'{0}' UpdateSoaRecord", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' UpdateSoaRecord", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -158,7 +166,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' GetZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' GetZoneRecords", ProviderSettings.ProviderName);
|
||||||
DnsRecord[] result = DnsProvider.GetZoneRecords(zoneName);
|
DnsRecord[] result = DnsProvider.GetZoneRecords(GetAsciiZoneName(zoneName));
|
||||||
Log.WriteEnd("'{0}' GetZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' GetZoneRecords", ProviderSettings.ProviderName);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +183,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' AddZoneRecord", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' AddZoneRecord", ProviderSettings.ProviderName);
|
||||||
DnsProvider.AddZoneRecord(zoneName, record);
|
DnsProvider.AddZoneRecord(GetAsciiZoneName(zoneName), record);
|
||||||
Log.WriteEnd("'{0}' AddZoneRecord", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' AddZoneRecord", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -191,7 +199,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' DeleteZoneRecord", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' DeleteZoneRecord", ProviderSettings.ProviderName);
|
||||||
DnsProvider.DeleteZoneRecord(zoneName, record);
|
DnsProvider.DeleteZoneRecord(GetAsciiZoneName(zoneName), record);
|
||||||
Log.WriteEnd("'{0}' DeleteZoneRecord", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' DeleteZoneRecord", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -207,7 +215,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' AddZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' AddZoneRecords", ProviderSettings.ProviderName);
|
||||||
DnsProvider.AddZoneRecords(zoneName, records);
|
DnsProvider.AddZoneRecords(GetAsciiZoneName(zoneName), records);
|
||||||
Log.WriteEnd("'{0}' AddZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' AddZoneRecords", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -223,7 +231,7 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' DeleteZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' DeleteZoneRecords", ProviderSettings.ProviderName);
|
||||||
DnsProvider.DeleteZoneRecords(zoneName, records);
|
DnsProvider.DeleteZoneRecords(GetAsciiZoneName(zoneName), records);
|
||||||
Log.WriteEnd("'{0}' DeleteZoneRecords", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' DeleteZoneRecords", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -38,6 +38,9 @@ using Microsoft.Web.Services3;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Providers.OS;
|
using WebsitePanel.Providers.OS;
|
||||||
using WebsitePanel.Server.Utils;
|
using WebsitePanel.Server.Utils;
|
||||||
|
using WebsitePanel.Providers.DNS;
|
||||||
|
using WebsitePanel.Providers.DomainLookup;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WebsitePanel.Server
|
namespace WebsitePanel.Server
|
||||||
{
|
{
|
||||||
|
@ -737,5 +740,6 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,23 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public bool AddRdsServersToDeployment(RdsServer[] servers)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Log.WriteStart("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
|
||||||
|
var result = RDSProvider.AddRdsServersToDeployment(servers);
|
||||||
|
Log.WriteEnd("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(String.Format("'{0}' AddRdsServersToDeployment", ProviderSettings.ProviderName), ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public RdsCollection GetCollection(string collectionName)
|
public RdsCollection GetCollection(string collectionName)
|
||||||
{
|
{
|
||||||
|
@ -191,6 +208,22 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public void SetRDServerNewConnectionAllowed(bool newConnectionAllowed, RdsServer server)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Log.WriteStart("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
|
||||||
|
RDSProvider.SetRDServerNewConnectionAllowed(newConnectionAllowed, server);
|
||||||
|
Log.WriteEnd("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(String.Format("'{0}' SetRDServerNewConnectionAllowed", ProviderSettings.ProviderName), ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
public List<StartMenuApp> GetAvailableRemoteApplications(string collectionName)
|
||||||
{
|
{
|
||||||
|
@ -326,6 +359,56 @@ namespace WebsitePanel.Server
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public string[] GetApplicationUsers(string collectionName, string applicationName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Log.WriteStart("'{0}' GetApplicationUsers", ProviderSettings.ProviderName);
|
||||||
|
var result = RDSProvider.GetApplicationUsers(collectionName, applicationName);
|
||||||
|
Log.WriteEnd("'{0}' GetApplicationUsers", ProviderSettings.ProviderName);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(String.Format("'{0}' GetApplicationUsers", ProviderSettings.ProviderName), ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Log.WriteStart("'{0}' SetApplicationUsers", ProviderSettings.ProviderName);
|
||||||
|
var result = RDSProvider.SetApplicationUsers(collectionName, remoteApp, users);
|
||||||
|
Log.WriteEnd("'{0}' SetApplicationUsers", ProviderSettings.ProviderName);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(String.Format("'{0}' SetApplicationUsers", ProviderSettings.ProviderName), ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public bool CheckRDSServerAvaliable(string hostname)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Log.WriteStart("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName);
|
||||||
|
var result = RDSProvider.CheckRDSServerAvaliable(hostname);
|
||||||
|
Log.WriteEnd("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError(String.Format("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName), ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,8 @@ namespace WebsitePanel.Server
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' GetServiceItemsDiskSpace", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' GetServiceItemsDiskSpace", ProviderSettings.ProviderName);
|
||||||
|
|
||||||
|
if (items.Length == 0) return new ServiceProviderItemDiskSpace[] {};
|
||||||
return Provider.GetServiceItemsDiskSpace(UnwrapServiceProviderItems(items));
|
return Provider.GetServiceItemsDiskSpace(UnwrapServiceProviderItems(items));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- Custom configuration sections -->
|
<!-- Custom configuration sections -->
|
||||||
<configSections>
|
<configSections>
|
||||||
|
@ -8,7 +8,12 @@
|
||||||
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||||
|
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
|
||||||
|
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||||
|
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||||
|
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
|
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
|
@ -168,7 +173,7 @@
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012" />
|
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80"/>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -17,7 +17,7 @@
|
||||||
<OldToolsVersion>4.0</OldToolsVersion>
|
<OldToolsVersion>4.0</OldToolsVersion>
|
||||||
<UpgradeBackupLocation>
|
<UpgradeBackupLocation>
|
||||||
</UpgradeBackupLocation>
|
</UpgradeBackupLocation>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
<UseIISExpress>false</UseIISExpress>
|
<UseIISExpress>false</UseIISExpress>
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
@ -79,7 +79,6 @@
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.ServiceProcess" />
|
<Reference Include="System.ServiceProcess" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
<Control key="domains" />
|
<Control key="domains" />
|
||||||
<Control key="add_domain" general_key="domains" />
|
<Control key="add_domain" general_key="domains" />
|
||||||
<Control key="domain_records" general_key="domains" />
|
<Control key="domain_records" general_key="domains" />
|
||||||
|
<Control key="check_domain" general_key="domains" />
|
||||||
|
|
||||||
<Control key="storage_usage" />
|
<Control key="storage_usage" />
|
||||||
<Control key="storage_usage_details" general_key="storage_usage" />
|
<Control key="storage_usage_details" general_key="storage_usage" />
|
||||||
|
@ -141,4 +142,6 @@
|
||||||
<Control key="rds_create_collection" general_key="rds_collections" />
|
<Control key="rds_create_collection" general_key="rds_collections" />
|
||||||
<Control key="rds_collection_edit_apps" general_key="rds_collections" />
|
<Control key="rds_collection_edit_apps" general_key="rds_collections" />
|
||||||
<Control key="rds_collection_edit_users" general_key="rds_collections" />
|
<Control key="rds_collection_edit_users" general_key="rds_collections" />
|
||||||
|
<Control key="rds_application_edit_users" general_key="rds_collections" />
|
||||||
|
<Control key="rds_edit_collection" general_key="rds_collections" />
|
||||||
</Controls>
|
</Controls>
|
||||||
|
|
|
@ -513,6 +513,7 @@
|
||||||
<Control key="org_domains" src="WebsitePanel/ExchangeServer/OrganizationDomainNames.ascx" title="OrganizationDomainNames" type="View" />
|
<Control key="org_domains" src="WebsitePanel/ExchangeServer/OrganizationDomainNames.ascx" title="OrganizationDomainNames" type="View" />
|
||||||
<Control key="org_add_domain" src="WebsitePanel/ExchangeServer/OrganizationAddDomainName.ascx" title="OrganizationAddDomainName" type="View" />
|
<Control key="org_add_domain" src="WebsitePanel/ExchangeServer/OrganizationAddDomainName.ascx" title="OrganizationAddDomainName" type="View" />
|
||||||
<Control key="add_domain" src="WebsitePanel/ExchangeServer/ExchangeAddDomainName.ascx" title="ExchangeAddDomainName" type="View" />
|
<Control key="add_domain" src="WebsitePanel/ExchangeServer/ExchangeAddDomainName.ascx" title="ExchangeAddDomainName" type="View" />
|
||||||
|
<Control key="check_domain" src="WebsitePanel/ExchangeServer/ExchangeCheckDomainName.ascx" title="ExchangeCheckDomainName" type="View" />
|
||||||
<Control key="domain_records" src="WebsitePanel/ExchangeServer/ExchangeDomainRecords.ascx" title="ExchangeDomainRecords" type="View" />
|
<Control key="domain_records" src="WebsitePanel/ExchangeServer/ExchangeDomainRecords.ascx" title="ExchangeDomainRecords" type="View" />
|
||||||
<Control key="storage_usage" src="WebsitePanel/ExchangeServer/ExchangeStorageUsage.ascx" title="ExchangeStorageUsage" type="View" />
|
<Control key="storage_usage" src="WebsitePanel/ExchangeServer/ExchangeStorageUsage.ascx" title="ExchangeStorageUsage" type="View" />
|
||||||
<Control key="storage_usage_details" src="WebsitePanel/ExchangeServer/ExchangeStorageUsageBreakdown.ascx" title="ExchangeStorageUsageBreakdown" type="View" />
|
<Control key="storage_usage_details" src="WebsitePanel/ExchangeServer/ExchangeStorageUsageBreakdown.ascx" title="ExchangeStorageUsageBreakdown" type="View" />
|
||||||
|
@ -574,6 +575,8 @@
|
||||||
<Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" />
|
<Control key="rds_create_collection" src="WebsitePanel/RDS/RDSCreateCollection.ascx" title="RDSCreateCollection" type="View" />
|
||||||
<Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" />
|
<Control key="rds_collection_edit_apps" src="WebsitePanel/RDS/RDSEditCollectionApps.ascx" title="RDSEditCollectionApps" type="View" />
|
||||||
<Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" />
|
<Control key="rds_collection_edit_users" src="WebsitePanel/RDS/RDSEditCollectionUsers.ascx" title="RDSEditCollectionUsers" type="View" />
|
||||||
|
<Control key="rds_application_edit_users" src="WebsitePanel/RDS/RDSEditApplicationUsers.ascx" title="RDSEditApplicationUsers" type="View" />
|
||||||
|
<Control key="rds_edit_collection" src="WebsitePanel/RDS/RDSEditCollection.ascx" title="RDSEditCollection" type="View" />
|
||||||
</Controls>
|
</Controls>
|
||||||
</ModuleDefinition>
|
</ModuleDefinition>
|
||||||
|
|
||||||
|
|
|
@ -5593,4 +5593,37 @@
|
||||||
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
<data name="Error.RDS_CREATE_COLLECTION_RDSSERVER_REQUAIRED" xml:space="preserve">
|
||||||
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
<value>Error creating rds collection. You need to add at least 1 rds server to collection</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Quota.Exchange2013.ResourceMailboxes" xml:space="preserve">
|
||||||
|
<value>Resource Mailboxes per Organization</value>
|
||||||
|
</data>
|
||||||
|
<data name="Quota.Exchange2013.SharedMailboxes" xml:space="preserve">
|
||||||
|
<value>Shared Mailboxes per Organization</value>
|
||||||
|
</data>
|
||||||
|
<data name="RoomMailbox.Text" xml:space="preserve">
|
||||||
|
<value> (room mailbox)</value>
|
||||||
|
</data>
|
||||||
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
|
<value> (shared mailbox)</value>
|
||||||
|
</data>
|
||||||
|
<data name="EquipmentMailbox.Text" xml:space="preserve">
|
||||||
|
<value> (equipment mailbox)</value>
|
||||||
|
</data>
|
||||||
|
<data name="Success.DOMAIN_UPDATE_DOMAIN" xml:space="preserve">
|
||||||
|
<value>Domain information has been successfully updated.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Success.WEB_UPDATE_SITE" xml:space="preserve">
|
||||||
|
<value>Web site has been successfully updated.</value>
|
||||||
|
</data>
|
||||||
|
<data name="SchedulerTask.SCHEDULE_TASK_DOMAIN_LOOKUP" xml:space="preserve">
|
||||||
|
<value>Check MX and NS on DNS servers</value>
|
||||||
|
</data>
|
||||||
|
<data name="SchedulerTask.SCHEDULE_TASK_DOMAIN_EXPIRATION" xml:space="preserve">
|
||||||
|
<value>Check domain expiration date</value>
|
||||||
|
</data>
|
||||||
|
<data name="ERROR.IDNDOMAIN_NO_MAIL" xml:space="preserve">
|
||||||
|
<value>You cannot use a IDN domain name for mail</value>
|
||||||
|
</data>
|
||||||
|
<data name="ERROR.IDNDOMAIN_NO_ORGANIZATION" xml:space="preserve">
|
||||||
|
<value>You cannot use a IDN domain name for organizations</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Binary file not shown.
After Width: | Height: | Size: 226 B |
|
@ -237,6 +237,7 @@ A.Black {color: Black !important; text-decoration: none !important;}
|
||||||
.RedStatus {background-image: url(error_bkg.gif); background-repeat: repeat-x;font-size: 8pt; font-weight: bold; color: White; background-color: #ff3300; text-align: center; padding: 6px;}
|
.RedStatus {background-image: url(error_bkg.gif); background-repeat: repeat-x;font-size: 8pt; font-weight: bold; color: White; background-color: #ff3300; text-align: center; padding: 6px;}
|
||||||
.MessageBox SPAN.description {font-weight: normal !important;}
|
.MessageBox SPAN.description {font-weight: normal !important;}
|
||||||
.MessageBox .TechnicalDetails {padding-top: 4px; font-weight: normal !important;}
|
.MessageBox .TechnicalDetails {padding-top: 4px; font-weight: normal !important;}
|
||||||
|
.TechnicalDetailsTable {background-color: #FFFFFF; color: #222; }
|
||||||
.MessageBoxSection {font-size: 8pt; font-weight: bold;}
|
.MessageBoxSection {font-size: 8pt; font-weight: bold;}
|
||||||
.popupHint {border: 2px solid #C4D6BB;padding: 3px; background-color: #F1F1FF;}
|
.popupHint {border: 2px solid #C4D6BB;padding: 3px; background-color: #F1F1FF;}
|
||||||
.popupComments {border: 2px solid #C4D6BB;font-size: 9px; padding: 3px; background-color: #F1F1FF;}
|
.popupComments {border: 2px solid #C4D6BB;font-size: 9px; padding: 3px; background-color: #F1F1FF;}
|
||||||
|
@ -292,3 +293,4 @@ UL.ActionButtons LI {margin-bottom: 12px;}
|
||||||
p.warningText {font-size:14px; color:Red; text-align:center;}
|
p.warningText {font-size:14px; color:Red; text-align:center;}
|
||||||
.Hidden {display: none;}
|
.Hidden {display: none;}
|
||||||
.LinkText {color:#428bca;}
|
.LinkText {color:#428bca;}
|
||||||
|
.WrapText { white-space: normal;}
|
|
@ -112,10 +112,10 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="ModuleAction.AddDomain" xml:space="preserve">
|
<data name="ModuleAction.AddDomain" xml:space="preserve">
|
||||||
<value>Add New Domain</value>
|
<value>Add New Domain</value>
|
||||||
|
@ -198,4 +198,25 @@
|
||||||
<data name="gvDomainsType.Header" xml:space="preserve">
|
<data name="gvDomainsType.Header" xml:space="preserve">
|
||||||
<value>Type</value>
|
<value>Type</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DomainExpirationDate.Expired" xml:space="preserve">
|
||||||
|
<value>Expired</value>
|
||||||
|
</data>
|
||||||
|
<data name="DomainExpirationDate.Unknown" xml:space="preserve">
|
||||||
|
<value>Unknown</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvDomainsExpirationDate.Header" xml:space="preserve">
|
||||||
|
<value>Expiration Date</value>
|
||||||
|
</data>
|
||||||
|
<data name="DomainExpirationDate.NotChecked" xml:space="preserve">
|
||||||
|
<value>Not Checked</value>
|
||||||
|
</data>
|
||||||
|
<data name="DomainExpirationDate.NotExist" xml:space="preserve">
|
||||||
|
<value>Non-Existent</value>
|
||||||
|
</data>
|
||||||
|
<data name="DomainLookup.TooltipHeader" xml:space="preserve">
|
||||||
|
<value>Current Real DNS Values</value>
|
||||||
|
</data>
|
||||||
|
<data name="DomainLookup.TooltipHeader.Registrar" xml:space="preserve">
|
||||||
|
<value>Registrar:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -144,18 +144,6 @@
|
||||||
<data name="DescribeEnableDns.Text" xml:space="preserve">
|
<data name="DescribeEnableDns.Text" xml:space="preserve">
|
||||||
<value>Tick this checkbox if DNS zone for this domain will be located on name servers of your hosting provider. Make sure you changed name servers in the domain registrar control panel.</value>
|
<value>Tick this checkbox if DNS zone for this domain will be located on name servers of your hosting provider. Make sure you changed name servers in the domain registrar control panel.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DomainFormatValidator.ErrorMessage" xml:space="preserve">
|
|
||||||
<value>Please, enter correct domain name, for example "mydomain.com" or "sub.mydomain.com".</value>
|
|
||||||
</data>
|
|
||||||
<data name="DomainFormatValidator.Text" xml:space="preserve">
|
|
||||||
<value>*</value>
|
|
||||||
</data>
|
|
||||||
<data name="DomainRequiredValidator.ErrorMessage" xml:space="preserve">
|
|
||||||
<value>Please enter domain name</value>
|
|
||||||
</data>
|
|
||||||
<data name="DomainRequiredValidator.Text" xml:space="preserve">
|
|
||||||
<value>*</value>
|
|
||||||
</data>
|
|
||||||
<data name="EnableDns.Text" xml:space="preserve">
|
<data name="EnableDns.Text" xml:space="preserve">
|
||||||
<value>Enable DNS</value>
|
<value>Enable DNS</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -168,18 +156,6 @@
|
||||||
<data name="PointWebSite.Text" xml:space="preserve">
|
<data name="PointWebSite.Text" xml:space="preserve">
|
||||||
<value>Assign to existing Web Site</value>
|
<value>Assign to existing Web Site</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SubDomainFormatValidator.ErrorMessage" xml:space="preserve">
|
|
||||||
<value>Please, enter correct sub-domain name, for example "subdomain" or "sub.subdomain".</value>
|
|
||||||
</data>
|
|
||||||
<data name="SubDomainFormatValidator.Text" xml:space="preserve">
|
|
||||||
<value>*</value>
|
|
||||||
</data>
|
|
||||||
<data name="SubDomainRequiredValidator.ErrorMessage" xml:space="preserve">
|
|
||||||
<value>Please enter sub-domain name</value>
|
|
||||||
</data>
|
|
||||||
<data name="SubDomainRequiredValidator.Text" xml:space="preserve">
|
|
||||||
<value>*</value>
|
|
||||||
</data>
|
|
||||||
<data name="lblHostName.Text" xml:space="preserve">
|
<data name="lblHostName.Text" xml:space="preserve">
|
||||||
<value>Hostname:</value>
|
<value>Hostname:</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -112,24 +112,18 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="btnSave.Text" xml:space="preserve">
|
|
||||||
<value>Save</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnCancel.Text" xml:space="preserve">
|
|
||||||
<value>Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDelete.Text" xml:space="preserve">
|
<data name="btnDelete.Text" xml:space="preserve">
|
||||||
<value>Delete</value>
|
<value>Delete</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnDelete.OnClientClick" xml:space="preserve">
|
<data name="btnDelete.OnClientClick" xml:space="preserve">
|
||||||
<value>if(!confirm('Do you really want to delete this domain?')) return false;ShowProgressDialog('Deleting domain...');</value>
|
<value>if(!confirm('Do you really want to delete this domain?')) return false;ShowProgressDialog('Deleting domain...');</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||||
<value>ShowProgressDialog('Updating Domain...');</value>
|
<value>ShowProgressDialog('Updating Domain...');</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AllowSubDomains.Text" xml:space="preserve">
|
<data name="AllowSubDomains.Text" xml:space="preserve">
|
||||||
|
|
|
@ -0,0 +1,147 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ddlPriorityItem.High" xml:space="preserve">
|
||||||
|
<value>High</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlPriorityItem.Low" xml:space="preserve">
|
||||||
|
<value>Low</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlPriorityItem.Normal" xml:space="preserve">
|
||||||
|
<value>Normal</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblCC.Text" xml:space="preserve">
|
||||||
|
<value>CC:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblFrom.Text" xml:space="preserve">
|
||||||
|
<value>From:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblHtmlBody.Text" xml:space="preserve">
|
||||||
|
<value>HTML Body:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblPriority.Text" xml:space="preserve">
|
||||||
|
<value>Priority:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSubject.Text" xml:space="preserve">
|
||||||
|
<value>Subject:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblTextBody.Text" xml:space="preserve">
|
||||||
|
<value>Text Body:</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ddlPriorityItem.High" xml:space="preserve">
|
||||||
|
<value>High</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlPriorityItem.Low" xml:space="preserve">
|
||||||
|
<value>Low</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlPriorityItem.Normal" xml:space="preserve">
|
||||||
|
<value>Normal</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblCC.Text" xml:space="preserve">
|
||||||
|
<value>CC:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblFrom.Text" xml:space="preserve">
|
||||||
|
<value>From:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblHtmlBody.Text" xml:space="preserve">
|
||||||
|
<value>HTML Body:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblNoChangesHtmlBody" xml:space="preserve">
|
||||||
|
<value>No Changes HTML Body:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
|
||||||
|
<value>No Changes Text Body:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblPriority.Text" xml:space="preserve">
|
||||||
|
<value>Priority:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSubject.Text" xml:space="preserve">
|
||||||
|
<value>Subject:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblTextBody.Text" xml:space="preserve">
|
||||||
|
<value>Text Body:</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -112,10 +112,10 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="btnCancel.Text" xml:space="preserve">
|
<data name="btnCancel.Text" xml:space="preserve">
|
||||||
<value>Cancel</value>
|
<value>Cancel</value>
|
||||||
|
@ -141,4 +141,10 @@
|
||||||
<data name="lnkVpsSummaryLetter.Text" xml:space="preserve">
|
<data name="lnkVpsSummaryLetter.Text" xml:space="preserve">
|
||||||
<value>VPS Summary Letter</value>
|
<value>VPS Summary Letter</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lnkDomainExpirationLetter.Text" xml:space="preserve">
|
||||||
|
<value>Domain Expiration Letter</value>
|
||||||
|
</data>
|
||||||
|
<data name="lnkDomainLookupLetter.Text" xml:space="preserve">
|
||||||
|
<value>Domain MX and NS Letter</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -132,9 +132,6 @@
|
||||||
<data name="btnAddVirtualDirectory.Text" xml:space="preserve">
|
<data name="btnAddVirtualDirectory.Text" xml:space="preserve">
|
||||||
<value>Create Directory</value>
|
<value>Create Directory</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnCancel.Text" xml:space="preserve">
|
|
||||||
<value>Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnChangeFrontPagePassword.Text" xml:space="preserve">
|
<data name="btnChangeFrontPagePassword.Text" xml:space="preserve">
|
||||||
<value>Change Password</value>
|
<value>Change Password</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -150,12 +147,9 @@
|
||||||
<data name="btnUninstallFrontPage.Text" xml:space="preserve">
|
<data name="btnUninstallFrontPage.Text" xml:space="preserve">
|
||||||
<value>Uninstall</value>
|
<value>Uninstall</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnUpdate.OnClientClick" xml:space="preserve">
|
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||||
<value>ShowProgressDialog('Updating web site...');</value>
|
<value>ShowProgressDialog('Updating web site...');</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnUpdate.Text" xml:space="preserve">
|
|
||||||
<value>Update</value>
|
|
||||||
</data>
|
|
||||||
<data name="cmdContinue.AlternateText" xml:space="preserve">
|
<data name="cmdContinue.AlternateText" xml:space="preserve">
|
||||||
<value>Continue Web Site</value>
|
<value>Continue Web Site</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -306,5 +306,26 @@ namespace WebsitePanel.Portal
|
||||||
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
(cntx.Quotas[key].QuotaTypeId != 1 && (cntx.Quotas[key].QuotaAllocatedValue > 0 || cntx.Quotas[key].QuotaAllocatedValue == -1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsIdnDomain(string domainName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(domainName))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var idn = new IdnMapping();
|
||||||
|
return idn.GetAscii(domainName) != domainName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string UnicodeToAscii(string domainName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(domainName))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
var idn = new IdnMapping();
|
||||||
|
return idn.GetAscii(domainName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,7 +66,7 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
public RdsServer[] GetOrganizationRdsServersPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
|
||||||
{
|
{
|
||||||
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, "", filterValue, sortColumn, startRowIndex, maximumRows);
|
rdsServers = ES.Services.RDS.GetOrganizationRdsServersPaged(itemId, null, "", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||||
|
|
||||||
return rdsServers.Servers;
|
return rdsServers.Servers;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Globalization;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -57,6 +58,10 @@ namespace WebsitePanel.Portal
|
||||||
// domain name
|
// domain name
|
||||||
DomainInfo domain = ES.Services.Servers.GetDomain(PanelRequest.DomainID);
|
DomainInfo domain = ES.Services.Servers.GetDomain(PanelRequest.DomainID);
|
||||||
litDomainName.Text = domain.DomainName;
|
litDomainName.Text = domain.DomainName;
|
||||||
|
if (Utils.IsIdnDomain(domain.DomainName))
|
||||||
|
{
|
||||||
|
litDomainName.Text = string.Format("{0} ({1})", Utils.UnicodeToAscii(domain.DomainName), domain.DomainName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
CssSelectorClass="NormalGridView" AllowPaging="True" OnRowCommand="gvDomains_RowCommand">
|
CssSelectorClass="NormalGridView" AllowPaging="True" OnRowCommand="gvDomains_RowCommand">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField SortExpression="DomainName" HeaderText="gvDomainsName">
|
<asp:TemplateField SortExpression="DomainName" HeaderText="gvDomainsName">
|
||||||
<ItemStyle Width="60%" Wrap="False"></ItemStyle>
|
<ItemStyle Width="45%" Wrap="False"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<b><asp:hyperlink id=lnkEdit1 runat="server" CssClass="Medium"
|
<b><asp:hyperlink id=lnkEdit1 runat="server" CssClass="Medium"
|
||||||
NavigateUrl='<%# GetItemEditUrl(Eval("PackageID"), Eval("DomainID")) %>'>
|
NavigateUrl='<%# GetItemEditUrl(Eval("PackageID"), Eval("DomainID")) %>'>
|
||||||
|
@ -37,6 +37,20 @@
|
||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="gvDomainsExpirationDate">
|
||||||
|
<ItemStyle Width="11%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<%# GetDomainExpirationDate(Eval("ExpirationDate"), Eval("LastUpdateDate"))%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
|
<ItemStyle Width="5%"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<div style="display:inline-block" runat="server" Visible='<%# ShowDomainDnsInfo(Eval("ExpirationDate"), Eval("LastUpdateDate"), !(bool)Eval("IsSubDomain") && !(bool)Eval("IsInstantAlias") && !(bool)Eval("IsDomainPointer")) && !string.IsNullOrEmpty(GetDomainDnsRecords((int)Eval("DomainId"))) %>'>
|
||||||
|
<img style="border-width: 0px;" src="App_Themes/Default/Images/information_icon_small.gif" title="<%# GetDomainTooltip((int)Eval("DomainId"), Eval("RegistrarName") != DBNull.Value ? (string)Eval("RegistrarName"):string.Empty) %>">
|
||||||
|
</div>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="gvDomainsType">
|
<asp:TemplateField HeaderText="gvDomainsType">
|
||||||
<ItemStyle Width="30%"></ItemStyle>
|
<ItemStyle Width="30%"></ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|
|
@ -36,23 +36,29 @@ using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.Web.UI.WebControls.WebParts;
|
using System.Web.UI.WebControls.WebParts;
|
||||||
using System.Web.UI.HtmlControls;
|
using System.Web.UI.HtmlControls;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class Domains : WebsitePanelModuleBase
|
public partial class Domains : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
public Dictionary<int, string> dnsRecords;
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
dnsRecords = new Dictionary<int, string>();
|
||||||
|
|
||||||
gvDomains.PageSize = UsersHelper.GetDisplayItemsPerPage();
|
gvDomains.PageSize = UsersHelper.GetDisplayItemsPerPage();
|
||||||
|
|
||||||
// visibility
|
// visibility
|
||||||
chkRecursive.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
chkRecursive.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
|
||||||
gvDomains.Columns[2].Visible = gvDomains.Columns[3].Visible =
|
gvDomains.Columns[4].Visible = gvDomains.Columns[5].Visible =
|
||||||
(PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked;
|
(PanelSecurity.SelectedUser.Role != UserRole.User) && chkRecursive.Checked;
|
||||||
gvDomains.Columns[4].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator);
|
gvDomains.Columns[6].Visible = (PanelSecurity.SelectedUser.Role == UserRole.Administrator);
|
||||||
gvDomains.Columns[5].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator);
|
gvDomains.Columns[7].Visible = (PanelSecurity.EffectiveUser.Role == UserRole.Administrator);
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
@ -100,6 +106,101 @@ namespace WebsitePanel.Portal
|
||||||
return GetLocalizedString("DomainType.Domain");
|
return GetLocalizedString("DomainType.Domain");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetDomainExpirationDate(object expirationDateObject, object LastUpdateDateObject)
|
||||||
|
{
|
||||||
|
var expirationDate = expirationDateObject as DateTime?;
|
||||||
|
var lastUpdateDate = LastUpdateDateObject as DateTime?;
|
||||||
|
|
||||||
|
if (expirationDate != null && expirationDate < DateTime.Now)
|
||||||
|
{
|
||||||
|
return GetLocalizedString("DomainExpirationDate.Expired");
|
||||||
|
}
|
||||||
|
else if(expirationDate != null)
|
||||||
|
{
|
||||||
|
return expirationDate.Value.ToShortDateString();
|
||||||
|
}
|
||||||
|
else if (lastUpdateDate == null)
|
||||||
|
{
|
||||||
|
return GetLocalizedString("DomainExpirationDate.NotChecked");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetLocalizedString("DomainExpirationDate.NotExist");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ShowDomainDnsInfo(object expirationDateObject, object LastUpdateDateObject, bool isTopLevelDomain)
|
||||||
|
{
|
||||||
|
var expirationDate = expirationDateObject as DateTime?;
|
||||||
|
var lastUpdateDate = LastUpdateDateObject as DateTime?;
|
||||||
|
|
||||||
|
if (!isTopLevelDomain)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (expirationDate != null && expirationDate < DateTime.Now)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(expirationDate != null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (lastUpdateDate == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetDomainDnsRecords(int domainId)
|
||||||
|
{
|
||||||
|
if(dnsRecords.ContainsKey(domainId))
|
||||||
|
{
|
||||||
|
return dnsRecords[domainId];
|
||||||
|
}
|
||||||
|
|
||||||
|
var records = ES.Services.Servers.GetDomainDnsRecords(domainId);
|
||||||
|
|
||||||
|
if (!records.Any())
|
||||||
|
{
|
||||||
|
dnsRecords.Add(domainId, string.Empty);
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
var header = GetLocalizedString("DomainLookup.TooltipHeader");
|
||||||
|
|
||||||
|
var tooltipLines = new List<string>();
|
||||||
|
|
||||||
|
tooltipLines.Add(header);
|
||||||
|
tooltipLines.Add(" ");
|
||||||
|
tooltipLines.AddRange( records.Select(x=>string.Format("{0}: {1}", x.RecordType, x.Value)));
|
||||||
|
|
||||||
|
dnsRecords.Add(domainId, string.Join("\r\n", tooltipLines));
|
||||||
|
|
||||||
|
return dnsRecords[domainId];
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetDomainTooltip(int domainId, string registrar)
|
||||||
|
{
|
||||||
|
var dnsString = GetDomainDnsRecords(domainId);
|
||||||
|
|
||||||
|
var tooltipLines = new List<string>();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(registrar))
|
||||||
|
{
|
||||||
|
var header = GetLocalizedString("DomainLookup.TooltipHeader.Registrar");
|
||||||
|
tooltipLines.Add(header + " " + registrar);
|
||||||
|
tooltipLines.Add("\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Join("\r\n", tooltipLines) + dnsString;
|
||||||
|
}
|
||||||
|
|
||||||
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
protected void odsDomainsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Exception != null)
|
if (e.Exception != null)
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2014, Outercurve Foundation.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
// are permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// - Redistributions of source code must retain the above copyright notice, this
|
|
||||||
// list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
|
||||||
// and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
|
||||||
// contributors may be used to endorse or promote products derived from this
|
|
||||||
// software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
||||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
|
|
@ -1,32 +1,16 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsAddDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsAddDomain" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsAddDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsAddDomain" %>
|
||||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="DomainsSelectDomainControl.ascx" TagName="DomainsSelectDomainControl" TagPrefix="uc1" %>
|
<%@ Register Src="UserControls/DomainControl.ascx" TagName="DomainControl" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
||||||
|
|
||||||
<asp:ValidationSummary ID="summary" runat="server" ShowMessageBox="true" ShowSummary="false" ValidationGroup="Domain" />
|
<asp:ValidationSummary ID="summary" runat="server" ShowMessageBox="true" ShowSummary="true" ValidationGroup="Domain" />
|
||||||
|
|
||||||
<div class="FormBody">
|
<div class="FormBody">
|
||||||
|
|
||||||
<p id="DomainPanel" runat="server" style="padding: 15px 0 15px 5px;" visible="false">
|
<p id="DomainPanel" runat="server" style="padding: 15px 0 15px 5px;">
|
||||||
<asp:TextBox ID="DomainName" runat="server" Width="300" CssClass="HugeTextBox"></asp:TextBox>
|
<wsp:DomainControl ID="DomainName" runat="server" RequiredEnabled="True" ValidationGroup="Domain" OnTextChanged="DomainName_TextChanged"></wsp:DomainControl>
|
||||||
<asp:RequiredFieldValidator id="DomainRequiredValidator" runat="server" meta:resourcekey="DomainRequiredValidator"
|
|
||||||
ControlToValidate="DomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
|
||||||
<asp:RegularExpressionValidator id="DomainFormatValidator" runat="server" meta:resourcekey="DomainFormatValidator"
|
|
||||||
ControlToValidate="DomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"
|
|
||||||
ValidationExpression="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.){1,10}[a-zA-Z]{2,6}$"></asp:RegularExpressionValidator>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p id="SubDomainPanel" runat="server" style="padding: 15px 0 15px 5px;" visible="false">
|
|
||||||
<asp:TextBox ID="SubDomainName" runat="server" Width="150" CssClass="TextBox100"></asp:TextBox>
|
|
||||||
.
|
|
||||||
<asp:DropDownList ID="DomainsList" Runat="server" CssClass="NormalTextBox" DataTextField="DomainName" DataValueField="DomainName"></asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator id="SubDomainRequiredValidator" runat="server" meta:resourcekey="SubDomainRequiredValidator"
|
|
||||||
ControlToValidate="SubDomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
|
||||||
<asp:RegularExpressionValidator id="SubDomainFormatValidator" runat="server" meta:resourcekey="SubDomainFormatValidator"
|
|
||||||
ControlToValidate="SubDomainName" Display="Dynamic" ValidationGroup="Domain" SetFocusOnError="true"
|
|
||||||
ValidationExpression="^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)(\.[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?){0,9}$"></asp:RegularExpressionValidator>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<wsp:CollapsiblePanel id="OptionsPanelHeader" runat="server"
|
<wsp:CollapsiblePanel id="OptionsPanelHeader" runat="server"
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using WebsitePanel.Portal.UserControls;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
|
@ -82,12 +83,12 @@ namespace WebsitePanel.Portal
|
||||||
if (type == DomainType.Domain || type == DomainType.DomainPointer)
|
if (type == DomainType.Domain || type == DomainType.DomainPointer)
|
||||||
{
|
{
|
||||||
// domains
|
// domains
|
||||||
DomainPanel.Visible = true;
|
DomainName.IsSubDomain = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// sub-domains
|
// sub-domains
|
||||||
SubDomainPanel.Visible = true;
|
DomainName.IsSubDomain = true;
|
||||||
|
|
||||||
// fill sub-domains
|
// fill sub-domains
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
|
@ -156,6 +157,8 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
// allow sub-domains
|
// allow sub-domains
|
||||||
AllowSubDomainsPanel.Visible = (type == DomainType.Domain) && PanelSecurity.EffectiveUser.Role != UserRole.User;
|
AllowSubDomainsPanel.Visible = (type == DomainType.Domain) && PanelSecurity.EffectiveUser.Role != UserRole.User;
|
||||||
|
|
||||||
|
CheckForCorrectIdnDomainUsage(DomainName.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DomainType GetDomainType(string typeName)
|
private DomainType GetDomainType(string typeName)
|
||||||
|
@ -178,14 +181,14 @@ namespace WebsitePanel.Portal
|
||||||
if (!domain.IsDomainPointer && !domain.IsSubDomain && !domain.IsInstantAlias)
|
if (!domain.IsDomainPointer && !domain.IsSubDomain && !domain.IsInstantAlias)
|
||||||
domains.Add(domain);
|
domains.Add(domain);
|
||||||
|
|
||||||
DomainsList.DataSource = domains;
|
DomainName.DataSource = domains;
|
||||||
DomainsList.DataBind();
|
DomainName.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindResellerDomains()
|
private void BindResellerDomains()
|
||||||
{
|
{
|
||||||
DomainsList.DataSource = ES.Services.Servers.GetResellerDomains(PanelSecurity.PackageId);
|
DomainName.DataSource = ES.Services.Servers.GetResellerDomains(PanelSecurity.PackageId);
|
||||||
DomainsList.DataBind();
|
DomainName.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddDomain()
|
private void AddDomain()
|
||||||
|
@ -197,9 +200,7 @@ namespace WebsitePanel.Portal
|
||||||
DomainType type = GetDomainType(Request["DomainType"]);
|
DomainType type = GetDomainType(Request["DomainType"]);
|
||||||
|
|
||||||
// get domain name
|
// get domain name
|
||||||
string domainName = DomainName.Text.Trim();
|
var domainName = DomainName.Text;
|
||||||
if (type == DomainType.SubDomain || type == DomainType.ProviderSubDomain)
|
|
||||||
domainName = SubDomainName.Text.Trim() + "." + DomainsList.SelectedValue;
|
|
||||||
|
|
||||||
int pointWebSiteId = 0;
|
int pointWebSiteId = 0;
|
||||||
int pointMailDomainId = 0;
|
int pointMailDomainId = 0;
|
||||||
|
@ -260,8 +261,28 @@ namespace WebsitePanel.Portal
|
||||||
RedirectBack();
|
RedirectBack();
|
||||||
}
|
}
|
||||||
protected void btnAdd_Click(object sender, EventArgs e)
|
protected void btnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CheckForCorrectIdnDomainUsage(DomainName.Text))
|
||||||
{
|
{
|
||||||
AddDomain();
|
AddDomain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool CheckForCorrectIdnDomainUsage(string domainName)
|
||||||
|
{
|
||||||
|
// If the choosen domain is a idn domain, don't allow to create mail
|
||||||
|
if (Utils.IsIdnDomain(domainName) && PointMailDomain.Checked)
|
||||||
|
{
|
||||||
|
ShowErrorMessage("IDNDOMAIN_NO_MAIL");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void DomainName_TextChanged(object sender, DomainControl.DomainNameEventArgs e)
|
||||||
|
{
|
||||||
|
CheckForCorrectIdnDomainUsage(e.DomainName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2014, Outercurve Foundation.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
// are permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// - Redistributions of source code must retain the above copyright notice, this
|
|
||||||
// list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
|
||||||
// and/or other materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
|
||||||
// contributors may be used to endorse or promote products derived from this
|
|
||||||
// software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
||||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
@ -74,70 +46,7 @@ namespace WebsitePanel.Portal {
|
||||||
/// Auto-generated field.
|
/// Auto-generated field.
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.TextBox DomainName;
|
protected global::WebsitePanel.Portal.UserControls.DomainControl DomainName;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// DomainRequiredValidator control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator DomainRequiredValidator;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// DomainFormatValidator control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator DomainFormatValidator;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SubDomainPanel control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl SubDomainPanel;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SubDomainName control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.TextBox SubDomainName;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// DomainsList control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.DropDownList DomainsList;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SubDomainRequiredValidator control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator SubDomainRequiredValidator;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SubDomainFormatValidator control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator SubDomainFormatValidator;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OptionsPanelHeader control.
|
/// OptionsPanelHeader control.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsEditDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsEditDomain" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsEditDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsEditDomain" %>
|
||||||
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %>
|
||||||
|
<%@ Register Src="UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server" />
|
||||||
|
|
||||||
|
@ -119,9 +120,8 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="FormFooter">
|
<div class="FormFooter">
|
||||||
<asp:Button ID="btnSave" runat="server" meta:resourcekey="btnSave" CssClass="Button1" Text="Save" OnClick="btnSave_Click" OnClientClick = "ShowProgressDialog('Updating Domain...');"/>
|
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="EditMailbox"
|
||||||
<asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" CssClass="Button1" CausesValidation="false"
|
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" OnSaveClientClick="ShowProgressDialog('Updating Domain...');" />
|
||||||
Text="Cancel" OnClick="btnCancel_Click" />
|
|
||||||
<asp:Button ID="btnDelete" runat="server" meta:resourcekey="btnDelete" CssClass="Button1" CausesValidation="false"
|
<asp:Button ID="btnDelete" runat="server" meta:resourcekey="btnDelete" CssClass="Button1" CausesValidation="false"
|
||||||
Text="Delete" OnClick="btnDelete_Click" />
|
Text="Delete" OnClick="btnDelete_Click" />
|
||||||
</div>
|
</div>
|
|
@ -48,6 +48,9 @@ namespace WebsitePanel.Portal
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindDomain();
|
BindDomain();
|
||||||
|
|
||||||
|
if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null)
|
||||||
|
buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,15 +197,13 @@ namespace WebsitePanel.Portal
|
||||||
ShowResultMessage(result);
|
ShowResultMessage(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ShowSuccessMessage("DOMAIN_UPDATE_DOMAIN");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ShowErrorMessage("DOMAIN_UPDATE_DOMAIN", ex);
|
ShowErrorMessage("DOMAIN_UPDATE_DOMAIN", ex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return
|
|
||||||
RedirectSpaceHomePage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteDomain()
|
private void DeleteDomain()
|
||||||
|
@ -232,8 +233,10 @@ namespace WebsitePanel.Portal
|
||||||
SaveDomain();
|
SaveDomain();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnCancel_Click(object sender, EventArgs e)
|
protected void btnSaveExit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
SaveDomain();
|
||||||
|
|
||||||
// return
|
// return
|
||||||
RedirectSpaceHomePage();
|
RedirectSpaceHomePage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.3074
|
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
@ -428,22 +427,13 @@ namespace WebsitePanel.Portal {
|
||||||
protected global::System.Web.UI.WebControls.Localize DescribeAllowSubDomains;
|
protected global::System.Web.UI.WebControls.Localize DescribeAllowSubDomains;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSave control.
|
/// buttonPanel control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Auto-generated field.
|
/// Auto-generated field.
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnCancel control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.Button btnCancel;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnDelete control.
|
/// btnDelete control.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsSelectDomainControl.ascx.cs" Inherits="WebsitePanel.Portal.DomainsSelectDomainControl" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsSelectDomainControl.ascx.cs" Inherits="WebsitePanel.Portal.DomainsSelectDomainControl" %>
|
||||||
<asp:DropDownList id="ddlDomains" runat="server" CssClass="NormalTextBox" DataTextField="DomainName" DataValueField="DomainID" style="vertical-align:middle;"></asp:DropDownList>
|
<asp:DropDownList id="ddlDomains" runat="server" CssClass="TextBox200" DataTextField="DomainName" DataValueField="DomainID" style="vertical-align:middle;"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator id="valRequireDomain" runat="server" ErrorMessage="Select domain"
|
<asp:RequiredFieldValidator id="valRequireDomain" runat="server" ErrorMessage="Select domain"
|
||||||
ControlToValidate="ddlDomains" Display="Dynamic" meta:resourcekey="valRequireDomain"></asp:RequiredFieldValidator>
|
ControlToValidate="ddlDomains" Display="Dynamic" meta:resourcekey="valRequireDomain"></asp:RequiredFieldValidator>
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -44,6 +45,12 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class DomainsSelectDomainControl : WebsitePanelControlBase
|
public partial class DomainsSelectDomainControl : WebsitePanelControlBase
|
||||||
{
|
{
|
||||||
|
public bool HideIdnDomains
|
||||||
|
{
|
||||||
|
get { return (ViewState["HideIdnDomains"] != null) && (bool)ViewState["HideIdnDomains"]; }
|
||||||
|
set { ViewState["HideIdnDomains"] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public bool HideWebSites
|
public bool HideWebSites
|
||||||
{
|
{
|
||||||
get { return (ViewState["HideWebSites"] != null) ? (bool)ViewState["HideWebSites"] : false; }
|
get { return (ViewState["HideWebSites"] != null) ? (bool)ViewState["HideWebSites"] : false; }
|
||||||
|
@ -116,6 +123,11 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
DomainInfo[] domains = ES.Services.Servers.GetMyDomains(PackageId);
|
DomainInfo[] domains = ES.Services.Servers.GetMyDomains(PackageId);
|
||||||
|
|
||||||
|
if (HideIdnDomains)
|
||||||
|
{
|
||||||
|
domains = domains.Where(d => !Utils.IsIdnDomain(d.DomainName)).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
WebSite[] sites = null;
|
WebSite[] sites = null;
|
||||||
Hashtable htSites = new Hashtable();
|
Hashtable htSites = new Hashtable();
|
||||||
Hashtable htMailDomainPointers = new Hashtable();
|
Hashtable htMailDomainPointers = new Hashtable();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.3074
|
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
|
|
@ -0,0 +1,183 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="locTitle.Text" xml:space="preserve">
|
||||||
|
<value>Domain Dependencies</value>
|
||||||
|
</data>
|
||||||
|
<data name="Text.PageName" xml:space="preserve">
|
||||||
|
<value>Domain Dependencies</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsDisplayName.Header" xml:space="preserve">
|
||||||
|
<value>Display Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="TopComments.Text" xml:space="preserve">
|
||||||
|
<value>Objects listed Below are dependent on this domain and must be removed prior to domain</value>
|
||||||
|
</data>
|
||||||
|
<data name="Contact.Text" xml:space="preserve">
|
||||||
|
<value>Contact</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSecurityGroup.Text" xml:space="preserve">
|
||||||
|
<value>Security group</value>
|
||||||
|
</data>
|
||||||
|
<data name="DistributionList.Text" xml:space="preserve">
|
||||||
|
<value>Distribution list</value>
|
||||||
|
</data>
|
||||||
|
<data name="Equipment.Text" xml:space="preserve">
|
||||||
|
<value>Equipment</value>
|
||||||
|
</data>
|
||||||
|
<data name="ExchangeAccountEmailAddresses.Text" xml:space="preserve">
|
||||||
|
<value>Email address</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsDelete.Header" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsObjectType.Header" xml:space="preserve">
|
||||||
|
<value>Object Type</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvObjectsView.Header" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="lnkDelete.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="lnkView.Text" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="Mailbox.Text" xml:space="preserve">
|
||||||
|
<value>Mailbox</value>
|
||||||
|
</data>
|
||||||
|
<data name="PublicFolder.Text" xml:space="preserve">
|
||||||
|
<value>Public folder</value>
|
||||||
|
</data>
|
||||||
|
<data name="Room.Text" xml:space="preserve">
|
||||||
|
<value>Room</value>
|
||||||
|
</data>
|
||||||
|
<data name="SecurityGroup.Text" xml:space="preserve">
|
||||||
|
<value>Security group</value>
|
||||||
|
</data>
|
||||||
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
|
<value>Shared mailbox</value>
|
||||||
|
</data>
|
||||||
|
<data name="User.Text" xml:space="preserve">
|
||||||
|
<value>Organization user</value>
|
||||||
|
</data>
|
||||||
|
<data name="LyncUsers.Text" xml:space="preserve">
|
||||||
|
<value>Lync User</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -186,4 +186,7 @@
|
||||||
<data name="valRequireSubscriberNumber.Text" xml:space="preserve">
|
<data name="valRequireSubscriberNumber.Text" xml:space="preserve">
|
||||||
<value>*</value>
|
<value>*</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
|
<value>Shared Mailbox</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -117,12 +117,9 @@
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="btnSave.OnClientClick" xml:space="preserve">
|
<data name="buttonPanel.OnSaveClientClick" xml:space="preserve">
|
||||||
<value>ShowProgressDialog('Updating mailbox settings...');</value>
|
<value>ShowProgressDialog('Updating mailbox settings...');</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnSave.Text" xml:space="preserve">
|
|
||||||
<value>Save Changes</value>
|
|
||||||
</data>
|
|
||||||
<data name="chkDisable.Text" xml:space="preserve">
|
<data name="chkDisable.Text" xml:space="preserve">
|
||||||
<value>Disable Mailbox</value>
|
<value>Disable Mailbox</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
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