System.DirectoryServices is slow?

后端 未结 2 1422
孤独总比滥情好
孤独总比滥情好 2021-01-13 15:28

I\'m using the code below to look up information in active directory when a user logs on to a website. Running against a local domain it\'s very quick, but running over a VP

2条回答
  •  遥遥无期
    2021-01-13 15:58

    I have never tried the scenario you are describing (connecting over VPN to Active Directory) but the line you marked is the line that causes the connection to be opened. You are not connected to the server before calling FindOne. My guess is that establishing the connection lasts 7-8 secs.

    If you cannot find exact answer on stackoverflow try this forum: http://directoryprogramming.net/forums/default.aspx (I'm not saying that stackoverflow is not helpful, but I found some answers to my ad/ldap questions on DirectoryProgramming.net forum).

提交回复
热议问题