Print Page | Close Window

Server-side verification errors

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2658
Printed Date: 22-Jan-2026 at 6:18pm


Topic: Server-side verification errors
Posted By: stephenmcd1
Subject: Server-side verification errors
Date Posted: 09-May-2011 at 6:56pm
Silverlight Application" code sample from here:  http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-simple-silverlight

I know that sample isn't meant to be a perfect example of how to write an app, but it demonstrates my problem easily so I'll use it.  Here are the steps to reproduce the problem:
  1. Launch the sample app, connect, log in, and fetch data
  2. Clear out one of the Company name fields
  3. You'll get some client-side errors in the validation summary control (saying Company Name is required) but this doesn't stop you from trying to save (which is good for me).
  4. Click Save
  5. The save throws an exception but for me that just turns into a JavaScript error I can ignore (I later ended up updating the code to call MarkErrorAsHandled so I could examine things in the debugger)
  6. Click Save a couple more times (saving will get slower and slower - the number of validations errors seems to increase exponentially)
  7. Try to click on another row so the UI 'catches up' to all the validations errors. 
  8. The validation summary control will now have 4 errors but one of the errors will have a ton of duplicate messages.  And if you click back to the invalid cell, the tooltip will show a ton of errors as well.  And it's not just a UI issue because when I debugged into the code, I see that the EntityAspect thinks it has a ton of validation errors as well:





Replies:
Posted By: DenisK
Date Posted: 10-May-2011 at 7:38pm
Hi stephenmcd1;

Yes, this does sound like a bug where the same VerifierResult will keep on accumulating after a call to SaveChanges. I was able to repro it without using a UI as well. Let me confirm this behavior and file a bug report as necessary. I'll get back to you either way.

For the time being, the workaround is to clear the validation errors manually with EntityAspect.ValidationErrors.Clear() before the next call to SaveChanges.


Posted By: DenisK
Date Posted: 12-May-2011 at 5:41pm
This is confirmed as a bug. I have filed a bug report for this. Please let me know if you require an EAP and I will send it over to you once it's ready.


Posted By: daw451
Date Posted: 23-May-2011 at 4:43pm
I am also receiving this issue... Is there an ETA on a fix?


Posted By: DenisK
Date Posted: 24-May-2011 at 12:30pm
Hi daw451;

This bug fix will be included in our next release. This is scheduled for sometime around mid June.



Print Page | Close Window