Netduino Plus webserver Help
#1
Posted 28 May 2011 - 08:40 PM
#2
Posted 29 May 2011 - 01:16 PM
#3
Posted 04 June 2011 - 11:41 AM
It could be that rawData length is less then 5, you can try replacing:
string commandData = rawData.Substring(5, rawData.Length – 5);
with:
string commandData = (rawData.Lenght >= 5) rawData.Substring(5, rawData.Length – 5) ? "";
However, the real issue is why is the rawData length is less than 5?
Veetrik,
Thanks for your reply. I tried what you suggested, but the assembler didn't like the code.
After some investigation I found my problem in the program.cs.
There was no trap for a bad command sent from the browser.
Thanks again Gordon
#4
Posted 10 June 2011 - 03:35 AM
Veetrik,
Thanks for your reply. I tried what you suggested, but the assembler didn't like the code.
After some investigation I found my problem in the program.cs.
There was no trap for a bad command sent from the browser.
Thanks again Gordon
That's great Gordan. by the way the could I sent you should have been:
string commandData = (rawData.Lenght >= 5) ? rawData.Substring(5, rawData.Length – 5) : "";
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users