No connection could be made because the target machine actively refused it?

后端 未结 28 2198
北荒
北荒 2020-11-22 01:27

Sometimes I get the following error while I was doing HttpWebRequest to a WebService. I copied my code below too.


System.Net.WebException: Unable to connect         


        
28条回答
  •  广开言路
    2020-11-22 01:51

    I just faced this right now...

    Here on my end, I have 2 separated Visual Studio solutions (.sln)... opened each one in their own Visual Studio instance.

    Solution 2 calls Solution 1 code. The problem was related to the port assigned to Solution 1. I had to change the port on solution 1 to another one and then Solution 2 started working again. So make sure you check the port assigned to your project.

提交回复
热议问题