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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:40:10+00:00 2026-06-09T09:40:10+00:00

Briefly, Visual studio 2012 RC Silverlight 5 Application consumes Game WCF 4 Service hosted

  • 0

Briefly,

Visual studio 2012 RC Silverlight 5 Application consumes Game WCF 4 Service hosted in ASP.net 4 Application with ChannelFactory technique via Shared Portable Library .NET4/SL5 contains the iGame interface with Async CTP

Graph :
ASP.NET <= Class Library ( Game ) <= Portable Library ( iGame ) => Silverlight

Portable Library

[ServiceContract]
public interface iGame
{
    [OperationContract]
    Task<bool> Request ( string Key );
}

Class Library

[ServiceBehavior ( InstanceContextMode = InstanceContextMode . Single , ConcurrencyMode = ConcurrencyMode . Multiple , UseSynchronizationContext = true )]
public class Game : iGame
{
    public async Task<bool> Request ( string Key )
    {
        return await Task . Factory . StartNew ( ( ) => true );
    }
}

Silverlight

    private async void myButton_Click ( object sender , RoutedEventArgs e )
    {
        if ( await Messenger . Instance . Client . Request ( XXX . Text ) ) // Exception
            NavigationService . Navigate ( new Uri ( "/Views/YYY.xaml" , UriKind . Relative ) );
    }
  • Messenger is a Singleton Class initiating and storing my Client proxy via ChannelFactory.

System.InvalidOperationException: The contract 'iGame' contains synchronous operations, which are not supported in Silverlight. Split the operations into "Begin" and "End" parts and set the AsyncPattern property on the OperationContractAttribute to 'true'. Note that you do not have to make the same change on the server.
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)

What‘s wrong ? O_o

  • 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-09T09:40:11+00:00Added an answer on June 9, 2026 at 9:40 am

    On your client side, your iGame proxy is synchronous, and you’re using fake-asynchronous wrappers around it to pretend it’s asynchronous.

    You need an asynchronous proxy. You may be able to do this by having VS2012RC regenerate the proxy, or you may be able to use TaskWsdlImportExtension. I’m not sure if either solution will work in a portable library just yet.

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

Sidebar

Related Questions

Briefly, here's the scenario. I have an ASP.NET application using forms authentication and a
Is it possible to duplicate a line in Visual Studio 2005? I briefly had
Briefly: In Visual Studio 2008, the Debug menu has an Exceptions... option. When clicking
Can someone briefly explain to me the difference between Visual Studio's solution file (.sln)
Just moved to subversion...from visual studio. I love it already! Can someone briefly explain
I have a relatively large C#/WPF Visual Studio 2008 solution that I am trying
Basically, I know virtually nothing about C++ and have only programmed briefly in Visual
Can anyone briefly explain how to use the .NET folder type in Reddot, I
Can anyone explain me briefly what exactly is component programming in .NET and why
Whenever I save code while using Visual Studio 2005, an MS-DOS window fills the

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.