我已经创建了验证使用System.DirectoryServices.AccountManagement对Active Directory凭据的服务。我需要验证对本地域证书以及信任域。在我的电脑上运行时的响应时间验证凭据是快速的本地和受信任域。当我提出这个服务,我们的服务器,本地域响应速度快但是,可信域响应很慢。(20 - 30秒)
I've created a service that validates credentials against Active Directory using System.DirectoryServices.AccountManagement. I need to validate credentials against the local domain as well as a trusted domain. The response time for validating credentials is fast for both the local and trusted domain when run on my computer. When I move this service to our server, the local domain response is fast however, the trusted domain response is very slow (20 - 30 seconds).
我还发现,如果我在PrincipalContext从NetBios名称更改域名的DNS命名为纠正性能问题的服务器上。
I've also found that if I change the domain name in the PrincipalContext from the NetBios name to the DNS name it corrects the the performance problem on the server.
下面是一些例子
PrincipalContext context = new PrincipalContext(ContextType.Domain, sNetBiosName) context.ValidateCredentials(sUsername, sPassword)在服务器上,上面会需要20-30秒,使用NetBIOS名称
On the server, the above will take 20-30 seconds using the NetBios Name
PrincipalContext context = new PrincipalContext(ContextType.Domain, sDNSName) context.ValidateCredentials(sUsername, sPassword)
使用DNS名称的反应是0-2秒
Using the DNS name the response is 0-2 seconds
在哪些地方可以安装在服务器上的任何想法,使用NetBIOS名称加快这?
Any ideas on what needs to be setup on the server to speed this up using the NetBios name?
推荐答案的NetBIOS是在大的网络出了名的慢。 这里解释如何NetBIOS名称解析工作。通常情况下,视窗三解决NETBIOS名称按以下顺序
NetBIOS is notoriously slow in the big network. Here explains how the NetBIOS name resolution works. Normally, Windows tris to resolve the NETBIOS name in the following order.
所以,你可以看到一件事,可以提高NetBIOS名称解析速度是编辑LMHOSTS您的服务器上的文件,这样就可以完全以网络的方程。按照此 Microsoft知识库您的域和PDC添加到您的LMHOSTS文件。
So, you can see one thing that you can improve the NetBIOS name resolution speed is to edit the lmhosts file on your server, so that you can take the network completely out of the equation. Follow this Microsoft KB to add your domain and PDC to your lmhosts file.
更多推荐
PrincipalContext.ValidateCredentials与使用NetBIOS名称受信任域慢
发布评论