简体   繁体   English

C# nettcpbinding 禁用 ntlm

[英]C# nettcpbinding disable ntlm

How to disable NTLM when connecting to WCF service?连接到 WCF 服务时如何禁用 NTLM? I want to be sure that Im using Kerberos, but there is no option on ChannelFactory in .netstandard20:我想确定我使用的是 Kerberos,但是 .netstandard20 中的 ChannelFactory 没有选项:

channelFactory.Credentials.Windows.AllowNtlm = false;

So currently Im unable to disable "fallback" to NTLM to check whether Kerberos even working.所以目前我无法禁用对 NTLM 的“回退”以检查 Kerberos 是否正常工作。

This is a deprecated attribute.这是一个已弃用的属性。 Kerberos authentication will be used first as long as the server and client environments support Windows Kerberos authentication. Kerberos验证将首先只要服务器和客户端支持的环境中使用Windows Kerberos身份验证。 If the machine environment on both sides is not supported, whether to downgrade to NTLM certification will be determined by the computer policy.如果双方的机器环境都不支持,是否降级到NTLM认证将由计算机策略决定。
https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.security.windowsclientcredential.allowntlm?view=netframework-4.8 https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.security.windowsclientcredential.allowntlm?view=netframework-4.8
As the description said.正如描述所说。

This property is deprecated and is maintained for backward compatibility only.此属性已弃用,仅出于向后兼容性而维护。 The local machine policy will be used to determine if NTLM should be used.本地计算机策略将用于确定是否应使用 NTLM。

Here are some related links.这里有一些相关的链接。
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-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://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 https://developers.de/blogs/damir_dobric/archive/2009/08/16/enabling-of-ntlm-on-windows-7-and-windows-server-2008-r2.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM