多个net.tcp调用WCF服务

时间:2017-10-10 07:42:29

标签: c# wcf web-config net.tcp

我有问题,我的客户端通过Net.Tcp调用Wcf服务。 在几乎200次调用之后的一个周期中,服务保持锁定大约10分钟,并阻止使用net.tcp协议的任何其他客户端。

我有其他客户通过Https调用wcf服务,这些服务器继续正常运行。

可能出现什么样的错误配置?

谢谢!

这是我的web.config

<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="AttoCreditoConnection" connectionString="MyConnectionstring" />
  </connectionStrings>


  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="LargeList" name="AttoCredito.AttoCreditoBiz.AttoCreditoWcf">
        <endpoint address="tcp" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
         name="AttoCreditoNetTcp" contract="AttoCredito.AttoCreditoBiz.IAttoCreditoWcf" />
        <endpoint binding="wsHttpBinding" bindingConfiguration="TransportSecurityBinding"
         name="AttoCreditoWcfHttp" contract="AttoCredito.AttoCreditoBiz.IAttoCreditoWcf" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:808" />
            <add baseAddress="https://localhost:443" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IAttoLegacyWcf" closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxBufferSize="10000000" maxReceivedMessageSize="10000000"
          textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
          messageEncoding="Text">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="10000000"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
      <netTcpBinding>
        <binding name="TransportNetTcpBinding" closeTimeout="00:30:00"
          openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
          transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
          hostNameComparisonMode="StrongWildcard" listenBacklog="50" maxBufferPoolSize="524288"
          maxBufferSize="10000000" maxConnections="50" maxReceivedMessageSize="10000000">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="10000000"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:30:00"
            enabled="false" />
          <security mode="None">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="DocumentaleNetTcp">
          <security mode="None" />
        </binding>
      </netTcpBinding>
      <wsHttpBinding>
        <binding name="TransportSecurityBinding" closeTimeout="00:30:00"
          openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="10000000"
          messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
          allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="10000000"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:30:00"
            enabled="false" />
          <security mode="Transport">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" negotiateServiceCredential="false"
              establishSecurityContext="false" />
          </security>
        </binding>
        <binding name="DocumentaleHttp">
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost/AttoLegacy/AttoLegacyWcf.svc"
        behaviorConfiguration="LargeList" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_IAttoLegacyWcf" contract="AttoLegacyHost.IAttoLegacyWcf"
        name="BasicHttpBinding_IAttoLegacyWcf" />
      <endpoint address="net.tcp://localhost/AnagraficaBiz/AnagraficaSrv.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="AnagraficaHost.IAnagraficaSrv" name="AnagraficaNetTcp" />
      <endpoint address="net.tcp://localhost/AttoBiz/AttoExtraction.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="AttoHost.IAttoExtraction" name="AttoNetTcp" />
      <endpoint address="net.tcp://localhost/ContoCorrenteBiz/ContoCorrenteSrv.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="CcHost.IContoCorrenteSrv" name="ContoCorrenteNetTcp" />
      <endpoint address="net.tcp://localhost/ContrattoBiz/ContrattoWcf.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="ContrattoHost.IContrattoWcf" name="ContrattoNetTcp" />
      <endpoint address="net.tcp://localhost/MembershipBiz/Membership.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="MembershipHost.IMembership" name="MembershipNetTcp" />
      <endpoint address="net.tcp://localhost/ToponomasticaBiz/Toponomastica.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="TopoHost.IToponomastica" name="ToponomasticaNetTcp" />
      <endpoint address="net.tcp://localhost/CreditoBiz/CreditoWcf.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="CreditoHost.ICreditoWcf" name="CreditoNetTcp" />
      <endpoint address="net.tcp://localhost/EnteDebitoreBiz/EnteDebitoreWcf.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="EnteDebitoreHost.IEnteDebitoreWcf" name="EnteDebitoreNetTcp" />
      <endpoint address="net.tcp://localhost/AciBiz/AciBiz.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="AciHost.IAciBiz" name="AciBizNetTcp" />
      <endpoint address="net.tcp://localhost/DocumentaleBiz/DocumentaleWcf.svc/tcp"
        behaviorConfiguration="LargeList" binding="netTcpBinding" bindingConfiguration="TransportNetTcpBinding"
        contract="DocumentaleHost.IDocumentaleWcf" name="DocumentaleNetTcp" />
    </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="LargeList">
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="LargeList">
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

0 个答案:

没有答案