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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:12:29+00:00 2026-06-18T09:12:29+00:00

We are calling WCF services asyncronously. public partial class ServiceClient : System.ServiceModel.ClientBase<MyService>, MyService {

  • 0

We are calling WCF services asyncronously.

public partial class ServiceClient : System.ServiceModel.ClientBase<MyService>, MyService 
{
    ......
}

ServiceClient _serviceclient;
void Getproducts(string filter, string augument, EventHandler<GetCompletedEventArgs> callback)
{
    _serviceclient.GetAsyncGetproducts(filter, argument, callback);
}

I want to the Getproducts function to be synchronous. What is the best way to achieve this like the following

void Getproducts(string filter, string augument, EventHandler<GetCompletedEventArgs> callback)
{
    _serviceclient.GetAsyncGetproducts(filter, argument, callback);
    //wait until callback comes back and return
}

EDIT: The proxy is providing any synchronous calls

  • 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-18T09:12:30+00:00Added an answer on June 18, 2026 at 9:12 am

    You cannot make synchronous networking requests in Silverlight from the UI thread. There’s no going around that. Even if you try to trick the asynchronous methods into behaving synchronously, it will not work. That’s because if that were possible, the UI thread would be blocked, and the application would appear to be frozen. This happens because the responses to networking requests in SL are always delivered to the UI thread; if you wait for it on the UI thread itself, then you create a deadlock.

    You essentially have two options: the preferred one is to actually go the asynchronous route. It’s hard at first, if you’re only used to synchronous programming, but it’s a very valuable skill to have. The other option is to make the call on a background thread. I’ve tried it and it works, and some people have blogged about it, so you can try it as well. But AFAIK it’s not officially supported.

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

Sidebar

Related Questions

When calling a WCF web service from a C# client (instance of System.ServiceModel.ClientBase<>) how
I am using calling web services and using WCF generated service-reference on the client.
I am going to be coming up with a design for calling WCF services
I'm building Silverlight applicaitions using Prism and MVVM. When calling WCF services on your
I'm a noob to calling WCF web services, so am hoping this is an
I have a few WCF services I am calling from a console app. I
In the past, I have had experience calling WCF services or ASMX services, you
I use the ASP.Net ScriptManager to load the scripts needed for calling WCF services
We have an MVC website that was calling through to WCF Restful services but
I'm developing WCF RESTful Services and looking for a testing tool/invoker for calling these

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.