简体   繁体   English

无法识别的属性“defaultAlgorithmSuite”

[英]Unrecognized attribute 'defaultAlgorithmSuite'

I'm receiving an exception once I try to create a web service client instance.我尝试创建 Web 服务客户端实例后收到异常。 The message is "Unrecognized attribute 'defaultAlgorithmSuite'. Note that attribute names are case-sensitive".该消息是“无法识别的属性 'defaultAlgorithmSuite'。请注意,属性名称区分大小写”。 The application is a MVC 5 over .NET Framework 4.5 being debugged in IIS Express from Visual Studio 2015. The same code is working in another application with same properties.该应用程序是基于 .NET Framework 4.5 的 MVC 5,正在从 Visual Studio 2015 在 IIS Express 中调试。相同的代码在具有相同属性的另一个应用程序中工作。 The syntax verification in the Web.config is not recognizing the attributes in the tag security inside a the binding configuration of the service. Web.config 中的语法验证未识别服务绑定配置内的标记安全性中的属性。

<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_MaxValueRecovery" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
          <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000" />
        </binding>
        <binding name="CustomBinding_IMyService">
          <security defaultAlgorithmSuite="Default"
                    authenticationMode="UserNameOverTransport"
                    requireDerivedKeys="true"
                    includeTimestamp="true"
                    messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
                    allowInsecureTransport="true"
                    enableUnsecuredResponse="true">
            <localClientSettings detectReplays="false" />
            <localServiceSettings detectReplays="false" />
          </security>
          <textMessageEncoding messageVersion="Soap12" />
          <httpTransport />
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://.../MyService.svc"
            binding="customBinding" bindingConfiguration="CustomBinding_IMyService"
            contract="MyNamespace.IMyService" name="CustomBinding_IMyService" />
    </client>
</system.serviceModel>

What I'm missing or doing wrong?我错过了什么或做错了什么? Thank you...谢谢...

You accidentally try to configure a custom binding as BasicHttpBinding.您不小心尝试将自定义绑定配置为 BasicHttpBinding。 Move the移动

<binding name="CustomBinding_IMyService"> ... </binding>

block out of <basicHttpBinding> and under a <customBinding> parent:阻止<basicHttpBinding>并在<customBinding>父项下:

<bindings>
    <basicHttpBinding>
        <binding name="BasicHttpBinding_MaxValueRecovery" ...>
        ...
        </binding>
    </basicHttpBinding>
    <customBinding>
        <binding name="CustomBinding_IMyService">
        ...
        </binding>
    </customBinding>
</bindings>

The security options you want to configure are only supported on a custom binding .您要配置的安全选项仅在自定义绑定上受支持

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

相关问题 元素中的属性“版本”<PackageReference> 不被承认 - The attribute "Version" in element <PackageReference> is unrecognized 配置错误:无法识别的属性&#39;maxBufferSize&#39; - Configuration Error : Unrecognized attribute 'maxBufferSize' 无法识别的属性自定义配置(再次) - Unrecognized attribute custom configuration (again) 元素中的“包含”属性<packagereference>无法识别</packagereference> - The attribute "Include" in element <PackageReference> is unrecognized 删除元素的定制配置无法识别的属性 - Custom configuration unrecognized attribute for remove element 加载csproj元素中的属性“ExcludeAssets”<packagereference> 无法识别</packagereference> - Load csproj The attribute “ExcludeAssets” in element <PackageReference> is unrecognized 加载项目时出错:无法识别属性包含 - Error while loading project: Attribute Include is unrecognized WiX和MSBuild:App.Config中无法识别的属性 - WiX & MSBuild : Unrecognized Attribute in App.Config 自定义.config文件中无法识别的属性“xmlns” - Unrecognized attribute 'xmlns' in custom .config file 无法识别的属性“ targetFramework”。 请注意,属性名称区分大小写 - Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM