<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>WCF RIA Services</title><link>http://forums.silverlight.net/forums/53.aspx</link><description>A forum for discussing the client and server pieces that make up the WCF RIA Services framework for Silverlight</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/256845.aspx</link><pubDate>Fri, 24 Jul 2009 15:23:06 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:256845</guid><dc:creator>sethian</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/256845.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=256845</wfw:commentRss><description>&lt;p&gt;Going into Debug-&amp;gt;Exceptions and simply clearing the clr check box is not the best work around for this problem.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;You should add the exception:&lt;/p&gt;
&lt;p&gt;System.ComponentModel.DataAnnotations.ValidationException&lt;/p&gt;
&lt;p&gt;&amp;nbsp;and clear the User-unhandled for only that particular one (since that&amp;#39;s what&amp;#39;s getting thrown).&lt;/p&gt;
&lt;p&gt;Otherwise all user-unhandled clr exceptions will not cause a break in the debugger, and you won&amp;#39;t know when your code is throwing an exception.&lt;/p&gt;</description></item><item><title>Re: Re: RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/200198.aspx</link><pubDate>Thu, 02 Apr 2009 13:03:15 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:200198</guid><dc:creator>BenHayat</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/200198.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=200198</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;callmeknud:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;Thank you!&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hi, if your question was answered, please mark it as &amp;quot;Answered&amp;quot;, so others can take advantage of resolved questions.&lt;/p&gt;&lt;p&gt;Thanks! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/199993.aspx</link><pubDate>Thu, 02 Apr 2009 06:29:20 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:199993</guid><dc:creator>callmeknud</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/199993.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=199993</wfw:commentRss><description>&lt;p&gt;Thank you!&lt;/p&gt;</description></item><item><title>Re: RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/199610.aspx</link><pubDate>Wed, 01 Apr 2009 16:20:36 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:199610</guid><dc:creator>roncain</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/199610.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=199610</wfw:commentRss><description>&lt;p&gt;Yes, that is the right thing to do for now.&lt;/p&gt;
&lt;p&gt;What is happening is that the Debugger is set by default to catch uncaught user exceptions, and if you run from the debugger when validation exceptions are thrown, you break to the debugger.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re working with the validation and data-binding folks to work out a better story to avoid this exception being unhandled.&lt;/p&gt;
&lt;p&gt;But your life will be simpler in the meantime if you use the Debug | Exceptions menu and uncheck &amp;quot;User-unhandled&amp;quot;.&amp;nbsp; This does not prevent the app from seeing these exceptions.&amp;nbsp; It just stops the debugger from breaking when they occur.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/199501.aspx</link><pubDate>Wed, 01 Apr 2009 13:44:18 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:199501</guid><dc:creator>lee_sl</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/199501.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=199501</wfw:commentRss><description>&lt;p&gt;In the debug menu in VS uncheck clr exceptions and run it&lt;/p&gt;</description></item><item><title>RIA CustomValidation(...) - [Required] [StringLength(3, MinimumLength=2)] -&gt; ValidationException was unhandled by User Code</title><link>http://forums.silverlight.net/forums/thread/199477.aspx</link><pubDate>Wed, 01 Apr 2009 13:02:14 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:199477</guid><dc:creator>callmeknud</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/199477.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=53&amp;PostID=199477</wfw:commentRss><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;i followed the RIA Overview PDF and added a shared.cs file to my Project in which i validate some other fields which works fine.&lt;br /&gt;but if i add something like:&lt;/p&gt;
&lt;p&gt;[Required]&lt;br /&gt;[StringLength(3, MinimumLength=3)]&lt;br /&gt;public string plz;&lt;br /&gt;&lt;br /&gt;to the metadata i get the error: ValidationException was unhandled by User Code.&lt;br /&gt;I thought it would just display the user that field plz hast to be at least 3 and at max 3 characters long.&lt;br /&gt;How and where do i have to handle the Exception in my code?&lt;br /&gt;&lt;br /&gt;thanks!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>