Microsoft TS: Microsoft .NET Framework 3.5 C Windows Communication Foundation Sample Questions:
1. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You set the logKnownPii attribute to true for the only trace source in the app.config file. You discover that the personal identifiable information (PII) is not logged.
You need to ensure that the PII is logged.
What should you do?
A) Set the enableLoggingKnownPii attribute to true in the machine.config file.
B) Disable encryption of the AppSettings element in the web.config file.
C) Set the enableLoggingKnownPii attribute to true in the app.config file.
D) Set the logKnownPii attribute to true in the web.config file.
2. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully created two interfaces: IMyService and IMyServiceClient.
You need to ensure that the service is able to call methods from the client application by using the IMyServiceClient interface.
Which code segment should you use?
A) Option B
B) Option D
C) Option A
D) Option C
3. 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?
A) foreach (Claim c in
cs.FindClaims("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
"PossessProperty"))
return IsEmailValid(c.Resource.ToString());
B) foreach (Claim c in
cs.FindClaims("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
String.Empty))
return IsEmailValid(c.Resource.ToString());
C) foreach (Claim c in
cs.FindClaims("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
Rights.Identity))
return IsEmailValid(c.Resource.ToString());
D) foreach (Claim c in
cs.FindClaims("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
Rights.PossessProperty))
return IsEmailValid(c.Resource.ToString());
4. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. The service contains the following code segment.
Client applications pass an instance of the Customer class to the service.
You create a new version of the data contract and replace the Name property with the FirstName property. You need to ensure that the existing client applications can continue to consume the
service without modifying their code. Which code segment should you use?

A) Option B
B) Option D
C) Option A
D) Option C
5. You are creating a distributed application with Windows Communication Foundation by using Microsoft .NET Framework 3.5.
The distributed application topology includes client applications, routers, and services. Communication between the client applications and the services require authentication, confidentiality, and integrity.
You need to ensure that routers are not able to read the contents of the messages. You must achieve this goal without customizing the binding configuration.
Which binding should you use?
A) WSHttpBinding
B) NetNamedPipeBinding
C) NetTcpBinding
D) NetPeerTcpBinding
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: C | Question # 3 Answer: D | Question # 4 Answer: C | Question # 5 Answer: A |
We're so confident of our products that we provide no hassle product exchange.


By Wayne

