3

I might get this error in Visual Studio when creating the WCF config file, since the VS editor doesn't know about that extension. I need to know where to place transportClientEndpointBehavior, any help ? thanks.

 <behaviors>
  <endpointBehaviors>
    <behavior name="sharedSecretClientCredentials">
      <transportClientEndpointBehavior credentialType="SharedSecret">
        <clientCredentials>
          <sharedSecret issuerName="***********" issuerSecret="**********" />
        </clientCredentials>
      </transportClientEndpointBehavior>
      <ServiceRegistrySettings discoveryMode="Public"/>
    </behavior>
  </endpointBehaviors>
  ...
</behaviors>

I also have a problem with basicHttpRelayBinding which i suppose to be included under bindings.

404Dreamer_ML
  • 890
  • 3
  • 14
  • 25

3 Answers3

0

Visual Studio Intellisense uses built-in schemas to perform validations. Therefore, it will not recognize the transportClientEndpointBehavior behavior extension, and will display a warning. Disregard this warning.

The answer is from "20487B-ENU-TrainerHandbook.pdf" which is Microsoft official course book. Page 278

ssinotna
  • 13
  • 3
  • You can't ignore this. I'm having the same issue and the service won't start due to this. Because this is an element of the behavior, the behavior itself is invalid. So, the endpoint using the behavior is in turn invalid due to an enumeration constraint. – Jeff Reddy May 19 '16 at 12:59
  • My answer was from "20487B-ENU-TrainerHandbook.pdf" which is Microsoft official course book. Page 278 – ssinotna Jun 01 '16 at 15:36
0

There is a sample in the Windows Azure Platform Training Kit that does this programmaticly. Here is the sample snippit...

// create the service URI based on the service namespace
        Uri address = ServiceBusEnvironment.CreateServiceUri("sb",
                      serviceNamespaceDomain, "EchoService");

        // create the credential object for the endpoint
        TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior();
        sharedSecretServiceBusCredential.CredentialType = TransportClientCredentialType.SharedSecret;
        sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerName = issuerName;
        sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerSecret = issuerSecret;

        // create the service host reading the configuration
        ServiceHost host = new ServiceHost(typeof(EchoService), address);

        // create the ServiceRegistrySettings behavior for the endpoint
        IEndpointBehavior serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public);

        // add the Service Bus credentials to all endpoints specified in configuration
        foreach (ServiceEndpoint endpoint in host.Description.Endpoints)
        {
            endpoint.Behaviors.Add(sharedSecretServiceBusCredential);
        }

        // open the service
        host.Open();
joelf
  • 126
  • 3
0

Have you installed the AppFabric SDK? ServiceRegistrySettings should also be serviceRegistrySettings.

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173