Validation failed for one or more entities. See ' entityvalidationerrors ' property for more details.

Source: Internet
Author: User

Server Error in "/" application. Validation failed for one or more entities. See ' entityvalidationerrors ' property for more details.

Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code.

Exception Details: System.Data.Entity.Validation.DbEntityValidationException:Validation failed for one or more entities. See ' entityvalidationerrors ' property for more details.

Source Error:

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

This problem occurs:

We cannot find an assignment error in the error message that is the attribute of that entity, causing the exception to be thrown.

At this point we should convert the wrong object so that we can get the information we need to modify the program.

Look at the code specifically:

To convert objects in the monitor:

((System.Data.Entity.Validation.DbEntityValidationException) $exception)

To get the object we need, we can find out exactly where the error is coming from ....

  

Find the problem, modify the code, it is OK, wow click. A long-depressed problem finally solved.

Validation failed for one or more entities. See ' entityvalidationerrors ' property for more details.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.