サーバー側で以下のバインディングがあります。
<system.serviceModel>
<bindings>
<customBinding>
<binding name="customBinding1">
<security authenticationMode="UserNameForCertificate" requireDerivedKeys="true" messageProtectionOrder="SignBeforeEncryptAndEncryptSignature" requireSecurityContextCancellation="false" requireSignatureConfirmation="false">
<secureConversationBootstrap />
</security>
<httpTransport />
</binding>
</customBinding>
<wsFederationHttpBinding>
<binding name="FederatedClientProxy" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<security>
<message issuedTokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" negotiateServiceCredential="false">
<issuer address="http://localhost:16041/MySTS/SecurityTokenService" binding="customBinding" bindingConfiguration="customBinding1">
<identity>
<certificateReference x509FindType="FindBySubjectName" findValue="localhost" />
</identity>
</issuer>
</message>
</security>
</binding>
</wsFederationHttpBinding>
およびサービスセクションは次のとおりです
<service name="MyService.Hello">
<endpoint binding="wsFederationHttpBinding"
bindingConfiguration="FederatedClientProxy"
contract="MyService.IHello">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost/MyService.Hello" />
</baseAddresses>
</host>
</service>
上記の構成のサービス参照を追加すると、customBinding1 を含まない app.config の下に生成されます
<bindings>
<wsFederationHttpBinding>
<binding name="WSFederationHttpBinding_IHelloService"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<message algorithmSuite="Default" issuedKeyType="SymmetricKey"
issuedTokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
negotiateServiceCredential="false">
<issuer address="http://localhost:16041/MySTS/SecurityTokenService">
<identity>
<certificate encodedValue="AwAAA" />
</identity>
</issuer>
</message>
</security>
</binding>
</wsFederationHttpBinding>
</bindings>