Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:21:50+00:00 2026-06-18T02:21:50+00:00

I am reading data from Web API and populate a form. When I submit

  • 0

I am reading data from Web API and populate a form. When I submit it back to Web API, I get this error:

{“Message”:”An error has occurred.”,”ExceptionMessage”:”Property
‘StartDate’ on type ‘MvcApplication1.Models.ProductSale’ is invalid.
Value-typed properties marked as [Required] must also be marked with
[DataMember(IsRequired=true)] to be recognized as required. Consider
attributing the declaring type with [DataContract] and the property
with
[DataMember(IsRequired=true)].”,”ExceptionType”:”System.InvalidOperationException”,”StackTrace”:”
at
System.Web.Http.Validation.Validators.ErrorModelValidator.Validate(ModelMetadata
metadata, Object container)\r\n at
System.Web.Http.Validation.DefaultBodyModelValidator.ShallowValidate(ModelMetadata
metadata, ValidationContext validationContext, Object container)\r\n
at
System.Web.Http.Validation.DefaultBodyModelValidator.ValidateProperties(ModelMetadata
metadata, ValidationContext validationContext)\r\n at
System.Web.Http.Validation.DefaultBodyModelValidator.ValidateNodeAndChildren(ModelMetadata
metadata, ValidationContext validationContext, Object container)\r\n
at
System.Web.Http.ModelBinding.FormatterParameterBinding.<>c_DisplayClass1.b_0(Object
model)\r\n at
System.Threading.Tasks.TaskHelpersExtensions.<>c_DisplayClass49.b_48()\r\n
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1
func, CancellationToken cancellationToken)”} 1

My date comes Web API as “2013-01-31T16:27:18.503” and posts back as “2013-01-31T05:00:00.000Z”. I can intercept the payload before sending to Web API and can use something like http://momentjs.com to parse it, but what should I do? This is driving me nuts!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:21:51+00:00Added an answer on June 18, 2026 at 2:21 am

    2013-01-31T16:27:18.503 is an XML Date according to XML spec.

    2013-01-31T05:00:00.000Z seems to be ISO 8601 date.

    Somewhere this seems to be going wrong. Without knowing about your formatters, what you do on date and how it changes impossible to say.

    Date format depends on your formatter. If you use a JSON formatter, this could work differently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading data from a file that has, unfortunately, two types of character
I am reading data from XML like this: (Contacts.xml) <?xml version=1.0 encoding=utf-8 standalone=yes?> <!--LINQ
I am reading data from an xml doc and placing it on a web
I have this code, which is reading data from a databse, then assigns a
I have a Python web application (Django, specifically). I'm reading in some data from
I am using jQuery to get back some JSON data from the server. I
i've a UITableView and I'm reading a data from a web service. the data
I am reading data from a Comma-separated Value (CSV) document and saving its contents
I am reading data from an Excel worksheet. Some of the data is percent
I'm reading data from a file -> saving into DB -> Loading my Custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.