Hello,
I've just had a intermittent problem running a search of a dicom server for studies asssociated with a patient. The code that caused the error is:
var lastQueryResponse = new List<Study>();
lastQueryResponse.Clear();
DicomCFindRequest request = DicomCFindRequest.CreateStudyQuery(patientId: patientId);
request.OnResponseReceived = delegate (DicomCFindRequest req, DicomCFindResponse response)
{
if (response.HasDataset)
{
lastQueryResponse.Add(Study.CreateStudyFromCFindResponse(response));
}
};
DicomClient client = new DicomClient();
client.AddRequest(request);
var pacs = MvcApplication.GlobalSettings.SourceDicom;
client.Send(pacs.Ip, pacs.Port, false, MvcApplication.GlobalSettings.ClientAE, pacs.Ae);
return lastQueryResponse;
The stack trace is this:
System.Net.Sockets.SocketException (0x80004005): The socket is not connected
at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in <a67b90c5acf54694896b770f716b945d>:0
at Dicom.Network.DesktopNetworkStream..ctor (System.String host, System.Int32 port, System.Boolean useTls, System.Boolean noDelay, System.Boolean ignoreSslPolicyErrors) [0x000
22] in <37262de083e745ab909a0e5412c10b69>:0
at Dicom.Network.DesktopNetworkManager.CreateNetworkStreamImpl (System.String host, System.Int32 port, System.Boolean useTls, System.Boolean noDelay, System.Boolean ignoreSslP
olicyErrors) [0x00000] in <37262de083e745ab909a0e5412c10b69>:0
at Dicom.Network.NetworkManager.CreateNetworkStream (System.String host, System.Int32 port, System.Boolean useTls, System.Boolean noDelay, System.Boolean ignoreSslPolicyErrors
) [0x00000] in <37262de083e745ab909a0e5412c10b69>:0
at Dicom.Network.DicomClient.Send (System.String host, System.Int32 port, System.Boolean useTls, System.String callingAe, System.String calledAe) [0x0008e] in <37262de083e745a
b909a0e5412c10b69>:0
This seemed to happen on a patient with a large number of studies, so we're wondering if this is a time out? If so, how would we go about fixing this?
Thanks
James