We have a server application (developed using .Net 1.1, C#) which listen the port 8086 and the client application, before starting will handshake with this server using remoting.
The application is working fine in almost all environments - Windows 2000/2003/2008/XP/Vista.
Now we are facing an issue with Windows 7.
When we are staring the server, it’s opening the port and will be listening to clients, but when try to send a request from a client who is running in other OS, it gives a message that server is not running.
We disabled the proxy, gave the exceptions for proxy but all went in vain. On further analysis we found that the system is having multiple connectivity (LAN, Bluetooth &WIFI).
When we checked the TCP port using netstat –a it showed the Local Address as 0.0.0.0:8086. So we disabled/removed the Bluetooth & WiFi option and tried again then also netstat is showing LocalAddress 0.0.0.0:8086.
How to go ahead in this situation?
Thanks in advance.
Do a network capture using Microsoft Network Monitor or Wireshark to better understand the underlying TCP/IP packets. That can show what's up easily.
Related
I'm following the sample application of a Webserver, handling incoming requests through TCP with a Port.
Sample application with code: https://incredibits.io/project/windows-10-iot-internet-of-things-tips/windows-10-iot-raspberry-pi-web-server
When debugging the UWP application on my Windows 10 machine, and try to access the the local IP (192.168.x.x <- Ofcourse I've entered my actual local IP) I get what I'm supposed to. The application get's an incoming request and returns some data back to me (The client) on another computer of mine.
The issues I'm facing is when I deploy this to my Raspberry Pi 3 running Windows 10 IoT Core (The newest from Insider), I can't access the application from my client computer at all. Is this a thing with the Pi's firewall or something else preventing this?
I CAN access the IoT Core's Web interface on port 8080, but I cannot access my application running on port 80. (I've tried switching the port to another one aswell, works locally on my Windows 10 but not on the Pi)
Does anyone know a solution, or have faced a similar issue?
Note:
I've also tried examples like (https://ms-iot.github.io/content/en-US/win10/samples/BlinkyWebServer.htm) which again, works on my Windows 10 pc, and can be accessed by my other PC if their on the same network, but not on my Pi)
I found the solution to my problem.
The port I was using, wasn't opened up in the Raspberry Pi's Firewall. I couldn't find how to add a rule to the Firewall but after some help on Freenode C# Chat forum, I found the following snippet:
First I log into the Pi through PowerShell
Enter-PsSession -ComputerName MyRaspberryPi-Credential MyRaspberryPi\Administrator
Then I manually add the Firewall opening of the port I'm using. In this case port 8080.
netsh advfirewall firewall add rule name="Raspberry Pi Webserver" dir=in action=allow protocol=TCP localport=8080
After that, everything worked as expected. I could access the port on my Raspberry Pi! All good!
Thanks to #canton7 and #taylor-kidd in the comments, for coming with suggestions that in the end helped me!
EDIT 12th of April:
It seems like this issue with the Firewall not being opened, was actually a known issue by Microsoft already. They write that in their Relase notes for the Insider Preview version 14295 (Which I am using) here http://ms-iot.github.io/content/en-US/win10/ReleaseNotesInsiderPreview.htm
I have a C#.NET web app that runs in IIS 7 on Server 2008 R2, .NET v4, MVC 3, SQL Server 2012. The app works on a bunch of machines already, but we've just got a new computer and the behaviour on this machine is slightly different.
In particular, when the app opens the System.IO.Ports.SerialPort and writes, no data is actually transmitted on COM1. No exception seems to be thrown either. The app goes on to wait for a response, and times out.
If I close my app, and use Termite (a terminal program) to check that the COM port is working, data comes out the serial port just fine. So the serial port, drivers, etc seem to be ok.
If I have Termite connected to COM1 when my app tries to open the port, I get an Access Denied exception (as I expect). So my application does seem to be trying to access the correct port.
But if there's nothing else using COM1, my application gets no exceptions - but nothing comes out the serial port.
Does anyone have any suggestions about how to debug this situation?
I had the same problem - C# SerialPort couldn't connect to my serial device but Termite could despite following the device manual.
I compared the SerialPort properties with my Termite settings and found that there's some terminology difference between the two. For example, Termite has an option for "DTR/DTS" (which I needed) while SerialPort doesn't have anything called "DTS". Setting these properties of the SerialPort object worked for me:
DtrEnable = true;
RtsEnable = true;
Is there any way to code my own console client for hyper-v guest machines ?
I don't want to connect to guest using RDP. I would like to do it in same way Microsoft is doing it.
What I've found so far is (correct me if I am wrong):
Their client connects to the host on port 2179. Then some handshaking, metadata exchange happens on port 2179 and client gets data on some 49xxx port.
What I don't understand is what happens on port 2179 ? Is there any protocol specification I should look for ?
Thanks
A little bit of Googling on Hyper-V and 2179 led me to vmconnect.exe, a program used to connect to virtual machines running on Hyper-V servers.
This tool is stated to use the Remote Desktop Protocol.
So I guess you can connect using the RDP API itself (mstscax.dll), the Cassia library (as suggested in this answer) or the ActiveX control AxMSTSCLib.
Referring to a question I asked on SuperUser, which is recommended to be ask on SO.
I am developing a console application that sends packet to a remote server on a specific TCP Port (55000). I only have one computer to develop and test on. Is it still possible to debug my program; i.e. when I F5 debug, I send a test packet (from localhost) to localhost which is listening.
Also, I need to open up a port for development. I follow the this instruction to open a port (55000) in Window 7.
But when I netstat, the port 55000 is not even listed (i.e. the Local Address of 0.0.0.0:55000 is not there...). I also tried restarting the computer, but persist the problem.
Yes, of course you can. Just run the server to listen on port 55000, and then connect to localhost on port 55000.
You can use 2 different sites in the IIS with different ports or you can take advanatege of 'hosts' file to assign some naming for those 2 sites
Yes, it is possible. Although keep in mind that TCP ports for request and response must be different. So, if you bind your server to some port (say 2000), then your client must send requests from different port (80 usually).
Please excuse the backwards architecture on this one and assume there's not a better way...
I have a Windows Service running on localhost, it listens on TCP port 5432 and broadcasts events to any connected sockets.
Is it possible for a Silverlight 4 in-browser app to connect to this service (thereby receiving these events)? Or are there security restrictions around Silverlight sockets preventing localhost access?
Yes - that is possible though not easy because of security reasons... please see the following links:
http://msdn.microsoft.com/en-us/library/cc645032%28v=vs.95%29.aspx
http://msdn.microsoft.com/en-us/library/cc296248%28v=vs.95%29.aspx