0

私は、WCF クライアントを使用して単純な WCF でサポートされた Windows サービスと通信する単純な ASP.NET Web アプリを持っています。

ローカル環境ではすべて正常に機能しました。dev にデプロイしましたが、これも正常に機能しました。ただし、DEV では、Web サーバーとアプリ サーバーは同じマシン上にあります。

QA にデプロイしたので、「ソケット接続が中止されました。'例外がすぐにスローされます。何らかの理由で、QA Web サーバーが WCF クライアント/サービスを介して QA アプリ サーバーと通信できません。Web サーバーから QA アプリ サーバーに ping できる Web サーバーから QA アプリ サーバーに telnet できる Web サーバーから QA アプリ サーバーの HTTP WSDL に接続できる

そして、ローカル環境/ビジュアル スタジオから FINE を QA サービスに接続できます !!!

QA ASP.NET アプリが QA WCF Windows サービスと通信できないのはなぜですか? 私は可能な限りあらゆる方法を試しましたが、それでもうまくいきません...

クライアントの System.ServiceModel セクションは次のとおりです。

<system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="BigFileBinding">
          <!-- required to receive files greater then default size of 16kb -->
          <readerQuotas maxArrayLength="5242880"/>
        </binding>
      </netTcpBinding>
    </bindings>
    <client>
      <endpoint address="net.tcp://NJQACNET01:58887/PriceService"
          binding="netTcpBinding"
          contract="IPriceService"
          bindingConfiguration="BigFileBinding"/>
      </endpoint>
    </client>
  </system.serviceModel>

サービスの system.servicemodel セクションは次のとおりです。

<system.serviceModel>
    <bindings>
      <netTcpBinding>
        <!-- required to receive files greater then default size of 16kb -->
        <binding name="BigFileBinding"
                 maxReceivedMessageSize="5242880">
          <readerQuotas maxArrayLength="5242880"/>
        </binding>
      </netTcpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="MetaDataBehavior" name="RK.Pricing.PricingPortal.MarketableSecuritiesService.PriceService">
        <endpoint address="net.tcp://localhost:58887/PriceService" binding="netTcpBinding"
          contract="RK.Pricing.PricingPortal.MarketableSecuritiesService.IPriceService" bindingConfiguration="BigFileBinding"   />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"  />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:58889/PriceService" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MetaDataBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

助けてくれてありがとう!それは大歓迎です..

4

2 に答える 2

1

これはおそらくファイアウォールの問題です。使用しているポートが ASP.Net QA サーバーと WCF QA サーバーの間でブロックされています。

これは、telnet コマンドを使用してテストできます。

于 2009-11-13T18:18:45.373 に答える
1

これはおそらくセキュリティ上の問題だと思います。デフォルトでは、NetTcpBinding は Windows 認証を使用することに注意してください。

可能であれば、ここで公開されているガイドラインを確認して従う必要があります。

于 2009-11-13T18:21:41.300 に答える