人がIRequestChannelのOpenメソッドを呼び出すと、実際に何が起こりますか?たとえば、次のコードがある場合:
ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>();
// using a netTcpBinding to a net.tcp://localhost:9999/Bar
IRequestChannel outchannel = factory.CreateChannel();
outchannel.Open(); // what happens here?
if (outchannel.State == CommunicationState.Opened)
{
success = true;
}
outchannel.Close();
一部のサービスでは「誤検知」が発生し、他のサービスでは正確な障害が発生するようです。チャネルが開いていることを何らかの方法で確認しなかった場合、常に誤検知が発生すると思います。
改善に関する提案はありますか?これは診断テストのためのサービスの実行可能性をテストするためだけなので、メッセージの送信は避けたいのですが、必要に応じて送信できます。
構成ファイルから、誤検知を返すチャネルが次のbehaviorConfigurationを使用していることに気付きました。
<binding name="secureNetTcpStream" maxBufferSize="2000000" maxReceivedMessageSize="2000000000" transferMode="Streamed" sendTimeout="00:05:00" receiveTimeout="14:00:00">
<readerQuotas maxStringContentLength="2000000000" maxArrayLength="2000000000" />
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
ストリーミングされた動作の構成が、ホストとサービスが利用できない場合でもIRequestChannelが開いていることを示す原因になるのでしょうか。