0

I am trying to run a self-compiled windows application on windows 10 in powershell (with and without admin rights) which need access to a network adapter at address 192.168.200.6 so I run it as

.\my_app.exe 192.168.200.6

but I get an error

[ERROR] (10049): The requested address is not valid in its context.

I can ping that address from the powershell. I also added that app to the "public" and "private" firewall setting in "Allow an app through firewall" but I still get that error.

This question is not about programming and coding, it is about WINDOWS and what else I might configure on WINDOWS so WINDOWS allows this application to run without any further restrictions?

Alex
  • 105
  • 1
  • 2
  • 12
  • "The reason for why your code fails tho is because you're trying to bind to an external IP. Your machine is not aware of this IP hence the error message, [...]. In other words, you mixed up client sockets with server sockets and you're binding to a IP not present on the local machine." https://stackoverflow.com/questions/23857942/winerror-10049-the-requested-address-is-not-valid-in-its-context – Greg Askew May 11 '23 at 14:26
  • But that IP belongs to an adaptor that is defined in the "Network Connections" settings in Windows. It is identified as "Ethernet 2", a "Realtek USB GbE Family Controller" configured with a static IP address 192.168.200.6 with a subnet mask of 255.255.255.0. It seems to be enabled and I can ping it and devices connected to that very ethernet adaptor. So windows knows about this device. And thanks a lot for your answer, I will take a look at the link you provided right away. In other SO forums you will be indiscriminated for asking such a question! – Alex May 11 '23 at 14:34
  • The response is commensurate with the information presented in the question. Normally I would inquire further, however given the attitude regarding the lack of context, and that this is a forum for managing systems in a business environment, this question is most likely better handled in another forum. – Greg Askew May 11 '23 at 14:40
  • Just say when you have no further idea of the cause of the problem. Thanks – Alex May 11 '23 at 14:41

0 Answers0