<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : &#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : &#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized</description>
  <pubDate>Fri, 10 Apr 2026 21:37:45 -700</pubDate>
  <lastBuildDate>Fri, 19 Mar 2010 13:22:28 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1692</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>&#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized : Aha!We found it. Our client-side...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6391#6391</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=726" rel="nofollow">ahopper</a><br /><strong>Subject:</strong> 1692<br /><strong>Posted:</strong> 19-Mar-2010 at 1:22pm<br /><br /><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="COLOR: #1f497d; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2"><FONT size=3><FONT face=Calibri><FONT size=+0><FONT size=+0><FONT color=#000000>Aha!&nbsp;We found it. Our client-side app.config did not have the clientApplicationType attribute set to “Silverlight” and this appears to break the code that serializes the Where clause.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></FONT></FONT></FONT></SPAN></P>]]>
   </description>
   <pubDate>Fri, 19 Mar 2010 13:22:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6391#6391</guid>
  </item> 
  <item>
   <title>&#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized : Hi, Ting! Yes, these are EF classes,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6387#6387</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=726" rel="nofollow">ahopper</a><br /><strong>Subject:</strong> 1692<br /><strong>Posted:</strong> 18-Mar-2010 at 3:29pm<br /><br />Hi, Ting! Yes, these are EF classes, and DisplayName is bound to a database field. To what address should I send the edmx file?]]>
   </description>
   <pubDate>Thu, 18 Mar 2010 15:29:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6387#6387</guid>
  </item> 
  <item>
   <title>&#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized : Hi Andy,   A) If Principal isa...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6385#6385</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1692<br /><strong>Posted:</strong> 18-Mar-2010 at 12:53pm<br /><br />Hi Andy, <DIV>&nbsp;</DIV><DIV>A)&nbsp; If Principal is&nbsp;a POCO class you should do these things:</DIV><OL><LI>Mark the class with the&nbsp;&#091;DiscoverableType(DiscoverableTypeMode.KnownType)&#093; attribute or have the class implement IKnownType (a marker interface).</LI><LI>Mark each property with the &#091;DataMember&#093; attribute.</LI></OL><DIV>For example:</DIV><DIV>&nbsp;&nbsp;&nbsp; &#091;DiscoverableType(DiscoverableTypeMode.KnownType)&#093;</DIV><DIV>&nbsp;&nbsp;&nbsp; public class Principal {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;...</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;</DIV><DIV>&nbsp; &nbsp;&nbsp;&nbsp; public String DisplayName {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { ... }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { ... }</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp; ...</DIV><DIV>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>B)&nbsp; If Principal is a standard DevForce Entity, you can only issue queries to the database on properties&nbsp;that are backed by database columns.&nbsp; If DisplayName is a calculated or custom property, the database engine doesn't know what to do with it.&nbsp; Once you have brought down the object into the client-side cache, however, you can use LINQ-to-objects to query on any arbitrary property.</DIV><DIV>&nbsp;</DIV><DIV>If you're still having problems, send us the edmx file and we'll have a look.</DIV><DIV>Good luck!</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 18 Mar 2010 12:53:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6385#6385</guid>
  </item> 
  <item>
   <title>&#039;System.Reflection.RuntimeMethodInfo&#039; cannot be serialized : We are trying to use the fluent...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6382#6382</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=726" rel="nofollow">ahopper</a><br /><strong>Subject:</strong> 1692<br /><strong>Posted:</strong> 18-Mar-2010 at 9:22am<br /><br />We are trying to use the fluent interface to generate a Linq query that applies a where clause:<DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>em.ExecuteQueryAsync&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Principal</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;(em.Principals.Where(p =&gt; p.DisplayName == </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"ahopper"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>), </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>this</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.QueryExecuted, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas></FONT>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas><FONT face=C&#111;nsolas><FONT size=2 face=Verdana>However, when the callback is invoked, it has an error:<BR></DIV><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><FONT size=3 face=Calibri>“Type 'System.Reflection.RuntimeMethodInfo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.”</P><DIV>&nbsp;</DIV><DIV>Are we simply using the API incorrectly?</DIV><DIV>&nbsp;</DIV><DIV>Many thanks!</DIV><DIV>Andy Hopper</DIV><DIV>Enterprise Architect, Wintellect</DIV><DIV><a href="mailto:ahopper@wintellect.com" target="_blank">ahopper@wintellect.com</A></DIV><DIV></FONT></FONT>&nbsp;</DIV></FONT></FONT>]]>
   </description>
   <pubDate>Thu, 18 Mar 2010 09:22:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1692&amp;PID=6382#6382</guid>
  </item> 
 </channel>
</rss>