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 4125926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:56:00+00:00 2026-05-20T23:56:00+00:00

I have a Silverlight site with wcf ria services, this is just a test.

  • 0

I have a Silverlight site with wcf ria services, this is just a test.
The service is as follow

[EnableClientAccess()]
    public class PersonService : DomainService
    {
        [Invoke]
        public string[] GetPersonNames()
        {
            return new string[] { "abc", "cba", "ddd", "ttt" };
        }

        [Invoke]
        public string GetName()
        {
            return "teste";
        }

        [Invoke]
        public string Test(string str)
        {
            return str;
        }
    }

I have a xaml page where I call the service

SLRiaTest.Web.PersonContext person = new SLRiaTest.Web.PersonContext();

        public MainPage()
        {
            InitializeComponent();

            person.GetPersonNames(OnFinished,null);
        }

        private void OnFinished(InvokeOperation<string[]> obj)
        {
            var list = obj.Value;

        }

but the Value is always null and the break point that I have in the serice never gets hit. I search the internet high and low and can’t find anything that might tell me what I’m doing wrong, any help would be great, I’m desperate…. I suppose that I can use RIA service without entity framework right?

  • 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-05-20T23:56:01+00:00Added an answer on May 20, 2026 at 11:56 pm

    The details on what does and does not work for calls across the wire in RIA Services are complex. If you want a detailed answer on what is going on here, you’ll have better luck asking on the RIA Services forum

    However, you’re kind of going against the design of RIA Services. If you want to return a collection of objects, you should use Query instead of Invoke.

    [EnableClientAccess()]
    public class PersonService : DomainService
    {
        [Query]
        public IEnumerable<string> GetPersonNames()
        {
            return new string[] { "abc", "cba", "ddd", "ttt" };
        }
    }
    
    ...
    
        public MainPage()
        {
            InitializeComponent();
    
            person.Load(person.GetPersonNamesQuery(), OnFinished, null);
        }
    
        private void OnFinished(LoadOperation<IEnumerable<string>> obj)
        {
            var list = obj.Value;
        }
    

    I just did that off the top of my head so might have some minor errors. But that’s the general idea.

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

Sidebar

Related Questions

I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a Silverlight 2 application that is consuming a WCF service. As such,
I am developing a silverlight 3 application using WCF RIA services. I am using
I have a silverlight app (hosted at intranet.mydomain.net) and a WCF service at (webservices.mydomain.net)
Assume that I have Silverlight app doing a call to a WCF service: void
I have a Silverlight 4 application that uses WCF services on the same server
I have a Silverlight application that is built from a set of Silverlight class
I have a silverlight control which has a reference to a silverlight enabled wcf
I have a Silverlight application that communications with an ASP.NET backend through WCF. I
I have a Silverlight application in which I would like to call a WCF

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.