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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:56:05+00:00 2026-05-15T22:56:05+00:00

Can someone tell my why when I have wcf contract: [ServiceContract] public interface IService1

  • 0

Can someone tell my why when I have wcf contract:

    [ServiceContract]
public interface IService1
{
    [OperationContract]
    string TestGetName();
}

and implementation

 public string TestGetName()
    {
        return "Kasia";
    }

When I try consume it in Console app I can do just that:

    Service1Client client = new Service1Client();
    Console.WriteLine((client.TestGetName()));

but in Silverlight I must use that way :

            Service1Client clientTest = new Service1Client();
            clientTest.TestGetNameCompleted += new EventHandler<TestGetNameCompletedEventArgs>(clientTest_TestGetNameCompleted);
            clientTest.TestGetNameAsync();
    void clientTest_TestGetNameCompleted(object sender, TestGetNameCompletedEventArgs e)
    {
            this.dataGridChild.DataContext = e.Result;

    }

Why in SL I don’t see this first short solution, but only this with Event handlers?
Or better… why in Console app I can choose synchro operation generation and in SL I must use Generate asynchronous operations… :/

  • 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-15T22:56:06+00:00Added an answer on May 15, 2026 at 10:56 pm

    A synchronous call would stop the Silverlight UI thread and possibly the executing environment, i.e. the browser. To prevent this, only asynchronous calls are allowed.

    Of course this is something unusual at first, but in the long run it is actually helpful to decouple the view and service layer.

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

Sidebar

Related Questions

I am working in C++. I have the following string: 2011-07-01T14:32:39.1846579+02:00 Can someone tell
I have a string in the format MM/DD/YYYY. Can someone tell me how to
Can someone tell me how I can make the following output? I have a
Can someone tell me why is this happening? I have created a social networking
Can someone tell me whether MSMQ (using transactions) supports competing consumers? Basically, I have
I have developed a Jersey Resource class. Can someone please tell me how can
I have been playing with Expect/TCL today and I was hoping someone can tell
Can someone tell me what I have done wrong? I ran script/generate model CityZipMSA
Can someone tell me why this is not working right? I have these lines
Can someone tell me why I am getting undefined method print_hash() error? I have

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.