locked
Azure Service Bus 2.1, config changes RRS feed

  • Question

  • I have some code in a config file from an old project:

    <extensions>

          <behaviorExtensions>

            <add name="transportClientEndpointBehavior"

                 type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

          </behaviorExtensions>

          <bindingExtensions>

            <add name="netTcpRelayBinding"

                 type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

          </bindingExtensions>

        </extensions>

    I now have the 2.1 SDK on my machine so my SB dll is v2.1.  I’ve tried running ‘sn –T’ against the assembly but apparently it isn’t strongly signed. Is the public key token the same as in v1.8?

    Also, in 1.8, I used to be able to create my client credential like you see below, but it appears that transportClientEndpointBehavior no longer exists.  What would be the correct way to do the shared key?

    <behaviors>

          <endpointBehaviors>

            <behavior name="serviceBusCredentialBehavior">

              <transportClientEndpointBehavior credentialType="SharedSecret">

                <clientCredentials>

                  <sharedSecret issuerName="[MY ISSUER NAME]"

                                issuerSecret="[MY KEY]”/>

                </clientCredentials>

              </behavior>

          </endpointBehaviors>

        </behaviors>


    STom

    Thursday, August 15, 2013 6:06 PM

Answers

  • Public key token for ServiceBus.dll v2.1 is the same as v1.8.

    My web.config changed to the following with the new SDK. The TransportClientEndpointBehavior class looks different in this version - you don't need the credentialType and there is no property called credentials either.

       <behavior name="ServiceBusCredentials">
         <transportClientEndpointBehavior>
          <tokenProvider>
           <sharedSecret issuerName="[issuer]" issuerSecret="[key]" />
          </tokenProvider>
         </transportClientEndpointBehavior>
       </behavior>

    • Proposed as answer by Zoltan HADADI Tuesday, December 17, 2013 12:37 PM
    • Marked as answer by Ruppert Koch Wednesday, December 18, 2013 10:22 PM
    Wednesday, September 18, 2013 6:28 PM

All replies

  • Public key token for ServiceBus.dll v2.1 is the same as v1.8.

    My web.config changed to the following with the new SDK. The TransportClientEndpointBehavior class looks different in this version - you don't need the credentialType and there is no property called credentials either.

       <behavior name="ServiceBusCredentials">
         <transportClientEndpointBehavior>
          <tokenProvider>
           <sharedSecret issuerName="[issuer]" issuerSecret="[key]" />
          </tokenProvider>
         </transportClientEndpointBehavior>
       </behavior>

    • Proposed as answer by Zoltan HADADI Tuesday, December 17, 2013 12:37 PM
    • Marked as answer by Ruppert Koch Wednesday, December 18, 2013 10:22 PM
    Wednesday, September 18, 2013 6:28 PM
  • Thx, this worked for me in case of Microsoft.ServiceBus, Version=2.2.0.0 as well
    Tuesday, December 17, 2013 12:37 PM