473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Create Socket Error

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
2 2861
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike | last post by:
The client program I tried to create will send some message to another program on a different server and block wait for reply message. If connection is timeout, close the socket. I did something...
2
by: Robert Creager | last post by:
I'm receiving the following error during startup: Aug 10 14:11:27 thunder postgres: LOG: failed to create socket: Address family not supported by protocol Aug 10 14:11:27 thunder postgres: ...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
2
by: Droopy | last post by:
Hi, I try to implement a reusable socket class to send and receive data. It seems to work but I have 2 problems : 1) I rely on Socket.Available to detect that the connection is closed (no...
1
by: bobano | last post by:
Hi everyone, I am writing a POP3 Client program in Perl. You connect to a POP3 Server and have a running conversation with the mail server using commands from the RFC 1939 Post Office Protocol....
0
by: Nasir | last post by:
What do we need to do to make the connection to SQL Server 2005 via JNDI? Here is what is happening: Verifying JNDI binding Datasource properties: description=empty
14
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate...
10
by: John Nagle | last post by:
Here are three network-related exceptions. These were caught by "except" with no exception type, because none of the more specific exceptions matched. This is what a traceback produced: 1....
14
by: ahlongxp | last post by:
Hi, everyone, I'm implementing a simple client/server protocol. Now I've got a situation: client will send server command,header paires and optionally body. server checks headers and decides...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.