fo-dicom / fo-dicom-samples

Sample applications associated with the fo-dicom framework
Other
153 stars 143 forks source link

Samples.Desktop.sln Error #93

Open Flowergift opened 7 months ago

Flowergift commented 7 months ago

Hi~ Everything was okay for me in VS2022. But when I tried it "consoletest" run,

 System.Net.Sockets.SocketException: ConnectionRefusedError: [WinError 10061] 127.0.0.1:11112
   Location: System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
   Location:  System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   Location:  System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
   Location:  System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- ~~~~~~~~~~~~~ ---
   Location:  System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   Location: : System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   Location: : FellowOakDicom.Network.DesktopNetworkStream..ctor(NetworkStreamCreationOptions options)
   Location:  FellowOakDicom.Network.DesktopNetworkManager.CreateNetworkStreamImpl(NetworkStreamCreationOptions options)
   Location:  FellowOakDicom.Network.NetworkManager.FellowOakDicom.Network.INetworkManager.CreateNetworkStream(NetworkStreamCreationOptions options)
   Location:  FellowOakDicom.Network.Client.Advanced.Connection.DefaultAdvancedDicomClientConnectionFactory.<>c__DisplayClass5_0.<OpenConnectionAsync>b__0()
   Location:  System.Threading.Tasks.Task`1.InnerInvoke()
   Location:  System.Threading.Tasks.Task.Execute()

message is appeared. Can you help me?

AnyCPU, x86 same problem~(Debug mode~) And all ports blocks released from Win 11 defender inbound/outbound "all" ports. Samples.Universal and others are not built or have run. And my other DICOM server...Made by Win IIS server is no problem. (127.0.0.1 + localhost are all fine in my PC) Surely it's "1112" port problem as my guess..

And can you help me the "DICOM viewer(reader) open source based on fo-dicom/oak-dicom"?

gofal commented 4 months ago

A SocketException is raised from the operating system. This may be because of several reasons. A firewall might block the access, but you mentioned that you turned off your firewall. Is the Dicom-Server software running on port 11112? Connection may fail if no server is running properly?

This is a error, where it is very hard to help you from remote, because this is very likely not an error that is caused by source code, but rather by your machine configuration.