Unable to establish socket connection between two UWP apps

karthik kovi 0 Reputation points
2023-10-31T05:17:34.8066667+00:00

I am developing a UWP application that has both client and server functionality. When I run the application on the same machine, the client and server are able to connect successfully. However, when I migrate the client and server to separate UWP applications, the client is unable to connect to the server. I am using the same code in both scenarios, and I have verified that the server is running and listening on the correct port. I am also able to see the server port in the command prompt using the netstat -ano command. I am getting the following error message from the client UWP app:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [::1]:1337

Universal Windows Platform (UWP)
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,810 questions
{count} votes