【问题标题】:The client and server cannot communicate, because they do not possess a common algorithm WCF客户端和服务器无法通信,因为它们没有共同的算法 WCF
【发布时间】:2016-04-18 18:48:02
【问题描述】:

我的 ASP.NET 网站和 WCF 服务之间存在通信问题,它们都在同一台机器上。

WCF 服务抛出的错误:

System.ComponentModel.Win32Exception (0x80004005) 客户端和 服务器无法通信,因为它们没有共同的 算法(NativeErrorCode:80090331)

这是在客户端:

public override bool ValidateUser(string username, string password)
{ 

    bool isValid = false; 

    using (DynamicProxy<IExtranetMembershipService> client = new DynamicProxy<IExtranetMembershipService>(false)) 
    { 
        isValid = client.Impl.ValidateUser(applicationName, username, password); 
    } 
    return isValid; 
} 

在服务器端,它会抛出我在上面发布的上面的消息。

【问题讨论】:

  • 您发布一些代码如何让我们了解发生了什么?
  • 请将您的试验和错误发布在minimal reproducible example
  • 这是在客户端: public override bool ValidateUser(string username, string password) { bool isValid = false;使用 (DynamicProxy client = new DynamicProxy(false)) { isValid = client.Impl.ValidateUser(applicationName, username, password); } 返回是有效的;在服务器端,它会抛出上面的消息,我已经在问题中发布了。
  • 请不要在评论中添加类似的有用信息。请将您对问题本身所做的任何尝试添加到问题本身,这样不仅对那些试图回答的人来说更清楚,而且对那些将来遇到这个问题的人来说也是如此。

标签: c# wcf


【解决方案1】:

我终于找到了问题所在。事实证明应该禁用 TLS 1.2 协议,我必须安装 .NET Framework 4.6.1 的最新更新。

【讨论】:

    猜你喜欢
    • 2018-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-15
    • 2016-11-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多