an attempt was made to access a socket in a way forbbiden by its access permissions. why?

前端 未结 11 1221
北荒
北荒 2020-11-28 11:49
 private void StartReceivingData(string ipAddress, int iPort)
    {
        try
        {
            if (!_bContinueReciving)
            {
                //initia         


        
11条回答
  •  粉色の甜心
    2020-11-28 12:11

    Well I don't even understand the culprit of this problem. But in my case the problem is totally different. I've tried running netstat -o or netstat -ab, both show that there is not any app currently listening on port 62434 which is the one my app tries to listen on. So it's really confusing to me.

    I just tried thinking of what I had made so that it stopped working (it did work before). Well then I thought of the Internet sharing I made on my Ethernet adapter with a private virtual LAN (using Hyper-v in Windows 10). I just needed to turn off the sharing and it worked just fine again.

    Hope this helps someone else having the same issue. And of course if someone could explain this, please add more detail in your own answer or maybe as some comment to my answer.

提交回复
热议问题