If the client sent the data as ASCII then you can read it as ASCII. If there's junk in the data then it was put there by the client. They must be adding some sort of header and/or footer to the data. If you can send ASCII data using a TcpClient and read it correctly using your server then you know it's not the server that's the issue. You need to determine what that header/footer is so that you can parse it and remove it from the data.