0

私はこれに対して2日間頭を打ち、何も役に立たないようにするためにいくつかのことを試みました。私はこのシステムをローカルマシン上でデバッグの目的で動作させようとしています。ここの誰かが、私が目が見えなくなったことを見ることができるか、何らかのアドバイスを提供してくれることを願っています。WCF - エンドポイントが見つかりません例外

私は2つのwcfサービスを提供しています(実際は4つですが、後で詳しく説明します)。 1つはIIS上で実行されるSOAP Webサービスです。 Webサービスが他のサービス(エージェント)に電話をかけようとしています。本番環境では、2つのサービスの間にファイアウォールが2つあります。彼らは接続するために証明書セキュリティとnet.tcpプロトコルを使用します。

私たちは、開発およびqaの目的で自己署名入りの証明書を使用します。

私はクライアントとサービス証明書をインストールしており、証明書へのアプリケーションプールの読み取りアクセスを許可しています。

Net.Tcpポート共有サービス、Net.Tcpリスナーアダプタ、Net.Pipeリスナーアダプタがすべて実行されていることを確認しました。

net.tcp protocalが有効で、net.tcpバインディングがIISで定義されています。

ファイアウォールがオフです。

両方のサービスは、ローカル管理マシンではなくqaサーバー上で実行されているWCFサービスであるID管理サービス(IMS)に接続します。 WebサービスはIMSサービスに正常に接続できます。私はエージェントサービスに接続するために同じバインディングを使用しようとしています。私がアドレスを知ることができる限り、バインディングと契約はすべてWebサービスとエージェントの間で一致していますが、まだEndPointNotFoundExceptionを取得します。私は何を逃したのですか?ここで

は、Webサービスのweb.configからsystem.serviceModelセクションである:ここで

<system.serviceModel> 
<client> 
    <endpoint address="net.tcp://localhost:8102/Acord/201307" behaviorConfiguration="NetTcpCertificatesBehavior" binding="netTcpBinding" bindingConfiguration="NetTcpCertificatesBinding" contract="AcordContract.IAcordService201307" name="AcordCertificateEndpoint"> 
    <identity> 
     <certificateReference findValue="(value redacted)" isChainIncluded="false" storeLocation="LocalMachine" x509FindType="FindByThumbprint" /> 
     <dns value="localhost" /> 
    </identity> 
    </endpoint> 
</client> 
<behaviors> 
    <endpointBehaviors> 
    <behavior name="NetTcpCertificatesBehavior"> 
     <clientCredentials> 
     <clientCertificate findValue="(value redacted)" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" /> 
     <serviceCertificate> 
      <authentication certificateValidationMode="None" /> 
     </serviceCertificate> 
     </clientCredentials> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 
<bindings> 
    <netTcpBinding> 
    <binding name="NetTcpCertificatesBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> 
     <security> 
     <transport clientCredentialType="Certificate" protectionLevel="EncryptAndSign" /> 
     </security> 
    </binding> 
    <binding name="NetTcpMessageCertificatesBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
      transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="100" 
      maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="100" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> 
     <security mode="Message"> 
     <message clientCredentialType="Certificate" /> 
     </security> 
    </binding> 
    <binding name="NetTcpWindowsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:10:00" 
      transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" 
      listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="32" maxStringContentLength="65535" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> 
     <security mode="Transport"> 
     <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> 
     <message clientCredentialType="Windows"/> 
     </security> 
    </binding> 
    <binding name="NetTcpMessageWindowsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="100" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="100" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> 
     <security mode="Message"> 
     <message clientCredentialType="Windows" /> 
     </security> 
    </binding> 
    </netTcpBinding> 
</bindings> 

は、エージェントサービスのためのapp.configからsystem.serviceModelセクションです:

<system.serviceModel> 
<diagnostics performanceCounters="Default"/> 
<bindings> 
    <netTcpBinding> 
    <binding name="NetTcpWindowsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:10:00" 
      transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" 
      listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="32" maxStringContentLength="65535" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> 
     <security mode="Transport"> 
     <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> 
     <message clientCredentialType="Windows"/> 
     </security> 
    </binding> 
    <binding name="NetTcpCertificatesBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" sendTimeout="00:10:00" portSharingEnabled="true"> 
     <security> 
     <transport clientCredentialType="Certificate" protectionLevel="EncryptAndSign"/> 
     </security> 
    </binding> 
    <binding name="NetTcpMessageWindowsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="100" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="100" maxReceivedMessageSize="2147483647"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> 
     <security mode="Message"> 
     <message clientCredentialType="Windows" /> 
     </security> 
    </binding>  
    </netTcpBinding> 
</bindings> 
<services> 
    <service name="AcordAgent.AcordService" behaviorConfiguration="AcordServiceBehavior"> 

    <endpoint address="http://qaschedapp:8100/Acord" binding="webHttpBinding" behaviorConfiguration="HttpWebGetBehavior" contract="AcordContract.IMeta" name="MetaEndpoint"> 
     <!--the name of this endpoint above (MetaEndpoint) must stay--> 
    </endpoint> 
    <!--binding for clients within the firewall calling from C# with WCF --> 
    <endpoint address="net.tcp://localhost:8101/Acord/201307" binding="netTcpBinding" bindingConfiguration="NetTcpMessageWindowsBinding" name="NetTcpWindowsEndpoint" contract="AcordContract.IAcordService201307"> 
     <identity> 
     <dns value="localhost"/> 
     </identity> 
    </endpoint> 
    <!--binding for clients outside the firewall calling from C# with WCF using certs --> 
    <endpoint address="net.tcp://localhost:8102/Acord/201307" binding="netTcpBinding" bindingConfiguration="NetTcpCertificatesBinding" name="NetTcpCertificatesEndpoint" contract="AcordContract.IAcordService201307"> 
     <identity> 
     <dns value="localhost"/> 
     </identity> 
    </endpoint> 
    <endpoint address="net.tcp://localhost:8102/Acord/mex" binding="mexTcpBinding" contract="IMetadataExchange"/> 
    </service> 
</services> 
<behaviors> 
    <endpointBehaviors> 
    <behavior name="NetTcpCertificatesBehavior"> 
     <clientCredentials> 
     <clientCertificate findValue="(value redacted)" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/> 
     <serviceCertificate> 
      <authentication certificateValidationMode="None"/> 
     </serviceCertificate> 
     </clientCredentials> 
    </behavior> 
    </endpointBehaviors> 
    <serviceBehaviors> 
    <behavior name="AcordServiceBehavior"> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
     <serviceCredentials> 
     <serviceCertificate findValue="(value redacted)" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/> 
     <clientCertificate> 
      <certificate findValue="(value redacted)" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/> 
     </clientCertificate> 
     </serviceCredentials> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

補遺:私はちょうどのnetstat -aを実行しているし、私はポート8102で聞いているものは何も見ません。だから明らかに、私は私が得ている応答を得ています。私が今質問しているのは、なぜエージェントが8102を聞いていないのですか?私は、ブレークポイントを設定してVisual Studio 2015でエージェントサービスを実行しています。サービスをインストールしてプロセスにアタッチする必要はありますか?

答えて

0

問題は、このアプリケーションの設定ファイルにappSettingがあり、それによってservicehostが作成されるかどうかを制御し、設定がfalseに設定されているかどうかが制御されます。私は設定ファイルにそのような設定がある理由を言うことができません。しかし、appSettingをtrueに設定すると、まったく新しい問題が明らかになりました。だから、次の問題に。

関連する問題