Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7983667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:01:49+00:00 2026-06-04T11:01:49+00:00

I am new to Silverlight and CSLA and I need to get an example

  • 0

I am new to Silverlight and CSLA and I need to get an example project working. I have both Lhotka’s 2008 book on CSLA, as well as the Silverlight ebook + example project it comes with.

I thought it would be fairly simple to create a Silverlight 5 MVVM Light project that grabs a CSLA 4.3 object through the Data Portal (data portal/channel adapter configured to use WCF) but can’t get a CSLA object back from the Server.

NOTE: If I take CSLA out of the equation and just use Linq to SQL or Entity Framework and a WCF RIA Service call I can grab objects from the server and display them in silverlight just fine, but as I can’t use that on this project I must get CSLA to work.

My steps:

  1. Created a Silverlight Business Application – get a MyProject (SL) and a MyProject.Web (WCF)
  2. Added a service to the .Web project

    <% @ServiceHost Service=”Csla.Server.Hosts.Silverlight.WcfPortal” %>
    .

  3. Referenced the Service in my App.xaml Application_Startup method in the SL project

    Csla.DataPortalClient.WcfProxy.DefaultUrl = “http://localhost:14790/Services/MyTestCslaSilverlightWcfService.svc&#8221;;
    .

  4. Added a simple CSLA Business layer project (MyProject.CSLA) that has one set of test objects (MyMobileObjItem.cs, MyMobileObjItemList.cs)

  5. Added two more projects (MyProject.CSLA.Client and MyProject.CSLA.Server). The .Client project is a Silverlight class library, the .Server is a class library. I then linked all my CSLA objects (add existing reference, add as link) plus all necessary references (csla/csla silverlight dlls). On MyProject I add a reference the .Client project and on MyProject.Web I add a reference to the .Server project.

  6. Now I should have a working project, and want to get an item or a list of items back from the server. In my main ViewModel in the constructor I have tried two different things. When I use

    MyMobileObjItemList.GetAllAsync(HandleReturnedArgs);

the callback method EventArgs have an error “System.IO.FileNotFoundException: Could not load file or assembly “MyProject.CSLA.Client”. I find this weird since the Silverlight app has a reference to this project, and the MyProject.Web shouldn’t need the .Client reference since it has the .Server reference.

When I use

DataPortal<MyMobileObjItemList> dp = new DataPortal<MyMobileObjItemList>();
dp.FetchCompleted += HandleReturnedArgs;
dp.BeginFetch();

the callback method EventArgs have an error “System.InvalidOperationException: Object type or assembly could not be loaded (MyProject.CSLA.MyMobileObjItemList, MyProject.CSLA.Client”.

I am not sure where either of these errors are happening (on the client or server?) Since it is a Csla.DataPortalException I assume it is a server error.

I am not sure how to do a simple call or if this is the correct way of going about things as all the examples I can find don’t do it this way and seem unclear to me.

I know this is a lot of pieces to fit together and it may be hard to concisely give an answer, but I really would appreciate help (code, link to download example etc.)

QUESTIONS:

  1. Is there a simple example of Silverlight MVVM Light project that calls a remote data portal that grabs object(s) along with documentation of how to get it to work/how all pieces fit together? Again, I have the ebook Silverlight project, but that uses bxf and most of the data portal references the book has just says to see the other ebook on data portals (which I don’t have – I would buy it but the site takes a couple days to allow access to the pdf. Really poor site). OR
  2. Can someone explain what I am doing wrong?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:01:51+00:00Added an answer on June 4, 2026 at 11:01 am

    To fix the error error I changed the assembly and default namespaces for my .Client and .Server projects to exactly match the .CSLA project (set in project properties)

    See this forum discussion for more info

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem in this scenario: 1-I made a new silverlight project with
We're starting a new Silverlight project on Caliburn.Micro. We need to log every user
I am creating a new Silverlight project in Visual Studio 2008 Sp1. Further creating
I'm starting a new Silverlight project at the moment, and I'm having issues where
I have created a new silverlight business application in visual studio. It auto generates
I am new to Silverlight and have decided to give it a go. I
I'm using the new Silverlight 4 support for IDataErrorInfo. So I have a POCO
When I create a new Silverlight project in Visual Studio it creates a new
i started off with a new silverlight 4 project in a seperate solution while
I'm starting up a brand new project using VS2010 and Silverlight 4. This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.