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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:12:44+00:00 2026-06-08T00:12:44+00:00

tl;dr For this question, the answer is supposed to be AB . A I

  • 0

tl;dr

For this question, the answer is supposed to be AB. A I can understand but I can’t find any information about a standalone CreateChannnel method like it’s used in B

Can anyone explain why answer B is considered correct or is it not correct and I’m better of ditching these practice exams alltogether?


Background

I am trying to learn WCF using some practice exams. I have already encountered several questions where I’m not sure that the given answer is the correct one.

The following question, besides the obvious spelling mistakes (intetface INameService) is seriously adding to my doubts.

The question goes like this

QUESTION 21

A Windows Communication Foundation (WCF) solution uses the following
contracts. (Line numbers are included for reference only.)

01 [ServiceContract(CallbackContract=typeof(INameService))]   
02 public interface IGreetingService   
03 {   
04  [OperationContract]   
05  string GetMessage();  
06 }  
07  
08 [ServiceContract]
09 public intetface INameService 
10 { 
11  [OperationContract] 
12  string GetName(); 
13 }

When the client calls GetMessage on the service intetface, the service
calls GetName on the client callback. In the client, the class
NameService implements the callback contract.The client channel is created as follows:

22 InstanceContext callbackContext = new Instance Context(new NameService("client"));  
23  
24  
25 DuplexChannelFactory <IGreetingService> factory = 
    new DuplexChannelFactory<IGreetingServices>(typeof(NameService),binding,address);  
26 IGreetingService greetingService = factory.CreateChannel();  

You need to ensure that the senvice callback is processed by the
instance of NameService. What are two possible ways to achieve this
goal? (Each correct answer presents a complete solution. Choose two.)

and I can choose from following answers

A.Change line 25 to the following code segment:
DuplexChannelFactory factory = new
DuplexChannelFactory(callbackContext, binding,
address);

B.Change line 26 to the following code segment: IGreetingService
greetingServicefactory = CreateChannel(callbackContext);

C.Add the following code segment after line 26:
callbackContextIncomingChannelsAdd((IDuplexChannel)greetingService)

D.Add the following code segment after line 26:
callbackContext.OutgoingChannels.Add((IDuplexChannel)greetingService)

For this question, the answer is supposed to be AB. A I can understand but I can’t find any information about a standalone CreateChannnel method like it’s used in B

Can anyone explain why answer B is considered correct or is it not correct and I’m better of ditching these practice exams alltogether?

  • 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-08T00:12:46+00:00Added an answer on June 8, 2026 at 12:12 am

    The answer B is a misprint. It should read:

    IGreetingService greetingService = factory.CreateChannel(callbackContext); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is a basic question, but I can't seem to find an
I've been looking for an answer to this question but I could find none
I read this question but the answer does not perform a refactoring of the
Also can you please answer this question? how do I get co-ordinates of selected
In discussion about my answer to this question , there was some disagreement over
All, This question probably has a very simple answer - something I'm overlooking. But
I've look at the questions on here but can't find an answer that specifically
I am trying to integrated linkedIn using this question answer Posting LinkedIn message from
Following this question and answer , I still have a bit trouble in the
This question and my answer below are mainly in response to an area of

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.