By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,418 Members | 1,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,418 IT Pros & Developers. It's quick & easy.

Create Socket Error

P: n/a
Hi All,

I'm trying to create a listener server:

IPAddress ipAddress = IPAddress.Parse("192.168.0.1");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 9999);

Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );

Before Bind and Listen, I get exception at the Socket:

An unhandled exception of type
'System.Configuration.ConfigurationException' occurred in system.dll

Additional information: Unrecognized attribute 'value'

What's wrong with 'System.Configuration' ?
Thanks for any tip or fix.
Kind regards,
Anony
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This seemed to work over here. Might check 192.168.0.1 is ok on your system
and port 9999 is free (however you should have gotten different exception I
think). Is this a virtual nic or something?

IPAddress ipAddress = IPAddress.Parse("192.168.0.221");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 9999);

Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );
listener.Bind(localEndPoint);
Console.WriteLine("Did Bind.");
listener.Listen(100);

--
William Stacey, MVP

"Anony" <an***@newsgroup.ng> wrote in message
news:c0**********@news3.tilbu1.nb.home.nl...
Hi All,

I'm trying to create a listener server:

IPAddress ipAddress = IPAddress.Parse("192.168.0.1");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 9999);

Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );

Before Bind and Listen, I get exception at the Socket:

An unhandled exception of type
'System.Configuration.ConfigurationException' occurred in system.dll

Additional information: Unrecognized attribute 'value'

What's wrong with 'System.Configuration' ?
Thanks for any tip or fix.
Kind regards,
Anony

Nov 15 '05 #2

P: n/a
Thanks for reply.

I found that I messed up the Config File's entries.

"William Stacey [MVP]" <st***********@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
This seemed to work over here. Might check 192.168.0.1 is ok on your system and port 9999 is free (however you should have gotten different exception I think). Is this a virtual nic or something?

IPAddress ipAddress = IPAddress.Parse("192.168.0.221");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 9999);

Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );
listener.Bind(localEndPoint);
Console.WriteLine("Did Bind.");
listener.Listen(100);

--
William Stacey, MVP

"Anony" <an***@newsgroup.ng> wrote in message
news:c0**********@news3.tilbu1.nb.home.nl...
Hi All,

I'm trying to create a listener server:

IPAddress ipAddress = IPAddress.Parse("192.168.0.1");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 9999);

Socket listener = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );

Before Bind and Listen, I get exception at the Socket:

An unhandled exception of type
'System.Configuration.ConfigurationException' occurred in system.dll

Additional information: Unrecognized attribute 'value'

What's wrong with 'System.Configuration' ?
Thanks for any tip or fix.
Kind regards,
Anony


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.