【发布时间】:2019-01-04 16:12:18
【问题描述】:
我们正在升级我们的产品以使用 TLS 1.2 版本。为此,我们将所有项目从 .net 4.6.2 升级到 .net 4.7.2 版本并构建它。
我在打开频道时看到一个特定于 WCF 服务的问题
(proxy as ICommunicationObject).Open();
我的代码中已经有了这个:
// https://docs.microsoft.com/en-us/dotnet/framework/whats-new/#wcf47
AppContext.SetSwitch("Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols",
false);
AppContext.SetSwitch("Switch.System.Net.DontEnableSchUseStrongCrypto",
false);
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
例外:
由于身份验证失败,无法满足对安全令牌的请求。
调用者未经服务验证。
我使用证书(客户端和服务器)进行身份验证
Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
【问题讨论】: