FileManager と TaskManager の 2 つのインターフェイスを備えた WCF サービス ライブラリがあります。
これらのインターフェイスの 2 つのエンドポイントを 1 つのサービスに結合したいと考えています。
1 つのインターフェースで 1 つのエンドポイントを使用していたときは完全に機能していましIFileManager
たが、別のインターフェースを作成しITaskManager
て新しいエンドポイントを追加した後、サービスが機能しなくなりました。TaskManager エンドポイントで Stopped が表示され、FileManager エンドポイントでエラーが表示されます。
System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.
修正方法は?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<diagnostics wmiProviderEnabled="false" />
<bindings>
<netTcpBinding>
<binding name="TcpBindingRule" maxBufferPoolSize="2097152" maxBufferSize="2097152"
maxReceivedMessageSize="2097152" />
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="Service1Behavior" name="WcfServiceLibrary1.FileManagerService">
<clear />
<endpoint address="FileManagerEndpoint" binding="netTcpBinding"
bindingConfiguration="TcpBindingRule" name="FileManagerEndpoint"
contract="WcfServiceLibrary1.IFileManager" listenUriMode="Explicit">
<identity>
<dns value="" />
<certificateReference x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"
listenUriMode="Explicit">
<identity>
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="TaskManagerEndpoint" binding="netTcpBinding"
bindingConfiguration="" name="TaskManagerEndpoint" contract="WcfServiceLibrary1.ITaskManager">
<identity>
<dns value="" />
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="net.tcp://Markor:1991/filemanager" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>