Reading data over TCP

hi all,

i am trying to read xml from a engine, now im just parsing the bytes to string for testing , in full framework the code works fine.
but when i migrate in micro framework it doesn’t work.
Any ideas?

thnx

what doesn’t work? Any errors/exceptions?

Look at the SocketClient example in \Documents\Microsoft .NET Micro Framework 4.1\Samples

what is the content of the buffer (those 200 bytes)

the content i is a xml responds.

if i use my xml reader i get a first chance exception

#### Exception System.Xml.XmlException - CLR_E_PIN_DEAD (3) ####
#### Message: 
#### System.Xml.XmlReader::Read [IP: 00d1] ####
#### OPI_POS.Classes.XMLReader::ReadXml [IP: 0023] ####
#### OPI_POS.Classes.TCPClient::.ctor [IP: 00d2] ####
#### OPI_POS.Program::tcp [IP: 0004] ####

A first chance exception of type ‘System.Xml.XmlException’ occurred in System.Xml.dll

I’m not sure what you are getting at with the picture, but message is NULL because it hasn’t run the function on that line yet to set message. When you break your code on a certain line, it breaks before it runs that line, not after it. If you were to push the step button (F11 I think), it would run that line and highlight the next line to run just after it.

In your context the actual XmlExceptionErrorCode is UnknownEncoding (don’t be confused by CLR_E_PIN_DEAD).