EndpointDispatcher上的WCF异常AddressFilter不匹配

时间:2014-06-24 06:01:57

标签: wcf wcf-endpoint

在客户端使用服务时会出现以下异常: 带有To' net.tcp:// puv15xgts:55201 / Ois // Patient / PatientHistory / PatientHistoryService.svc'由于EndpointDispatcher上的AddressFilter不匹配,无法在接收器处理。检查发件人和收件人的EndpointAddresses是否一致。

这是web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="ospUri" value="http://PUV15XGTS:55000/OSPServices/ServerSettings.svc"/>
    <add key="IAuthorization" value="http://PUV15XGTS:55000/OSPServices/Authorization.svc"/>
    <add key="ospSystem" value="OSP8"/>
  </appSettings>
  <connectionStrings/>
  <system.serviceModel>

    <extensions>
      <behaviorExtensions>
        <add name="secureOptions" type="VMS.SDF.CustomBehaviorExtensionElement, VMS.SDF"/>
        <add name="faultTransport" type="VMS.SDF.FaultTransfer.FaultTransferExtensionElement, VMS.SDF"/>
      </behaviorExtensions>
    </extensions>
    <bindings>
      <basicHttpBinding>
        <binding>
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="1073741824" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
        </binding>
      </basicHttpBinding>
      <netTcpBinding>
        <binding closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" portSharingEnabled="true" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="67108864" maxBufferSize="67108864" maxReceivedMessageSize="67108864">
          <readerQuotas maxDepth="256" maxStringContentLength="67108864" maxArrayLength="67108864" maxBytesPerRead="67108864" maxNameTableCharCount="67108864"/>
          <security mode="None">
          </security>
        </binding>
      </netTcpBinding>

    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="false"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <dataContractSerializer maxItemsInObjectGraph="65536000"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="SecuredService">
          <secureOptions validateRequest="true" securityLevel="Core" tokenTimeToLive="60"/>
          <faultTransport/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="VMS.WebServices.Ois.Patient.PatientHistoryService.ServiceImplementation.PatientHistoryService">
        <host>
          <baseAddresses>
            <!--            <add baseAddress="http://localhost/" />-->
            <add baseAddress="net.tcp://localhost:55201/"/>
          </baseAddresses>
        </host>
        <endpoint address="" binding="basicHttpBinding" contract="VMS.WebServices.Ois.Patient.PatientHistoryService.ServiceContracts.IPatientHistoryService" behaviorConfiguration="SecuredService">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />-->
        <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
        <endpoint address="" binding="netTcpBinding" bindingConfiguration="" name="NetTcpBindingEndpoint" contract="VMS.WebServices.Ois.Patient.PatientHistoryService.ServiceContracts.IPatientHistoryService" behaviorConfiguration="SecuredService">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
      </service>
    </services>
  </system.serviceModel>
  <system.web>
    <compilation debug="true"/>
  </system.web>
</configuration>

请帮助这里出错。

0 个答案:

没有答案