By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Why is LdapConnection.Bind() slow on a server?

P: n/a
Hi,

I'm using a custom class to connect and manipulate an active directory
server using the System.DirectoryServices.Protocols namespace. My
application is an ASP.NET v2.0 application.

When running on my local development machine (Windows XP Pro, logged
in to our corporate domain) the ldapconnection.bind() is very quick -
it takes only a fraction of a second to bind to the server.

However when deployed to a server (also attached to the corporate
domain), it takes around 13 seconds to bind to the server. Adding some
tracing in reveals that it always takes around 13.1 or 13.2 seconds,
as opposed to the 0.1 or 0.2 it takes from my local machine.

A colleague suggested I tried adding impersonation to the application.
I had a go at this, and made the application impersonate a domain
user. With this in place, the binding times from the server dropped to
the same as my development machine - 0.1 or 0.2 seconds.

My question is- what's going on here? Why is it taking 13 seconds
longer to bind to the ldap server from a server than my development
machine? And why is it fixed by impersonation?

We have a few applications that use this custom class- adding
impersonation is not really my preferred way of solving this problem.
Has anyone got any ideas?

Much appreciated.
Nov 19 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.