Server Error in '/' Application. The LDAP server is unavailable.

Jun 24, 2013 at 3:06 PM
When I do Ctrl+F5, I get:

The LDAP server is unavailable.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.

Source Error:



Line 8: public static PrincipalContext Get(DirectorySetting settings)
Line 9: {
Line 10: return new PrincipalContext(ContextType.Domain,
Line 11: settings.Directory,
Line 12: settings.Container,


Source File: C:\Users\slpsadmin18\Desktop\umanage-69709\branches\2012\UMS.Core.Directory\DirectoryContext.cs Line: 10

Stack Trace:



[LdapException: The LDAP server is unavailable.]
System.DirectoryServices.Protocols.LdapConnection.Connect() +85086
System.DirectoryServices.Protocols.LdapConnection.SendRequestHelper(DirectoryRequest request, Int32& messageID) +225
System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout) +92
System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request) +17
System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties) +384

[PrincipalServerDownException: The server could not be contacted.]
System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig(String serverName, ServerProperties& properties) +472
System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval() +65
System.DirectoryServices.AccountManagement.PrincipalContext..ctor(ContextType contextType, String name, String container, ContextOptions options, String userName, String password) +292
UMS.Core.Directory.DirectoryContext.Get(DirectorySetting settings) in C:\Users\slpsadmin18\Desktop\umanage-69709\branches\2012\UMS.Core.Directory\DirectoryContext.cs:10
UMS.Core.Directory.UserRepository.Find(String name) in C:\Users\slpsadmin18\Desktop\umanage-69709\branches\2012\UMS.Core.Directory\UserRepository.cs:41
UMS.Core.Logic.Directory.Users.GetUser() in C:\Users\slpsadmin18\Desktop\umanage-69709\branches\2012\UMS.Core.Logic\Directory\Users.cs:21
UMS.Web.MvcApplication.Session_Start() in C:\Users\slpsadmin18\Desktop\umanage-69709\branches\2012\UMS.Web\Global.asax.cs:32

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +57
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +9028403
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +148
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +561
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

please advise
Mar 2, 2016 at 10:21 PM
I get the same error

Any help?