0

I have below bindings at server side.

 <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>

and Service section as follows

<service name="MyService.Hello">
        <endpoint binding="wsFederationHttpBinding"
                 bindingConfiguration="FederatedClientProxy"
                 contract="MyService.IHello">
        </endpoint>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost/MyService.Hello" />
          </baseAddresses>
        </host>
</service>

when I add the service reference for above configuration it generates below app.config which doesn't include the customBinding1

<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>

1 Answer 1

0

It is not generated because no endpoint in your service is using the binding.

Btw. your custom binding will also need some message encoding element - most probably textMessageEncoding with messageVersion set to appropriate SOAP version for your scenario.

1
  • Its used by FederatedClientProxy's issuer binding. Previously the code is not visible since its not properly formatted. Apr 19, 2012 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.