2

ロード バランサーとファイアウォールの背後にある 2 つのアプリケーション サーバー上の IIS にデプロイされた WCF サービスに接続する Web サイトがあります。HTTP エンドポイントを使用すると、Web サイトは WCF サービスに正常に接続できます。ただし、TCP プロトコルに切り替えると、次のエラーが表示されます。

より多くのデータが予期されていましたが、EOF に達しました。

[InvalidDataException: より多くのデータが予期されていましたが、EOF に達しました。]

[ProtocolException: ストリームの位置 0 でメッセージ フレーミング フォーマットを読み取り中にエラーが発生しました (状態: ReadingUpgradeRecord)]

[ProtocolException: net.tcp:///SecurityService.svc のサーバーがセッション確立要求を拒否しました。]

Web サイト アプリケーション プールはローカル ユーザー アカウントで実行されていますが、WCF サービスは既定の ApplicationPoolIdentity で実行されています。サービス エンドでトレース ログが生成されません。クライアント側でトレース ログが生成され、同じエラーが発生します。

WCF サービスは、アプリケーション サーバーの既定のポート 808 でホストされていますが、他のアプリケーション/サービスによって共有されていません。環境: Win2k8、IIS 7.5

Web サーバーからアプリケーション サーバーへの TCP 接続を確認しましたが、問題ありません。

私の側から他の情報が必要な場合はお知らせください。私はこれに多くの時間を費やしてきたので、どんなガイダンスにも本当に感謝しています.

構成ファイルのスニペットは次のとおりです。

WCF サービス

<bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_Configuration" closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
          hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
          maxBufferSize="2147483647" maxConnections="100" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
            enabled="false" />
          <security mode="None"/>
        </binding>
      </netTcpBinding>
    </bindings>
<services>
      <service name="<namespace>.ServiceImplementation.Security">
        <endpoint address="net.tcp://<servername>/SecurityService.svc"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Configuration"
          contract="<namespace>.ServiceInterface.ServiceContracts.ISecurity" name="NetTcpBinding_Security">
          <identity>
            <servicePrincipalName value="host/<servername>" />
          </identity>
        </endpoint>
      </service>
    </services>

ウェブサイト クライアント

<bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_Configuration" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
      <netTcpBinding>
        <binding name="NetTcpBinding_Configuration" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
          <security mode="None" />
        </binding>
      </netTcpBinding>
    </bindings>
<client>
      <endpoint address="http://<servername>/SecurityService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Configuration" contract="SecurityService.Security" name="BasicHttpBinding_Security" />
      <endpoint address="net.tcp://<servername>/SecurityService.svc" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Configuration" contract="SecurityService.Security" name="NetTcpBinding_Security">
        <identity>
          <servicePrincipalName value="host/<servername>" />
        </identity>
      </endpoint>
    </client>
4

1 に答える 1

1

私があなたなら、クライアントからサーバーへのトラフィックをWiresharkします。途中でトラフィックがブロックされないようにする必要があります。これが当てはまらないことを確認できる場合は、WCF サービス構成の問題である必要があります。

WCF 構成のデバッグを試みる前に、(可能であれば) ロード バランサーを削除して、WCF サービスに直接アクセスしてみてください。ほとんどのロード バランサーはデフォルトで HTTP をサポートします。ただし、他のプロトコルには特別な構成が必要です。

于 2013-02-14T23:09:34.910 に答える