Schedule a service throwing a datetime error in Firefox

Nov 12, 2009 at 2:21 AM

Has anyone come across the following? If so so did you find a solution?

Schedule a service throws errors if a user uses Firefox instead of IE...

Server Error in '/' Application.

The string was not recognized as a valid DateTime. There is a unknown word starting at index 32.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 32.

Source Error:

Line 156:		appointmentRequest.ServiceId = service.serviceid.Value;
Line 157:
Line 158: DateTime startDateWithTime = DateTime.Parse(requestedStartTime.Value);
Line 159: DateTime endDateWithTime = DateTime.Parse(requestedEndTime.Value).AddDays(1);
Line 160:


Source File: d:\Endace Web Site\Controls\ServiceScheduler.ascx.cs    Line: 158

Stack Trace:

[FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 32.]
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2837994
System.DateTime.Parse(String s) +25
Controls_ServiceScheduler.findTimesButton_Click(Object sender, EventArgs e) in d:\Endace Web Site\Controls\ServiceScheduler.ascx.cs:158
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565