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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:41:08+00:00 2026-06-02T11:41:08+00:00

I have written a simple WebMethod in a back end webservice. I am using

  • 0

I have written a simple WebMethod in a back end webservice. I am using this as a service reference in both a WPF application and a Silverlight application.

The method returns a List<string> called userList. This works fine in the WPF application, where I reference the Service1SoapClient as ‘client’. There fore call the method by –

client.userlist(); //this is the case in WPF app

However in Silverlight the only option is

client.userListAsync(); //Silverlight

This works fine in WPF and brings back the desired list, however Silverlight brings back the error –

Error   11  Cannot implicitly convert type 'void' to 'System.Collections.Generic.List<string>'  

Also in relation to this, in the WPF app I am appending text withing a richTextBox with the userList, which works, however in Silverlight richTextBox1.AppendText is not a valid option.

Where am I going wrong in the Silverlight App?

  • 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-02T11:41:09+00:00Added an answer on June 2, 2026 at 11:41 am

    All web service calls in Silverlight are asynchronous, meaning that you can’t make your application block execution while it waits for the result to come back. Instead you tell Silverlight what to do when it gets the result and let it carry on with its own business until then.

    Your Silverlight app’s web service client requires you to pass it an event handler which will take the web method’s return value as a xxxCompletedEventArgs parameter, where “xxx” is the name of your web method.

    This page: http://msdn.microsoft.com/en-us/library/cc197937(v=vs.95).aspx tells you how to set up your event handler and use it to process the output of a web service call.

    From the page:

        proxy.GetUserCompleted += new EventHandler<GetUserCompletedEventArgs (proxy_GetUserCompleted);
        proxy.GetUserAsync(1);
        //...
    }
    
    //...
    
    void proxy_CountUsersCompleted(object sender, CountUsersCompletedEventArgs e)
    {
        if (e.Error != null)
        {
            userCountResult.Text = “Error getting the number of users.”; 
        }
        else
        {
            userCountResult.Text = "Number of users: " + e.Result;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simple WPF application in which I wanted to test the
I have written a simple erlang app using gen_server. When starting it with application:start(myapp),
I have written a simple test application using asp.net mvc with C#. The application
I have written a simple facebook application using PHP SDK. Application works well but
I have written a simple WCF service that accepts and stores messages. It works
I have written a simple application that displays a list of candidates for a
I have written a simple feedback application in django. It's not particulairly complex, basically
I have written a simple WCF web service in C# which returns records from
I have written a simple code using getopt for understanding perspective. #include <stdio.h> #include
I have written this simple C program that changes the rotation file name. Eg:

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.