Hi xz_0028,
"no connection could be made because the target machine actively refused it" is an often asked question, it is not the problem in your code.
Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that port, this may be because it is not running at all or because it is listening on a different port.
So could you validate the following stuff:
- If your firewall block the connection, both on client pc and router.
- If your service is running fine on your server
- If you enabled "Private Networks (Client & Server)" in your app manifest setting
Hope it can help you.
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.