Asp 网站适用于 Win7 IE 11 但不适用于 Win10 IE11

Asp site works with Win7 IE 11 but not with Win10 IE11

所以我们有这个旧的 asp 网站(它不会死)。

它目前在 win2k12 上,它是用 spn 和 kerberos 委托设置的。它使用一个 Com+ 对象,该对象 运行 是一个 .vbs,它与活动目录进行大量对话。

我们开始推出我们的 windows 10 实施。

在我们的开发环境中,它适用于 win7/IE11 和 win10/IE11 在我们的生产环境中,win7/IE11 有效(并且仍然有效)但 win10/IE11 无效。

一些错误消息是

Active Directory error '80040e37'
The specified directory service attribute or value does not exist.


Error getting attribute max range
Attribute: [givenName]
Error description: [-2147463153] The attempted action violates the DS schema rules.

通常这些表示网站配置不正确,但它对 win7 上的每个人都运行良好。

所以这会指向 win10 实现。

windows 10 中的什么会导致此问题? (也许是特定错误配置的 gpo?)我很难过。

更新 1-.

GPO 似乎没有问题。不管是win7还是win10都是一样的gpo设置(没有wmi过滤)

因此该站点在 Windows8/ie11 中工作,并且在 win7 上也可在 Chrome 中工作(经过一些调整以启用 kerberos)

我已经设法创建了一个导致问题的小测试页。

Dim oSysInfo 
 dim user
    'on error resume next 
    'Get the Current Users information.  This information is just the currently logged on user
'  Set oSysInfo = Server.CreateObject("ADSystemInfo")
  'Get Current User Object  
    sURL= "LDAP://AUsersDistinguishedName"
    response.write(sURL & "<br />")
on error resume next
    Set user = GetObject(sURL)

    pAttribute = "givenName"
    'response.write(user.get(pAttribute))

     Dim cl, sc, pr, pr2, pAttribute
     Set cl = GetObject(user.Schema)

    'Test(user)
         Set sc = GetObject(cl.Parent)     

       Set pr = sc.GetObject("Property", pAttribute)  

       response.write(pr.MaxRange)

       Set cl = Nothing
       Set sc = Nothing
       Set pr = Nothing 

  '-2147463155: Not found in directory cache, that means the MaxRange property is empty or not set, so there is no error
  if err.number <> 0 and err.number <> -2147463155 then 
     Response.Write "<br>Error description: [" & err.number & "] " & err.Description
  End If        

--- 更新 2.

我将添加有关 IIS 服务器的更多信息。

更新 3: 我已经让 Microsoft 参与了我的 msdn 事件之一。 当我们进行网络监控跟踪时,kerberos 似乎存在问题。

工作 - 开发 windows10 门票:领域:ourRealm,名称:ldap/DomainControllerFQN

工作 - 产品 windows7 门票:领域:ourRealm,名称:ldap/DomainControllerFQN

不工作 - Prod windows10 Ticket: Realm: ourRealm, Sname: 账户名 运行ning 网站。 所有请求都属于 NLMP ( ntlm) 而不是使用 kerberos

至于spn,两个环境是一样的。当我们执行 setspn -l Webserver 时,这是其中的一个子集。

在网络服务器的委派选项卡上,它设置为

"Trust this computer for delegation to any service (Kerberos only)"

这是 IIS 身份验证部分的屏幕截图

-- 更新 4

这是在两种环境下访问网站后的 Klist 信息输出(我之前在工作站上进行了 klist 清除)

Windows 10 - 开发 - 工作

Cached Tickets: (4)

#0> Client: MyUser @ DomainFqn
    Server: krbtgt/DomainFqn @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x60a00000 -> forwardable forwarded renewable pre_authent 
    Start Time: 11/28/2017 10:27:10 (local)
    End Time:   11/28/2017 20:27:10 (local)
    Renew Time: 12/5/2017 10:27:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0x2 -> DELEGATION 
    Kdc Called: DomainControllerFqn

#1> Client: MyUser @ DomainFqn
    Server: krbtgt/DomainFqn @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40e00000 -> forwardable renewable initial pre_authent 
    Start Time: 11/28/2017 10:27:10 (local)
    End Time:   11/28/2017 20:27:10 (local)
    Renew Time: 12/5/2017 10:27:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0x1 -> PRIMARY 
    Kdc Called: DomainControllerFqn

#2> Client: MyUser @ DomainFqn
    Server: cifs/resourceServer @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40a00000 -> forwardable renewable pre_authent 
    Start Time: 11/28/2017 10:27:11 (local)
    End Time:   11/28/2017 20:27:10 (local)
    Renew Time: 12/5/2017 10:27:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0 
    Kdc Called: DomainControllerFqn

#3> Client: admlareaua @ DomainFqn
    Server: HTTP/webserverFQN @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40a40000 -> forwardable renewable pre_authent ok_as_delegate 
    Start Time: 11/28/2017 10:27:10 (local)
    End Time:   11/28/2017 20:27:10 (local)
    Renew Time: 12/5/2017 10:27:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0 
    Kdc Called: DomainControllerFqn

Windows 10 - 产品 - 不工作

#0> Client: MyUser @ DomainFqn
    Server: krbtgt/DomainFqn @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40e00000 -> forwardable renewable initial pre_authent 
    Start Time: 11/28/2017 9:14:10 (local)
    End Time:   11/28/2017 19:14:10 (local)
    Renew Time: 12/5/2017 9:14:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0x1 -> PRIMARY 
    Kdc Called: DomainControllerFqn

#1> Client: admhqlareaua @ DomainFqn
    Server: HTTP/WebServerFQN @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40a40000 -> forwardable renewable pre_authent ok_as_delegate 
    Start Time: 11/28/2017 9:14:10 (local)
    End Time:   11/28/2017 19:14:10 (local)
    Renew Time: 12/5/2017 9:14:10 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96
    Cache Flags: 0 
    Kdc Called: DomainControllerFqn

Windows 7 - 生产-工作

Cached Tickets: (3)

#0> Client: MyUser @ DomainFqn
    Server: krbtgt/DomainFqn @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x60a00000 -> forwardable forwarded renewable pre_authent 
    Start Time: 11/28/2017 9:17:24 (local)
    End Time:   11/28/2017 19:17:24 (local)
    Renew Time: 12/5/2017 9:17:24 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96


#1> Client: MyUser @ DomainFqn
    Server: krbtgt/DomainFqn @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40e00000 -> forwardable renewable initial pre_authent 
    Start Time: 11/28/2017 9:17:24 (local)
    End Time:   11/28/2017 19:17:24 (local)
    Renew Time: 12/5/2017 9:17:24 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96


#2> Client: MyUser @ DomainFqn
    Server: HTTP/WebServerFQN @ DomainFqn
    KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
    Ticket Flags 0x40a40000 -> forwardable renewable pre_authent ok_as_delegate 
    Start Time: 11/28/2017 9:17:24 (local)
    End Time:   11/28/2017 19:17:24 (local)
    Renew Time: 12/5/2017 9:17:24 (local)
    Session Key Type: AES-256-CTS-HMAC-SHA1-96

更新 5 -

所以对于 运行,我创建了一个快速的 mvc 站点并将其作为非工作站点的子站点。

我做了如下控制器。

public JsonResult GetList2()
{
    var st = new List<string>();

    var currSchema = ActiveDirectorySchema.GetCurrentSchema();
    st.Add(currSchema.Name);

    foreach (ActiveDirectorySchemaProperty property in currSchema.FindAllProperties())
    {
        st.Add($"{property.Name} - {property.RangeUpper}");
    }

    return Json(st, JsonRequestBehavior.AllowGet);
}

它似乎工作正常并给了我想要的最大长度值。所以我想我要在这个问题上认输并继续重新编写应用程序的 c#。

更新 - 6(6 个月后)。

原来是 Credential guard 的问题。 (另一个旧应用程序开始出现相同类型的问题)

我们在注册表中关闭了凭据保护,应用程序运行良好。

https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-considerations

(来自link)

Kerberos Considerations

When you enable Windows Defender Credential Guard, you can no longer use Kerberos unconstrained delegation or DES encryption. Unconstrained delegation could allow attackers to extract Kerberos keys from the isolated LSA process. Use constrained or resource-based Kerberos delegation instead

所以我必须调查我猜受限或基于资源的 Kerberos

所以 credential guard 似乎是罪魁祸首。我已经打开了另一个问题来尝试指出那个问题 -