当我尝试使用以下配置配置扩展时,我收到了在WCF跟踪中记录的警告:
<bindingElementExtensions>
<add name="noeMaxCompression" type="Noemax.WCFX.Configuration.CompressionElement, Noemax.WCFX, Version=15.78.5133.0, Culture=neutral, PublicKeyToken=4c0defa954f97f18" />
</bindingElementExtensions>
<bindingExtensions>
<add name="noeMaxExtensionBinding" type="Noemax.WCFX.Configuration.ExtensionBindingCollectionElement, Noemax.WCFX, Version=15.78.5133.0, Culture=neutral, PublicKeyToken=4c0defa954f97f18" />
</bindingExtensions>
然后通过扩展自定义配置的netTcp绑定来使用它(如果是为了简洁):
<bindings>
<noeMaxExtensionBinding>
<binding name="noemaxBinding" sourceBinding="netTcpBinding" sourceBindingConfiguration="NetTcpBinding_DefaultConfiguration" >
<noeMaxCompression compressionLevel="3"/>
</binding>
</noeMaxExtensionBinding>
<netTcpBinding>
<binding
name="NetTcpBinding_DefaultConfiguration"
maxReceivedMessageSize="2147483647"
portSharingEnabled="false"
>
</binding>
</netTcpBinding>
</bindings>
以下是记录的警告:
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning">
<TraceIdentifier>http://msdn.microsoft.com/en-AU/library/System.ServiceModel.ExtensionCollectionNameNotFound.aspx</TraceIdentifier>
<Description>Extension element not associated with an extension collection.</Description>
<AppDomain>ServicesHost.Console.vshost.exe</AppDomain>
<Source>Noemax.WCFX.Configuration.CompressionElement/1</Source>
</TraceRecord>
有人知道扩展集合引用的内容/如何解决此警告吗?