I have 2 server - serverProd and serverDev, I can connect to that same AD or DC or IP Address using that serverDev but I am not able to do the same with serverProd. Plus I can also see and grant access to application from serverDEV to prod. But not reverse
Is there any difference between these two servers?
No connection could be made because the target machine actively refused it
This error is a network-related error occurred while establishing a connection to the Server. It means that the error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port. generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port.
You can try below solution:
You might have a firewall rule in the way, or are trying to run it through a proxy without having the proxy up and running. The easiest way to check would be to disable your firewall or proxy and try again.
Disable proxy at web.config file:
<system.net>
<defaultProxy>
<proxy usesystemdefault="False"/>
</defaultProxy>
</system.net>
Also, check your .config files, mostly this error is caused by a wrong port number you assigned, or incorrect name of the PC (which should be localhost if you are testing everything in one PC).
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.