【问题标题】:How to create a 'Binding' in asp net core 2.0?如何在 asp net core 2.0 中创建“绑定”?
【发布时间】:2018-04-13 22:45:42
【问题描述】:

我正在尝试创建一个绑定,但每次我这样做时,它都会给我关于

的错误

NotSupportedException:此上下文中不支持绑定安全属性“Mode”的值“TransportWithMessageCredential”。 在 System.ServiceModel.HttpBindingBase.CheckSettings()

这是我的代码:

    Binding CreateBinding()
    {
        var binding = new BasicHttpBinding();
        binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential;
        var elements = binding.CreateBindingElements();
        elements.Find<SecurityBindingElement>().IncludeTimestamp = false;
        return new CustomBinding(elements);
    }

【问题讨论】:

    标签: data-binding asp.net-core


    【解决方案1】:

    【讨论】:

    • 与 Asp Net Core 2.0 完全不兼容
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-31
    • 1970-01-01
    • 1970-01-01
    • 2016-07-13
    • 2018-09-29
    • 2020-05-04
    • 1970-01-01
    相关资源
    最近更新 更多