One of the field in my web service method accepts DateTime value. Once service user provided value in wrong format: "31-10-2010" (or probably it was "31-10-10", to be honest: I not sure, are implementing logging right now). It is "dd-mm-yyyy" instead of "standard XML datetime been "yyyy-mm-ddTHH:MM:SS".
The problem that instead of rejecting such date as "wrong" (or invalid) web service successfully parsed this string as valid date, it was parsed as "31 of January, 2011 12:10 AM".
Question 1. Why the date is parsed at all?
Question 2. How to prevent that?
P.S. I've implemented business logic that check date to be in some meaningful range (no more then 10 years from now), but this don't help always...