3

VSエディターはその拡張子を認識していないため、WCF構成ファイルを作成するときにVisualStudioでこのエラーが発生する可能性があります。transportClientEndpointBehaviorを配置する場所を知る必要があります、何か助けはありますか?ありがとう。

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

また、バインディングに含まれていると思われるbasicHttpRelayBindingにも問題があります。

4

3 に答える 3

0

これをプログラムで実行するサンプルがWindowsAzureプラットフォームトレーニングキットにあります。これがサンプルの抜粋です...

// 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();
于 2011-03-01T23:31:03.723 に答える
0

AppFabric SDKをインストールしましたか?ServiceRegistrySettingsまた、である必要がありますserviceRegistrySettings

于 2011-08-04T18:26:31.373 に答える
0

Visual Studio Intellisenseは、組み込みのスキーマを使用して検証を実行します。したがって、transportClientEndpointBehavior動作拡張機能を認識せず、警告を表示します。この警告は無視してください。

答えは、マイクロソフトの公式コースブックである「20487B-ENU-TrainerHandbook.pdf」からです。278ページ

于 2016-05-09T10:03:51.263 に答える