[英]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.