我有一个简单的 ASP.NET Web 应用程序,它使用 WCF 客户端与一个简单的 WCF 支持的 Windows 服务通信。
在本地环境中一切正常。我们部署到 dev,它也工作得很好。但是在 DEV 上 - Web 服务器和 App 服务器在同一台机器上。
现在我们已经部署到 QA,我们得到“套接字连接已中止。' 立即抛出异常。出于某种原因,我们的 QA Web 服务器无法通过我们的 WCF 客户端/服务与我们的 QA 应用服务器通信。我可以从 Web 服务器 ping QA 应用程序服务器 我可以从 Web 服务器远程登录 QA 应用程序服务器 我可以从 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>
非常感谢您的帮助!非常感谢..