unblocking a port
- From: "WAkthar" <wakthar@xxxxxxxxxxx>
- Date: Tue, 24 May 2005 14:25:51 +0100
Hi
I have a simple socket program which needs to connect and send an xml stream
through sockets.
private int nCommPort = 4555;
private string HostName = "localhost";
private Socket TcpSocket;
private XmlDocument objXmlDocument;
IPAddress HostIP = Dns.Resolve(HostName).AddressList[0];
IPEndPoint HostEP = new IPEndPoint(HostIP,nCommPort);
TcpSocket = new
Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
// Get the client name
string strHome = Dns.GetHostName();
string strMessage = "Hello from " + strHome;
byte[] byteMessage =
System.Text.Encoding.ASCII.GetBytes(strMessage.ToCharArray());
// Connect to Server
TcpSocket.Connect(HostEP);
if(TcpSocket.Connected)
{
:
:
}
I get an error
Additional information: No connection could be made because the target
machine actively refused it
When I ran it first I got the usual XP message box asking whether to block
or unblock this program. Unfortunatley I presses block instead of unblock.
How can I unblock this now!!
Cheers
.
- Follow-Ups:
- Re: unblocking a port
- From: Nick Weekes
- Re: unblocking a port
- Prev by Date: Re: Highlight LisView?
- Next by Date: preventing multiple logins in asp.net
- Previous by thread: Console App trying to do a ChDir?
- Next by thread: Re: unblocking a port
- Index(es):
Relevant Pages
|