70-513 Exam New Question
Hi
Recently i came across that 70-513 (WCF) . introduced new question for Exam and find some question :
Hi
recently I have give
the 70-513 Exam in that I found
these question :
You are creating a Windows Communication
Foundation (WCF) service based on
WSHttpBinding.
New audit requirements dictate that
callers must be authenticated on every call to ensure that
their credentials have not been revoked.
You need to ensure that the service will
not cache the security request token. What should you
do?
A. Apply a ServiceBehavior attribute to
the service implementation class with the
lnstanceContextMode property set to
Single.
B. In the message security configuration,
change clientCredentialType from lssuedToken to
UserName
C. In the message security configuration,
set establishSecurityContext to false.
D. At the end of every operation, call the
SessionStateUtility.RaiseSessionEnd method.
Correct Answer: C
You are creating a Windows Communication
Foundation (WCF) service that is implemented as
follows.
01 [ServiceContract]
02
[ServiceBehavior(IncludeExceptionDetailsInFaults = true)]
03 public class OrderService
04 {
05 [OperationContract]
06 public void SubmitOrder(Order anOrder)
07 {
08 try
09 {
10 …
11 }
12 catch(DivideByZeroException ex)
13 {
14 …
15 }
16 }
17 }
You need to ensure that the stack trace
details of the exception are not included in the error
information sent to the client. What
should you do?
A. Replace line 14 with the following
line: throw;
B. Replace line 14 with the following
line:
throw new
FaultException<Order>(anOrder, ex.ToString());
C. After line 05, add the following line:
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line:
throw ex;
D. Alter line 05, add the following line:
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line:
throw new
FaultException<Order>(anOrder, “Divide by zero exception”);
Correct Answer: D
A
WCF service code is implemented as follows. (Line numbers are included for
reference only.)
01
[ServiceContract]
02
[ServiceBehavior(InstanceContextMode =
03
InstanceConcextMode.Single)]
04
public class CalculatorService
05
{
06
[OperacionContract]
07
public double Calculate(double opl, string op, double op2)
08
{
…
24
}
25
}
You
need to decrease the response time of the service.
What
are two possible ways to achieve this goal? (Each correct answer presents a
complete solution. Choose two
A.
Change the service behavior to the following: [ServiceBehavior(
InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode =
ConcurrencyMode.Multiple) ] B. Change the service behavior to the following:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall) ] C.
Require the clients use threads, the Parallel Task Library, or other mechanism
to issue service calls in parallel. D. Require the clients to use async
operations when calling the service.
Correct
Answer: AB
A
Windows Communication Foundation (WCF) service implements the following
contract. (Line numbers are included for reference only.)
01
[ServiceContract]
02
public interface IDataAccessService
03
{
04
[OperationContract]
05
void PutMessage(string message);
06
07
[OperationContract]
08
[FaultContract(typeof(TimeoutFaultException)) ]
09
[FaultContract(typeof(FaultException) ) ]
10
stringf] SearchMessages(string search);
11
}
The
implementation of the SearchMessages method throws TimeoutFaultException
exceptions for database timeouts. The implementation of the SearchMessages
method also throws an Exception for any other issue it encounters while
processing the request. These exceptions are received on the client side as
generic FaultException exceptions.
You
need to implement the error handling code for SearchMessages and create a new
channel on the client only if the channel faults. What should you do? A. Catch
and handle both TimeoutFaultException and FaultException B. Catch both
TimeoutFaultException and FaultException. Create a new channel in both cases.
C. Catch and handle TimeoutFaultException.Catch FaultException and create a new
channel. D. Catch and handle FaultException.Catch TimeoutFaultException and
create a new channel.
Correct
Answer: C
You
need to modify a client application that consumes a Windows Communication
Foundation (WCF) service. The service metadata is no longer available. You need
to modify the previously generated proxy to include asynchronous calls to the
service. What should you do? A. Update the service reference with the Generate
asynchronous operations option. B. Create a partial class for the previously
generated proxy and include the new asynchronous methods. C. Create a class
with the same name as the previously generated proxy and add the new
asynchronous methods. Add the new class to a namespace that is different from
the original proxy. D. Create a class with the same name as the previously
generated proxy and add the new asynchronous methods as partial methods. Add
the new class to a namespace that is different from the original proxy.
Correct
Answer: B
You
are debugging a Windows Communication Foundation (WCF) service. The service
uses signed and encrypted messages. You need to configure logging so that you
can read the contents of the messages. What should you do?
A.
Set maxSizeMessagesToLog to 10
B.
Set logMessageAtServiceLevel to true.
C.
Set maxMessagesToLog to 10.
D.
Set logMessageAtTransportLevel to true.
Correct
Answer: B
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home