c# - C# nettcpbinding 禁用 ntlm
问题描述
连接到 WCF 服务时如何禁用 NTLM?我想确定我使用的是 Kerberos,但是 .netstandard20 中的 ChannelFactory 没有选项:
channelFactory.Credentials.Windows.AllowNtlm = false;
所以目前我无法禁用“回退”到 NTLM 以检查 Kerberos 是否正常工作。
解决方案
这是一个已弃用的属性。Kerberos
只要服务器和客户端环境支持身份验证,就会首先使用Windows Kerberos
身份验证。如果双方的机器环境都不支持,是否降级NTLM
认证将由电脑策略决定。
https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.security.windowsclientcredential.allowntlm?view=netframework-4.8
正如描述所说。
此属性已弃用,仅为了向后兼容而维护。本地计算机策略将用于确定是否应使用 NTLM。
以下是一些相关链接。
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-security-restrict-ntlm-ntlm-authentication-in-this-domain
https://docs .microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-security-allow-local-system-to-use-computer-identity-for-ntlm
https://developers。 de/blogs/damir_dobric/archive/2009/08/16/enabling-of-ntlm-on-windows-7-and-windows-server-2008-r2.aspx
推荐阅读
- android - 如何绘制复杂的 UI 滚动?
- r - 使用分段包 R 计算分段分位数线性回归
- scala - 表示隐式转换的类型是什么意思
- javascript - 如何将变量从我的控制器传递给 HTML,然后传递给 JS 函数?
- qt - 如何使 *.gif 中的动画在 Qt 中只运行一次?
- python - CNN 未使用功能 API 训练 TF 2.0
- pandas - 用熊猫中同一数据框中的其他列替换缺失值
- c - 使用信号量在生产者和消费者之间实现同步的问题
- sql-server - T-SQL IF 问题
- ios - Prism 为 Xamarin.Forms 开发的 iOS 上未显示汉堡包图标