【问题标题】:Windows authentication fails and needs to be resetWindows 身份验证失败,需要重置
【发布时间】:2020-07-10 13:21:10
【问题描述】:

我有一个启用了 Windows 身份验证的现有 IIS Web 应用程序。当我运行此命令来设置绑定时,Windows 身份验证失败,我必须手动禁用并重新启用 Windows 身份验证才能使其工作。

import-module WebAdministration
Set-ItemProperty "IIS:\Sites\Test\My" -name bindings -value (@{protocol="https";bindingInformation="*:443:my.test.com";sslFlags=1},@{protocol="net.tcp";bindingInformation="808:my.test.com"})

我曾尝试使用 powershell 设置 windows 身份验证,但没有效果。

Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/WindowsAuthentication -name enabled -value true -PSPath "IIS:\Sites\TestMy"

有什么建议吗?

【问题讨论】:

    标签: powershell iis windows-authentication


    【解决方案1】:

    问题的原因可能是我们尚未将证书绑定到特定端口。
    指定 Https 绑定后,请将证书绑定到该端口。

    Netsh http 添加 sslcert ipport=1.1.1.1:443 证书哈希=0102030405060708090A0B0C0D0E0F1011121314 appid={00112233-4455-6677-8899-AABBCCDDEEFF}

    https://docs.microsoft.com/en-us/windows/win32/http/add-sslcert
    这通常由 IIS 完成。如果没有此过程,网站可能无法通过 https 绑定正常工作。您可以尝试在网站上设置 HTTP 绑定以排除这一点。
    如果问题仍然存在,请随时告诉我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多