BUG ? InvalidOperationException on Socket.Connect(IPEndPoint) ? 
Author Message
 BUG ? InvalidOperationException on Socket.Connect(IPEndPoint) ?


Is this a bug ?
I am trying to connect to a FTP Server. The following code raises an
Exception, that makes absolutely no sense to me:

m_ClientSocket = new
m_hostAddress = Dns.Resolve(m_strFTPAddress).AddressList[0];
m_IPServer = new IPEndPoint(m_hostAddress, m_iFTPPort);



catch(Exception ex)


The Exception text is:

"A first chance exception of type 'System.InvalidOperationException'
occurred in system.dll
Additional information: The requested Performance Counter is not a
custom counter, it has to be initialized as ReadOnly."

But I do not use any perfomance counters in my project at all! And what
should they have to do with my socket object?
The strange this is, the connection works afterward, at least I get a
"220" status back from the ftp server when I receive data from the

Any one encountered the same error? Any hints?

Mon, 01 Mar 2004 23:17:48 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Socket IPEndpoint creation.

2. Socket exception when trying to connect to the socket

3. SocketException at Socket.Connect()

4. Socket Connect

5. Windows client does not connect to Unix socket

6. Help with connect to socket

7. socket (and connect problem)

8. connecting to smtp server through sockets

9. using socket to connect to telnet port

10. getpeername on connected sockets

11. Help: socket connecting timing

12. socket() and connect()?


Powered by phpBB® Forum Software