70-503)  Exam

Exam # of questions Description  Update
70-503) 142 MS.NET Framework 3.5, Windows Communication Founda... 02/15/2011
[Practice Test]    [Download Study Guide(PDF)]   [Update Exam]

70-503) - Exam Information
  • Description: MS.NET Framework 3.5, Windows Communication Foundation Application
  • Passing Score: 0%
  • Practice Test - Number of questions: 142 questions
  • Simulation Test - Number of questions: 142 questions
  • Simulation Test Duration: 120 minutes
  • Has explanations: No

Question of the day

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You create the following service contract. [ServiceContract] public interface IMyService { [OperationContract] void DoSomething(); } The service will not use any external resources. You need to ensure that the calls to the DoSomething operation are thread-safe. What are the two possible service implementations that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Answer(s)

  1. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,InstanceContextMode=InstanceContextMode.Single)]public class ServiceImpl : IMyService{public voidDoSomething() { }}
  2. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single,InstanceContextMode=InstanceContextMode.Single)]public class ServiceImpl : IMyService{public voidDoSomething() { }}
  3. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,InstanceContextMode=InstanceContextMode.PerSession)]public class ServiceImpl : IMyService{public void
  4. { }}D. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,InstanceContextMode=InstanceContextMode.PerCall)]public class ServiceImpl : IMyService{public voidDoSomething() { }}
Correct Answer

[ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single,InstanceContextMode=InstanceContextMode.Single)]public class ServiceImpl : IMyService{public voidDoSomething() { }}

{ }}D. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Multiple,InstanceContextMode=InstanceContextMode.PerCall)]public class ServiceImpl : IMyService{public voidDoSomething() { }}