1.
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5.
The service will be hosted in a Console application. You need to Configure the service by using a configuration file other than the default app.config file
Which code segment should you use?
2.
You create a Windows Communication Foundation (WCF) service by using Microsoft
.NET Framework 3.5.
The WCF service accepts service requests from different partner applications.
One of the partner applications occasionally receives faults.
You need to identify why the service is generating faults.
You must accomplish this goal without interrupting the service.
What should you do?
3.
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.)
01
02
03
04
05
06

07

06

09

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?
4.
You are creating a Windows Communication Foundation client application by using Microsoft .NET Framework 3.5.
The client application consumes the Web Services Enhancements (WSE) 3.0 Web
service.
The Web service uses standard WSE 3.0 to transfer binary data to the client application.
The client application uses the following binding configuration.
(Line numbers are included for reference only.)
01
02
03
04 >
05

06

You need to ensure that the client application receives binary data from the WSE
3.0 Web service.
Which code fragment should you insert at line 03?
5.
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service will be hosted on a Web server.
You need to ensure that the service is able to access the current HttpContext instance.
Which configuration settings and attribute should you use?
6.
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service will contain an enumeration named OrderState.
The OrderState enumeration will contain the following four values: Processing,
Cancelled, Confirmed, Closed.
The client application must be able to set the state of an Order entity to only the following two values: Cancelled, Closed.
You need to create the data contract for OrderState.
Which code segment should you use?
7.
You create a service by using Microsoft .NET Framework 3.5. You use Windows
Communication Foundation to create the service.
You use the WSHttpBinding binding to prevent tampering of the data. Users report that the data is unreadable.
You need to troubleshoot the problem by logging the incoming messages. Which code fragment should you use?

 
8.
You are creating a Windows Communication Foundation (WCF) client application by using Microsoft .NET Framework 3.5.
The proxy generated for the WCF service results in the following code segment.
[ServiceContract(CallbackContract=typeOf(IStoreCallback))]
public interface IStore
{
[OperationContract(IsOneWay=true)]
void CheckAvailableProducts();
}
public interface IStoreCallback{ }
To implement a callback interface, you create the following class in the client
application.
public class StoreCallback: IStoreCallback{ }
The client application receives notifications from the service through the
callback interface.
You write the following code segment for the client application to use the
generated proxy.
(Line numbers are included for reference only.)
01
02 client.CheckAvailableProducts();
You need to set up duplex communication between the client application and the WCF service.
Which code segment should you insert at line 01?
9.
You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The client applications are unable to use SSL.
You need to ensure that clients authenticate by using a token provided by a
Security Token service (STS).
What should you do?
10.
You are creating a Windows Communication Foundation (WCF) service by using
Microsoft .NET Framework 3.5.
The service will authenticate the client applications by using Personal Information Cards.
You write the following code segment. (Line numbers are included for reference
only.)
01 public class CustomServiceAuthorizationManager:
02 ServiceAuthorizationManager{
03 protected override bool CheckAccessCore(OperationContext operationContext)
04 {
05 string action =
operationContext.RequestContext.RequestMessage.Headers.Action;
06 if (action == "http://tempuri.org/lEnginefUpdate")
07 {
06 foreach (ClaimSet cs in
operationContext.ServiceSecurityContext.AuthorizationContext.ClaimSets)
09 {
10
11
12 return false;
13 }
14 return true;
15 }
16 } ...
17 bool IsEmailValid(string email)
18 {
19 //e-mail validation is performed here;
20 return true;
21 }
You need to ensure that only those client applications that provide a valid email address can execute the Update method.
Which code segment should you insert at line 10?