<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.lhotka.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>CSLA .NET discussion</title><link>http://forums.lhotka.net/forums/5.aspx</link><description>General discussion about CSLA .NET</description><dc:language /><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52765.aspx</link><pubDate>Wed, 16 May 2012 15:49:06 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52765</guid><dc:creator>mtrtm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52765.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52765</wfw:commentRss><description>&lt;p&gt;Hi Jonny,&lt;/p&gt;
&lt;p&gt;Thanks so much, if I change the namespace of my .Sl project to match that error goes away.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52757.aspx</link><pubDate>Wed, 16 May 2012 07:43:41 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52757</guid><dc:creator>JonnyBee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52757.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52757</wfw:commentRss><description>&lt;p&gt;The fully qualified name transferred on the wire and used on the server by the deserializer to create instances of classes contain&lt;/p&gt;
&lt;p&gt;&amp;quot;Namespace.Classname, AssemblyName&amp;quot;&lt;/p&gt;
&lt;p&gt;Which is why both namespace and &amp;nbsp;assembly name must be identical on both runtimes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For more info read about AssemblyQualifiedName:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.95).aspx"&gt;http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.95).aspx&lt;/a&gt;&amp;nbsp;&amp;nbsp; and&lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx" href="http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx"&gt;http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52756.aspx</link><pubDate>Wed, 16 May 2012 07:14:44 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52756</guid><dc:creator>Gary Oak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52756.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52756</wfw:commentRss><description>&lt;p&gt;But why is name should be identical??? I mean we can import the required namespaces.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52751.aspx</link><pubDate>Wed, 16 May 2012 03:39:49 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52751</guid><dc:creator>JonnyBee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52751.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52751</wfw:commentRss><description>&lt;p&gt;Quite simply:&lt;/p&gt;
&lt;p&gt;.NET:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyProject.Library.dll&lt;br /&gt;SL:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyProject.Library.dll&lt;/p&gt;
&lt;p&gt;The name must be the same in both Net and SL. &lt;br /&gt;I assume that your SL assembly name is now MyProject.Library.SL...dll&lt;/p&gt;
&lt;p&gt;You must change the assembly name in &amp;quot;Project - Properties&amp;quot; on the SL project to be the same as the .Net project.&lt;/p&gt;
&lt;p&gt;If you look at the CSLA source source and assemblies you should see that CSLA has&lt;/p&gt;
&lt;p&gt;.NET :&amp;nbsp;&amp;nbsp;&amp;nbsp; Csla.dll&lt;br /&gt;SL:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Csla.dll&lt;/p&gt;
&lt;p&gt;And in the source the SL project name is Csla.Silverlight and the assemly name in the project properties is just Csla - telling the C# compiler that the compiled assembly should be named Csla.dll.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/f0c12ze9.aspx"&gt;How to: Change an Assembly Name (Visual Basic, C#)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52750.aspx</link><pubDate>Tue, 15 May 2012 23:51:31 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52750</guid><dc:creator>mtrtm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52750.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52750</wfw:commentRss><description>&lt;p&gt;I have also tried deleting the .Sl project and linking the cs file directly in the Silverlight UI project (MyProject).&amp;nbsp; The only change I see with this is that instead the error contains the namespace is MyProject, not MyProject.Library.Sl.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52749.aspx</link><pubDate>Tue, 15 May 2012 23:41:49 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52749</guid><dc:creator>mtrtm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52749.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52749</wfw:commentRss><description>&lt;p&gt;Hi Jonny, thanks for the response but I&amp;#39;m not sure what assembly name you are talking about.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The example projects for CSLA always seem to have a &amp;quot;MyProject.Sl&amp;quot; or a &amp;quot;MyProject.Client&amp;quot; silverlight class library project that contains no code at all, just links to the mobile objects (.cs files, in my example MyMobileObjItem.cs).&amp;nbsp; So MyMobileObjItem.cs lives in MyProject.Library, and is added as an existing link in MyProject.Library.Sl project.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;In the example projects, this .Sl project is referenced by the Silverlight UI and the example projects all work, so I am not sure what I am doing different.&lt;/p&gt;
&lt;p&gt;I never define a namespace of &amp;quot;MyProject.Library.Sl&amp;quot; anywhere - its just an empty project that links files. The classes in this project do NOT have that namespace, they don&amp;#39;t even live in that project and since they are links their namespace in unchanged and the same in both projects.&lt;/p&gt;
&lt;p&gt;Can you elaborate on what I am doing wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52748.aspx</link><pubDate>Tue, 15 May 2012 22:39:09 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52748</guid><dc:creator>JonnyBee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52748.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52748</wfw:commentRss><description>&lt;p&gt;The assembly names and namespaces for Net and SL must be identical for serialization to work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So if your Net assembly is called MyProject.Library the that must also be the name of the SL library., not MyProject.Library.Sl...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Silverlight and CSLA - exception due to server referencing client namespace during fetch!?</title><link>http://forums.lhotka.net/forums/thread/52747.aspx</link><pubDate>Tue, 15 May 2012 22:23:17 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:52747</guid><dc:creator>mtrtm</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/52747.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=52747</wfw:commentRss><description>&lt;p&gt;I have a .Net 4 solution using Silverlight 5 and CSLA 4.3.&amp;nbsp; The included projects:&lt;br /&gt;&lt;br /&gt;- MyProject (silverlight project that contains silverlight screens)&lt;br /&gt;- MyProject.Web (WCF project)&lt;br /&gt;- Library (contains csla business objects. Referenced only by MyProject.Web)&lt;br /&gt;- Library.Sl (contains links to existing business objects in Library. Referenced only by MyProject)&lt;br /&gt;&lt;br /&gt;I have configured the silverlight UI project (MyProject) to point to a WCF Portal/host via a service on the WCF Project (MyProject.Web).&amp;nbsp; I can browse the service by finding the .svc file, right clicking -&amp;gt; view in Browser.&lt;br /&gt;&lt;br /&gt;When the silverlight page loads up, I run the following code:&lt;br /&gt;&lt;br /&gt;DataPortal&amp;lt;MyMobileObjItem&amp;gt; dp = new DataPortal&amp;lt;MyMobileObjItem&amp;gt;();&lt;br /&gt;dp.FetchCompleted += HandleReturnedArgs;&lt;br /&gt;dp.BeginFetch();&lt;br /&gt;&lt;br /&gt;When this code runs, I am getting the following error in the callback EventArgs: System.InvalidOperationException: Object type or assembly could not be loaded (MyProject.Library.MyMobileObjItem, MyProject.Library.Sl...&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t understand why the error on the server has the &amp;quot;MyProject.Library.Sl&amp;quot; namespace in the error.&amp;nbsp; The only place that namespace exists is in the project reference for the silverlight project, and this error is coming from the server!?&lt;br /&gt;&lt;br /&gt;I downloaded the CSLA source so I could step through and see that the Csla.Server.Hosts.Silverlight.WcfPortal.Fetch() method is passed a criteria object with a TypeName of MyProject.Library.MyMobileObjItem, MyProject.Library.Sl...&lt;br /&gt;&lt;br /&gt;Again, why is this receiving the silverlight linked project namespace?&amp;nbsp; The MyMobileObjItem object that should be requested doesn&amp;#39;t include the &amp;quot;.Sl&amp;quot; namespace.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I am at the end of my rope - any help would be appreciated.&amp;nbsp; Thanks in advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>