title: ldap connection timing out
body: <p>I have an asp.net version 4 application which is using windows authentication for security this works fine on a machine running iis 6 windows server 2003, but when migrating to iis 7 windows server 2008 r2 standard I get the following error: </p>
  
  <blockquote>
    <p>System.DirectoryServices.Protocols.LdapConnection.ConstructResponse(Int32
    messageId, LdapOperation operation,
    ResultAll resultType, TimeSpan
    requestTimeOut, Boolean
    exceptionOnTimeOut)</p>
  </blockquote>
  
  <p>iis authentication is enabled for both windows and asp.net impersonation, with the others being disabled (I have tried various combinations with no success).  This is running in its own .net 4 app pool and I have tried both integrated and classic managed pipeline modes.  From the event log I can see this code is causing the time out problem:</p>
  
  <pre><code>var searchResponse = (SearchResponse)connection.SendRequest(searchRequest); 
  </code></pre>
  
  <p>Am I missing a trick here?</p>