whereas it is perfectly working in Live ip and port numbers
How do you know that? The error says the exact opposite. Noone is listening at that IP:port. Run tcpview from the sysinternals suite to know more. Note that listening on the machine's own IP address, like 192.168.55.55, and listening on 127.0.0.1, and listening on * (every address) are different things. When you connect to 127.0.0.1, it would connect successfully to the latter two, but not the first. It could also go wrong if the other end is listening on UDP, not TCP.