私は、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>
助けてくれてありがとう!それは大歓迎です..