Asp.Net 登录控制与非受信 AD 域的初始连接速度非常慢 [英] Asp.Net Login Control very slow initial connection to Non-Trusted AD Domain

查看:14
本文介绍了Asp.Net 登录控制与非受信 AD 域的初始连接速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ASP.NET 登录控件在验证到与 Web 服务器所属域不同的域时,初始连接到 AD 的速度非常慢.IIS 服务器以及与 Visual Studio 的内置 Web 服务器一起使用时出现问题.

ASP.NET Login control is very slow making the initial connection to AD when authenticating to a different domain than the domain the web server is a member of. Problem occurs for the IIS server and when using with the Visual Studio's built in web server.

第一次尝试使用控件连接另一个域时大约需要 30 秒.Web 服务器的域和其他域(尝试连接到几个不同的域)之间没有信任关系.后续连接会快速执行,直到连接超时.

It takes about 30 seconds the first time when attempting to use the control to connect against another domain. There is no trust relationship bewteen the web server's domain and the other domains (attempted connecting to several different domains). Subsequent connections execute quickly until the connection times out.

使用Systernals Process Monitor进行故障排除,在延迟到C:WINDOWSasemblyGAC_MSILSystem.DirectoryServices2.0.0.0_b03f5f7f11d50a3aNetapi32.dll with a result NAME NOT FOUND"之前有两个OpenQuery操作在 30 秒延迟后,TCP 发送和 TCP 接收表明与 AD 服务器开始通信.

Using Systernals Process Monitor to troubleshoot, there are two OpenQuery operations right before the delay to "C:WINDOWSasemblyGAC_MSILSystem.DirectoryServices2.0.0.0_b03f5f7f11d50a3aNetapi32.dll with a result NAME NOT FOUND" and right after the 30 second delay the TCP Send and TCP Recieves indicate communication begins with the AD server.

我们尝试过的事情:

  • 在 web.config 中模拟 Web 服务器上的管理员;
  • 向 NetworkService 和 ASPNET 授予对 CryptoKeys 的权限;
  • 通过 IP 而不是 DNS 名称指定;
  • 使用域和 OU 指定名称和 ldap 服务器的多种变体;
  • 本地主机条目;
  • 使用 netstat -an 查找被阻止 (SYN_SENT) 的端口.
  • Nslookup 正确解析所有涉及的域和系统.
  • TraceRt 显示正确的路线

非常感谢任何想法或提示.

Any Idea or hints are greately appreicated.

推荐答案

我们最终修复了它

connectionProtection="无"

connectionProtection="None"

关闭所有连接到安全端口的 attmepts 并且只使用 389.

To turn off all attmepts to connetc on the secure port and only use 389.

在 connetionProtection 更改后,我们还必须指定 Connection 用户名,例如ad/bob",而不仅仅是bob".

We also had to specify the Connection username like "ad/bob" instead of just "bob" after the connetionProtection change.

谢谢,

埃里克-

这篇关于Asp.Net 登录控制与非受信 AD 域的初始连接速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆