Microsoft TS: Microsoft .NET Framework 3.5 C Windows Communication Foundation Sample Questions:
1. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment.
You need to ensure that when the MyMethod method is called, the service is the root of a transaction.
Which code segment should you insert at line 08?
A) <OperationBehavior(TransactionScopeRequired:=False)> _ <TransactionFlow(TransactionFlowOption.Mandatory)> _
B) <OperationBehavior(TransactionScopeRequired:=True)> _ <TransactionFlow(TransactionFlowOption.NotAllowed)> _
C) <OperationBehavior(TransactionScopeRequired:=False)> _ <TransactionFlow(TransactionFlowOption.NotAllowed)> _
D) <OperationBehavior(TransactionScopeRequired:=True)> _ <TransactionFlow(TransactionFlowOption.Allowed)> _
2. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service contains the following code segment.
You need to ensure that the service instance is recycled when the transaction is complete.
Which line of code should you insert at line 07?
A) [ServiceBehavior(ReleaseServiceInstanceOnTransactionComplete= true. ConcurrencyMode=ConcurrencyMode.Single)]
B) [ServiceBehavior(ReleaseServiceInstanceOnTransactionComplete= true. ConcurrencyMode=ConcurrencyMode.MultipleJ]
C) [ServiceBehavior(ReleaseServiceInstanceOnTransactionComplete= true. ConcurrencyMode=ConcurrencyMode.Multiple, TransactionAutoCompleteOnSessionClose=true)]
D) [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single, Transact ionAutoCompleteOnSess ionClose=true)]
3. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment.
You need to ensure that concurrent calls are allowed on the service instance.
Which code segment should you insert at line 06?
A) <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Reentrant, _ ReleaseServicelnstanceOnTransactionComplete:=True)> _
B) <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, _ ReleaseServicelnstanceOnTransactionComplete:=True)> _
C) <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Reentrant, _ ReleaseServicelnstanceOnTransactionComplete:=False)> _
D) <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple, _ ReleaseServicelnstanceOnTransactionComplete:=False)> _
4. You are creating a client application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application.
The client application uses a Personal Information Card to provide authentication information to the WCF server. You write the following code fragment. (Line numbers are included for reference only.)
You need to ensure that one of the claims in the Personal Information Card contains an e-mail address.
Which code fragment should you insert at line 05?
A) Option B
B) Option D
C) Option A
D) Option C
5. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You create the following service definition
[ServiceContract(SessionMode=SessionMode.Required)] public interface IMyService {
... }
You need to custom manage the lifetime of the session.
Which service implementation should you use?
A) [ServiceBehavior(AutomaticSessionShutdown=false)] public class serviceImpl { ... }
B) [ServiceBehavior(AutomaticSessionShutdown=true)]
public class serviceImpl
{
...
}
C) [ServiceBehavior(UseSynchronizationContext=true)] public class serviceImpl { ... }
D) [ServiceBehavior(UseSynchronizationContext=false)] public class serviceImpl { ... }
Solutions:
| Question # 1 Answer: C | Question # 2 Answer: D | Question # 3 Answer: D | Question # 4 Answer: D | Question # 5 Answer: A |
We're so confident of our products that we provide no hassle product exchange.


By Tracy

