This error occurs when we add a client service reference: An error occurred while downloading "Http://localhost:8002/WCFService". The underlying connection has been closed: An error occurred while receiving. Unable to read data from the transport connection: the remote host forced the shutdown of an existing connection. The remote host forced the shutdown of an existing connection. Metadata contains a reference that cannot be resolved: ' Http://localhost:8002/WCFService '. Metadata contains a reference that cannot be resolved: ' Http://localhost:8002/WCFService '. If The service is defined in the solution, try building the solution and adding the service reference again. Workaround: 1. Check the firewall settings and whether the service port is set to a secure port. 2. Check that the WCF service address is correct. The address here must be the listening address advertised by the WCF service hosting process, which listens on this port after the host process has started, and whether there are query requests for the requested service, which fails when the address is wrong. Therefore, re-verify that the service port is correct. In this example, Http://localhost:8001/WCFService is not a http://localhost:8002/WCFService. That's why it goes wrong. After you change the address, you can query the service information correctly. 3. Configure the endpoint based on the HTTP protocol,
Unable to read data from the transport connection: the remote host forced the shutdown of an existing connection