I tried to use the same service as @Misiu like in: Custom MessageEncoder add attributes to message without modifying structure
I know that post has 3 years but I hope someone knows the answer.
I'm facing the same problem.
System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to https://dz3.swd.zbp.pl/broker3/services/QueryDz. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host