<?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 : Serialization</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Serialization</description>
  <pubDate>Wed, 29 Jul 2026 10:06:21 -700</pubDate>
  <lastBuildDate>Tue, 16 Nov 2010 17:08:56 -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=2294</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>Serialization : Hi Sergio,   I could verify...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9138#9138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2294<br /><strong>Posted:</strong> 16-Nov-2010 at 5:08pm<br /><br />Hi Sergio, <DIV>&nbsp;</DIV><DIV>I could verify the behavior here.</DIV><DIV>&nbsp;</DIV><DIV>Instead of using an array, you can&nbsp;use <EM>List&lt;string&gt;</EM>:</DIV><DIV>&nbsp;</DIV><DIV><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>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> Codigos = </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>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </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>List</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</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>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;(</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>new</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>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;&#093; { </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>"1"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, </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>"aa"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> });</DIV><DIV><DIV></FONT></FONT>&nbsp;</DIV><DIV>Regards,</DIV></DIV><DIV>&nbsp;&nbsp; Silvio.</DIV><span style="font-size:10px"><br /><br />Edited by sbelini - 16-Nov-2010 at 5:10pm</span>]]>
   </description>
   <pubDate>Tue, 16 Nov 2010 17:08:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9138#9138</guid>
  </item> 
  <item>
   <title>Serialization :   Hi Silvio,The query on server...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9112#9112</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=979" rel="nofollow">antonio_sergio</a><br /><strong>Subject:</strong> 2294<br /><strong>Posted:</strong> 15-Nov-2010 at 2:42am<br /><br />Hi Silvio,<DIV>&nbsp;</DIV><DIV>The query on server side:</DIV><DIV><PRE style="font-family: c&#111;nsolas;">	&#091;<SPAN style="color: rgb43, 145, 175;">Query</SPAN>&#093;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="color: blue;">public</SPAN>&nbsp;<SPAN style="color: rgb43, 145, 175;">IEnumerable</SPAN>&lt;<SPAN style="color: rgb43, 145, 175;">WebMarca</SPAN>&gt;&nbsp;WebFind(<SPAN style="color: blue;">string</SPAN>&#091;&#093;&nbsp;Codigo)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="color: rgb43, 145, 175;">List</SPAN>&lt;<SPAN style="color: rgb43, 145, 175;">WebMarca</SPAN>&gt;&nbsp;lista&nbsp;=&nbsp;<SPAN style="color: blue;">new</SPAN>&nbsp;<SPAN style="color: rgb43, 145, 175;">List</SPAN>&lt;<SPAN style="color: rgb43, 145, 175;">WebMarca</SPAN>&gt;();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lista.Add(ConvertToWeb(ClsPlural.Find(Codigo)));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="color: blue;">return</SPAN>&nbsp;lista;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial, Helvetica, sans-serif">The query call on client side:</FONT></PRE><PRE style="font-family: c&#111;nsolas;"><FONT face="Arial"><PRE style="font-family: c&#111;nsolas;"><FONT size="2"><SPAN style="color: blue;">	void</SPAN>&nbsp;MainPage_Loaded(<SPAN style="color: blue;">object</SPAN>&nbsp;sender,&nbsp;<SPAN style="color: rgb43, 145, 175;">RoutedEventArgs</SPAN>&nbsp;e)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="color: rgb43, 145, 175;">EntityQuery</SPAN>&lt;<SPAN style="color: rgb43, 145, 175;">WebMarca</SPAN>&gt;&nbsp;query&nbsp;=&nbsp;mgr.Find();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="color: blue;">string</SPAN>&#091;&#093;&nbsp;Codigos&nbsp;=&nbsp;<SPAN style="color: blue;">new</SPAN>&nbsp;<SPAN style="color: blue;">string</SPAN>&#091;&#093;&nbsp;{&nbsp;<SPAN style="color: rgb163, 21, 21;">"1"</SPAN>,&nbsp;<SPAN style="color: rgb163, 21, 21;">"aa"</SPAN>&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.AddParameter(Codigos);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mgr.ExecuteQueryAsync&lt;<SPAN style="color: rgb43, 145, 175;">WebMarca</SPAN>&gt;(query,&nbsp;ExecCompleted,&nbsp;<SPAN style="color: blue;">true</SPAN>);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</FONT></PRE></FONT></PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial"></FONT>&nbsp;</PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial">And the error:</FONT></PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial"><img src="uploads/979/erroArray.png" height="328" width="452" border="0" /></FONT></PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial"></FONT>&nbsp;</PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial">Regards,</FONT></PRE><PRE style="font-family: c&#111;nsolas;"><FONT size="2" face="Arial">Sérgio Magalhães</FONT></PRE></DIV>]]>
   </description>
   <pubDate>Mon, 15 Nov 2010 02:42:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9112#9112</guid>
  </item> 
  <item>
   <title>Serialization : Hi Sergio,  Can you show me...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9100#9100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2294<br /><strong>Posted:</strong> 12-Nov-2010 at 3:34pm<br /><br />Hi Sergio,<DIV>&nbsp;</DIV><DIV>Can you show me the snippet that is causing the issue?</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Fri, 12 Nov 2010 15:34:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9100#9100</guid>
  </item> 
  <item>
   <title>Serialization :   Good morning,I created a query...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9073#9073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=979" rel="nofollow">antonio_sergio</a><br /><strong>Subject:</strong> 2294<br /><strong>Posted:</strong> 11-Nov-2010 at 3:51am<br /><br /><SPAN id="result_" lang="en"><SPAN style="color: rgb0, 0, 0;" title="">Good morning,<BR></SPAN><SPAN title="">I created a query that takes as parameter an array of strings.<BR></SPAN><SPAN title="">When I try to run my application gives me the error below:<DIV>&nbsp;</DIV><DIV>There was an error while trying to serialize parameter <a href="http://ideablade.com/EntityModel:entityQuerySurrogate" target="_blank">http://ideablade.com/EntityModel:entityQuerySurrogate</A>. The InnerException message was 'Type 'System.String&#091;&#093;' with data contract name 'ArrayOfstring:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.&nbsp; Please see InnerException for more details.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><SPAN style="color: rgb0, 0, 0; : rgb230, 236, 249;" title="">When I put the attribute &#091;KnowType(typeof(string&#091;&#093;))&#093; in my class it gives me another error:</SPAN></DIV><DIV>&nbsp;</DIV><DIV>Type 'System.Collections.Generic.List`1&#091;System.String&#093;' cannot be added to list of known types since another type 'System.String&#091;&#093;' with the same data contract name 'http://schemas.microsoft.com/2003/10/Serialization/Arrays:ArrayOfstring' is already present.</DIV><DIV>&nbsp;</DIV><DIV><SPAN style="color: rgb0, 0, 0; : rgb230, 236, 249;" title="">What am I doing wrong??</SPAN></DIV><DIV><SPAN style="color: rgb0, 0, 0; : rgb230, 236, 249;" title=""></SPAN>&nbsp;</DIV><DIV><SPAN style="color: rgb0, 0, 0; : rgb230, 236, 249;" title="">Regards,</SPAN></DIV><DIV><SPAN style="color: rgb0, 0, 0; : rgb230, 236, 249;" title="">Sérgio Magalhães</SPAN></DIV><DIV>&nbsp;</DIV></SPAN></SPAN>]]>
   </description>
   <pubDate>Thu, 11 Nov 2010 03:51:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2294&amp;PID=9073#9073</guid>
  </item> 
 </channel>
</rss>