Fix: Unable to create public folders with the same name. "sAMAccountName" didnt
get registered within ExchangeAccounts. Server Component updated to ensure either netbios domain or "samaccountname" is returned. ES Server Component updated to ensure it's stored within the database.
This commit is contained in:
parent
418c11cdf5
commit
6942c229fe
3 changed files with 35 additions and 2 deletions
|
@ -3674,10 +3674,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
name,
|
||||
domain);
|
||||
|
||||
|
||||
ExchangePublicFolder folder = exchange.GetPublicFolderGeneralSettings(parentFolder + "\\" + folderName);
|
||||
|
||||
// add meta-item
|
||||
int accountId = AddAccount(itemId, ExchangeAccountType.PublicFolder, accountName,
|
||||
folderPath, email, mailEnabled,
|
||||
0, "", null, 0 , null);
|
||||
0, folder.NETBIOS+"\\"+accountName, null, 0, null);
|
||||
|
||||
// register email address
|
||||
if(mailEnabled)
|
||||
|
|
|
@ -31,7 +31,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
public class ExchangePublicFolder
|
||||
{
|
||||
string name;
|
||||
string netbios;
|
||||
string displayName;
|
||||
string sAMAccountName;
|
||||
bool hideFromAddressBook;
|
||||
bool mailEnabled;
|
||||
|
||||
|
@ -89,5 +91,19 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
get { return requireSenderAuthentication; }
|
||||
set { requireSenderAuthentication = value; }
|
||||
}
|
||||
|
||||
public string SAMAccountName
|
||||
{
|
||||
get { return this.sAMAccountName; }
|
||||
set { this.sAMAccountName = value; }
|
||||
}
|
||||
|
||||
public string NETBIOS
|
||||
{
|
||||
get { return this.netbios; }
|
||||
set { this.netbios = value; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4321,8 +4321,22 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
info.Name = (string)GetPSObjectProperty(publicFolder, "Name");
|
||||
info.MailEnabled = (bool)GetPSObjectProperty(publicFolder, "MailEnabled");
|
||||
info.HideFromAddressBook = (bool)GetPSObjectProperty(publicFolder, "HiddenFromAddressListsEnabled");
|
||||
|
||||
info.NETBIOS = GetNETBIOSDomainName();
|
||||
info.Accounts = GetPublicFolderAccounts(runSpace, folder);
|
||||
|
||||
if (info.MailEnabled)
|
||||
{
|
||||
Command cmd = new Command("Get-MailPublicFolder");
|
||||
cmd.Parameters.Add("Identity", folder);
|
||||
if (!string.IsNullOrEmpty(PublicFolderServer))
|
||||
cmd.Parameters.Add("Server", PublicFolderServer);
|
||||
result = ExecuteShellCommand(runSpace, cmd);
|
||||
if (result.Count > 0)
|
||||
{
|
||||
publicFolder = result[0];
|
||||
info.SAMAccountName = string.Format("{0}\\{1}", GetNETBIOSDomainName(), (string)GetPSObjectProperty(publicFolder, "Alias"));
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue