.NET Exception during Deserialization on Postback with RadDatePicker

5 posts, 0 answers
  1. Laku
    Laku avatar
    7 posts
    Member since:
    Sep 2007

    Posted 04 Sep 2009 Link to this post

    Hello,

    We are getting the following error on a page where we have a RadDatePicker on the form during postback. I am wondering if this has something to do with differences in locale between the user and the browser but am not sure. Has anyone encountered this before?

    Thanks,
    Eric

    --------------------------------------------

    Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
    Parameter name: ticks
       at System.DateTime..ctor(Int64 ticks, DateTimeKind kind)
       at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeStringIntoDateTime()
       at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
       at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
       at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
       at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
       at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
       at System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input)
       at Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection)
       at Telerik.Web.UI.RadDatePicker.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection)
       at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  2. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 09 Sep 2009 Link to this post

    Hi Eric,

    I'm afraid that I'm unable to recreate the behavior you have described locally. Can you please provide some more details about your RadDatePicker declaration, page setup etc?

    Sincerely yours,
    Rosen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Laku
    Laku avatar
    7 posts
    Member since:
    Sep 2007

    Posted 20 Sep 2009 Link to this post

    Hello,

    It appears that this is happening when the client is accessing the site and their time zone is set to a value that is ahead of the clock of the server. For instance our servers are set to -6 GMT, but the client that was accessing the site was set to +5 GMT. If we set the client to -6 GMT the problem seems to go away. Do you have any suggestions?

    Thanks,
    Eric
  4. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 24 Sep 2009 Link to this post

    Hello Eric,

    Unfortunately I'm still unable to reproduce the described behavior locally. I have attached a simple test page, please take a look and let us know if I'm missing something obvious. You may consider sending us (attached to a formal ticket) a small runnable application in which the behavior can be observed.

    Best wishes,
    Rosen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Laku
    Laku avatar
    7 posts
    Member since:
    Sep 2007

    Posted 26 Sep 2009 Link to this post

    Hello,

    Thanks for your help we have found the issue. In our code we were setting the MaxDate and MinDate properties to DateTime.MaxDate and DateTime.MinDate, which I guess was causing it to overflow if the client was on a different timezone that was ahead of us on postback.

    Thanks,
    Eric
Back to Top