AD Provider logging increase given duplicate account issues
This commit is contained in:
parent
1d2f80f24a
commit
932e77c770
4 changed files with 19 additions and 10 deletions
|
@ -5,12 +5,21 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- Connection strings -->
|
<!-- Connection strings -->
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
|
<!--
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
|
||||||
|
-->
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!-- Encryption util settings -->
|
|
||||||
<add key="WebsitePanel.CryptoKey" value="1234567890" />
|
|
||||||
<!-- A1D4KDHUE83NKHddF -->
|
<!-- A1D4KDHUE83NKHddF -->
|
||||||
|
<!--
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
|
||||||
|
-->
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
|
<!-- A1D4KDHUE83NKHddF -->
|
||||||
|
|
||||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||||
<!-- Web Applications -->
|
<!-- Web Applications -->
|
||||||
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" />
|
<add key="WebsitePanel.EnterpriseServer.WebApplicationsPath" value="~/WebApplications" />
|
||||||
|
|
|
@ -75,10 +75,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
internal static void DebugInfo(string message, params object[] args)
|
internal static void DebugInfo(string message, params object[] args)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
|
||||||
string text = String.Format(message, args);
|
string text = String.Format(message, args);
|
||||||
Log.WriteInfo("{0} {1}", LogPrefix, text);
|
Log.WriteInfo("{0} {1}", LogPrefix, text);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void EndLog(string message, ResultObject res, string errorCode, Exception ex)
|
internal static void EndLog(string message, ResultObject res, string errorCode, Exception ex)
|
||||||
|
|
|
@ -719,13 +719,14 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
private bool DoesSamAccountNameExistInternal(string accountName)
|
private bool DoesSamAccountNameExistInternal(string accountName)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.LogStart("DoesSamAccountNameExistInternal");
|
HostedSolutionLog.LogStart("DoesSamAccountNameExistInternal");
|
||||||
HostedSolutionLog.DebugInfo("userPrincipalName : {0}", accountName);
|
HostedSolutionLog.DebugInfo("sAMAccountName : {0}", accountName);
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
string path = GetRootOU();
|
string path = GetRootOU();
|
||||||
|
HostedSolutionLog.DebugInfo("Search path : {0}", path);
|
||||||
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
DirectorySearcher searcher = new DirectorySearcher(entry);
|
DirectorySearcher searcher = new DirectorySearcher(entry);
|
||||||
|
@ -737,16 +738,17 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
if (resCollection != null)
|
if (resCollection != null)
|
||||||
{
|
{
|
||||||
if (resCollection.Properties["samaccountname"] != null)
|
if (resCollection.Properties["samaccountname"] != null)
|
||||||
bFound = true; ;
|
bFound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
HostedSolutionLog.LogEnd("GetSamAccountNameByUserPrincipalNameInternal");
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
HostedSolutionLog.DebugInfo("Failed : {0}", e.Message);
|
HostedSolutionLog.DebugInfo("Failed : {0}", e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HostedSolutionLog.DebugInfo("DoesSamAccountNameExistInternal Result: {0}", bFound);
|
||||||
|
HostedSolutionLog.LogEnd("DoesSamAccountNameExistInternal");
|
||||||
|
|
||||||
return bFound;
|
return bFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- Display Settings -->
|
<!-- Display Settings -->
|
||||||
<PortalName>WebsitePanel</PortalName>
|
<PortalName>WebsitePanel</PortalName>
|
||||||
<!-- Enterprise Server -->
|
<!-- Enterprise Server -->
|
||||||
<EnterpriseServer>http://localhost:9002</EnterpriseServer>
|
<EnterpriseServer>http://localhost:9005</EnterpriseServer>
|
||||||
<!-- General Settings -->
|
<!-- General Settings -->
|
||||||
<CultureCookieName>UserCulture</CultureCookieName>
|
<CultureCookieName>UserCulture</CultureCookieName>
|
||||||
<ThemeCookieName>UserTheme</ThemeCookieName>
|
<ThemeCookieName>UserTheme</ThemeCookieName>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue