0

WSE3 サービスを WCF プラットフォームに移行しています。クライアントは従来の WSE3 クライアントになります。

いくつかの要件を満たすために、カスタム サービス動作を作成しました。web.configサービス動作の構成 ( ) には、serviceCertificate要素が含まれています。

この動作は、behaviorConfiguration設定を使用して私のサービスに適用されます。ここで、同じ IIS 7.5 でホストされている別の WCF サービスから 1 つの WCF サービスを呼び出したいと考えています。だから私はnetTcpBinding(そしてnetNamedPipeBindingも)追加しました。WCF サービスから別のサービスの OperationContract を呼び出すと、以前はAccess is denied.エラーが発生していました。behaviorConfigurationサービスの設定を削除すると、 netTcpBinding(および netNamedPipeBinding) が機能しました。

構成は以下のとおりです。

<services>
          <service name="Services.AuthorizationService" behaviorConfiguration="LegacyBehavior">
            <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" >
            <endpoint
              name="AuthorizationService"
              address=""
              binding="wsHttpBinding"               contract="ServiceContracts.IAuthorizationService" />
            <endpoint address="net.pipe://localhost/TestSite/AuthorizationService.svc"
                   binding="netNamedPipeBinding"                   contract="ServiceContracts.IAuthorizationService"
                   name="AuthorizationNamedPipeEndpoint"/>  


web.config のサービス動作構成は次のとおりです。

<behavior name="LegacyBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
          <serviceAuthorization
            principalPermissionMode="Custom"
            serviceAuthorizationManagerType="Legacy.AuthorizationManager,Legacy.Services" >
          <serviceDebug
            httpHelpPageEnabled="true"
            includeExceptionDetailInFaults="true" />
          <serviceMetadata httpGetEnabled="true" />
          <serviceCredentials>
            <serviceCertificate
              findValue="CN=WSE2QuickStartServer"
              storeLocation="LocalMachine"
              storeName="My"
              x509FindType="FindBySubjectDistinguishedName" />
            <issuedTokenAuthentication
              audienceUriMode="Always"
              certificateValidationMode="PeerOrChainTrust"
              revocationMode="NoCheck"
              trustedStoreLocation="LocalMachine"
              samlSerializerType="Legacy.TokenSerializer, Legacy.Services"
              allowUntrustedRsaIssuers="false">
              <allowedAudienceUris>
                <add allowedAudienceUri="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue/SAML" />
              </allowedAudienceUris>
            </issuedTokenAuthentication>
          </serviceCredentials>
        </behavior>

のバインディング構成netTcpBindingは次のとおりです。

私は知りたいです、

  1. このようなシナリオで netTcpBinding を使用するにはどうすればよいですか?
  2. 同じサービスに対して 2 つの異なる動作を使用できますか? はいの場合、どのように?
  3. いいえの場合、このシナリオで名前付きパイプのバインドを実現するにはどうすればよいですか?
  4. サーバー証明書関連のものでAccess is deniedエラーが発生するのはなぜですか? 内部例外はありません。ただAccedd拒否メッセージ!
4

0 に答える 0