At last i reproduce your problem. Space is the main issue there.
if you write the following code it will throw String was not recognize as valid format
var date = " 24/NOV/2013";
DateTime dt = DateTime.ParseExact(date, @"dd/MMM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
when you put extra space in date field then the error is produced. So in your case that is happened. So you should use trim function before use ParseExtract method.
DateTime dt = DateTime.ParseExact(txtDate.Text.Trim(),@"dd/MMM/yyyy",System.Globalization.CultureInfo.InvariantCulture);
Note if date string comes this form
var date = "24 / NOV /2013"//space inside date value
that time also throw the exception "string was not recognize as valid format"
in that case trim will not solve your problem. Then you should remove space from date value(inside date value). The following code sample i use linq with trim function for removing inside space.
var date = txtDate.Text;
date = String.Join("/", date.Split('/').Select(t => t.Trim()));
DateTime dt = DateTime.ParseExact(date, @"dd/MMM/yyyy", System.Globalization.CultureInfo.InvariantCulture);