I have a server program and a client program. I built it based from the appliation from this tutorial. The thing is, it works (connects successfully and communicates) when I run both the program on the same computer. But when I tried running the client app in a different computer from where the server runs and connect it to the server app, this exception happens:
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 169.254.212.31:1986
I made sure that the client app will connect to the IP Address that the Server App listens to. I am running my application in a LAN. What should I do to resolve this problem?
UPDATE:
I'm sorry, forgot to put the link of the tutorial I was talking about. Here it is.
Solved the problem by opening a port (in my case, Port 1986).
I followed this guide:
How to open a port in windows 7 firewall
Related
I'm developing an UWP app which needs to be the server for a win32 client application, which is not to be changed if possible. Now the problem is I can connect to my uwp server application if I connect to the hostname or IP address of my computer. In contrast if I use localhost or 127.0.0.1 I can't get a connection.
I'm running this command constantly to enable the connection without running it, it doesn't work at all. "CheckNetIsolation.exe LoopbackExempt -is -n=Packagename"
I also executed some tests, and found out that on the computer under company IT, it only works when using the IP address. Therefore with the identical setup on a computer which is not under the companies IT, it works as expected.
So I expect there's a problem with the way my machine is configured.
We have an proxy for all outgoing connections. Another thing when I use a win32 server and client I have no problem to connect to localhost, so it seems that my machines dns configuration is in general right.
Do you have any ideas how to torubleshoot this, or what I can try to find out where my connection attempt is going. Maybe the UWP application is trying to connect over the proxy?
I created a C# console app web socket. It works and handles everything on my local machine, but now I have uploaded it on a real server so I can connect to it anytime.
But when I connect to the server endpoint, no connection is being made. I get this error:
WebSocket connection to 'ws:// ... :8083/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
I have opened the port using:
netsh firewall add portopening TCP 8083 "NetBIOS TCP Port 8083"
and I've also tested to see if it's listening, and it is:
netstat -na | find "8083"
I repeat that the console app web socket was working on my local machine, but not working on the real server.
Any thoughts on this? Thank you!
Can UWP apps communicate via network?
I tried running the Sockets Example from MSDN. The communication works, but only within the same app. If I try to connect to the socket from another app, the socket does not seem to receive any data.
I set the capabilities properly (Internet (Client & Server), Internet (Client) and Private Networks (Client & Server)).
I tried copying the same client code to another UWP app, but it fails to communicate to the server app (however, it hangs, the connection is not refused if the server app is running). I tried communicating with the socket from a .NET Console application. This also failed.
I viewed the related post (Connecting two local uwp Apps on same machine) and made sure not to run the server on localhost, but rather to run it on a local address as suggested in How do I find the local IP address on a Win 10 UWP project.
However, this did not help. The socket is only reachable from within the server UWP app.
When I run netstat -a, I can see the app listening on 0.0.0.0:1337. I also tried on 127.0.0.1, localhost and my LAN IP. I tried disabling Windows Firewall, but it did not help.
Any suggestions?
Evidently, the answer is no. Packets are prevented from reaching the socket if the UWP server is on the same machine as the client.
Socket Communication on UWP(Universial Windows Platporm)
While calling wcf ksoap2 from android.
htp.call(SOAP_ACTION, soapEnvelop);
I am getting this exception.
java.net.ConnectException: failed to connect to /10.0.2.2 (port 52442)
after 20000ms: connect failed: ENETUNREACH (Network is unreachable)
My code was working fine till last night but now its not.
Thanks in advance
It's obvious it's not any router-firewall related problem as you are under the same net, so there are only three possibilities:
There's nothing listening on that port on that IP
There's a local firewall on that machine that is blocking that connection attempt
You are not using WIFI so you're not under the same net.
Can you open that URL from your browser in your computer manually? If yes, I'd suggest using some debugging tool to trace TCP packets (I don't know either what kind of operating system you use on the destination machine; if it's some linux distribution, tcpdump might help).
All that assuming you have the android.permission.INTERNET permission in your AndroidManifest.xml file.
I am working on a big enterprise environment. When i try to deploy my solution to remote sever using ms build i get this error every time i try to deploy the app.
According to the error message it says it cannot connect but i can ping to the ip. I have even added the host ip and names in both machines host files. I don't know if i am doing anything wrong has anyone come across this before.How did you overcome this?
Note: i have replaced my ip with myip.com... and site name as my site name in this question.(My app is Asp.net MVC 4 Application)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3847): Web deployment task failed.(Could not complete the request to remote agent URL 'https://myip.com/msdeploy.axd?site=my site name'.) This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server. Error details: Could not complete the request to remote agent URL 'https://myip.com/msdeploy.axd?site=my site name'. Unable to connect to the remote server 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 myip.com
Any help will really be appriciated
The real error message is buried in the report, but it reads:
"Unable to connect to the remote server 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 myip.com"
This is a TCP connection problem, which means there's probably a simple solution.
It should be straightforward: it means the server you've specified is not operational. If you're certain that your website is currently working (i.e. you can get to it from your web-browser) then it means you've mistyped the server's name or other connection details. It does not mean that msdeploy.axd is having problems because if it were, your client would at least be able to connect.
Check your server's firewall rules, and also ensure that the web server (IIS) is running and is actively listening on the IP address you want (check the site bindings and also the server's network configuration, a dump of ipconfig /all would also be useful).
It was the issue with IIS it was not allowing remote connections. fixed it by allowing remote connections.
In my case it was due to the firewall setting of the host machine. Turning off firewall for local network fixed the problem