Problem in Basic TCP server

I tried the example “A Basic TCP Webserver” provided in the link :
But the problem is whenever I am trying to debug, it’s prompting an exception :“An unhandled exception of type ‘System.Exception’ occurred in Microsoft.SPOT.Net.dll”.
Can anyone help me understand where the problem is…


If you’re looking for a webserver for the cobra, look here:

Hello Eric,
Thanx for your reply but can u please explain what the problem is in my above program.

Lets start with the basics.

What version is the GHI SDK you have installed? Hint: check the README file in the program files \ GHI directory (thats not the actual directory but should lead you there). You’re looking for a number like or similar.

What version is your firmware? Hint: use MFDeploy when your Cobra is connected to the USB port and use Target --> Device Capabilities, and look for the line SolutionReleaseInfo.solutionVersion.

Then, update the firmware on the device to match the SDK, and then start a new project (don’t re-use the existing project).

Hello Brett,
Actually the problem was in the connection. I made some mistake there. Now it’s working.
Thanx for your help.