2014 Latest Pass4sure&Lead2pass Microsoft 70-513 Dumps (81-90)

QUESTION 81
You are developing a Windows Communication Foundation (WCF) service.
You enable message logging, trace listeners, activity propagation, and tracing on the trace sources.
You have the following code segment in the client application. (Line numbers are included for reference only.)
01     Guid multiCallActivityId = Guid.NewGuid();
02     TraceSource ts = new TraceSource(“Multicall”);
03     Trace.CorrelationManager.ActivityId = multiCallActivityId;
04

You encounter errors when your client application consumes the service.
You need to ensure that your client application can correlate tracing information with the service.
Which code segment should you add at line 04?

A.    ts.TraceEvent(TraceEvencType.Start, 0, “Calling first service”);
ts.TraceTransfer(100, “Transferring…”,  multiCallActivityId);

ts.TraceEvent(TraceEventType.Stop, 0, “Return from first service.”);

B.    Trace.CorrelationManager.StartLogicalOperation(“1”);

Trace.CorrelationManager.StopLogicalOperation();

C.    ts.TraceEvent(TraceEventType.Start, 0, “Calling first service”);
ts.TraceTransfer(100,  “Transferring…”, Guid.NewGuid());

ts.TraceEvent(TraceEventType.Stop, 0, “Return from first service.”);

D.    ts.TraceEvent(TraceEventType.Start, 0, “Calling first service”);
Trace.CorrelationManager.StartLogicalOperation(“1”);

ts.TraceEvent(TraceEventType.Stop, 0, “Return from first service.”);

Answer: C

QUESTION 82
You are developing a Windows Communication Foundation (WCF) service.
One of the service operations contains the following code.
private static int counter = 0;
[OperationContract]
public void IncrementCount()
{
counter++;
}
You need to set a service behavior that prevents two or more threads from incrementing the counter variable at the same time.
Which code segment should you use to set the service behavior?

A.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Single)]
B.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession,
ConcurrencyMode = ConcurrencyMode.Single)]
C.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
D.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Reentrant)]

Answer: B

QUESTION 83
You are developing a Windows Communication Foundation (WCF) service to provide shopping cart support. ASP.NET compatibility mode is not enabled. The shopping cart information must be retained across user visits to the store until the user explicitly empties the cart or submits the cart contents to order.
You need to implement the service as a DurableService.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Use basicHttpBinding for both the client application and the service.
B.    Create the persistence provider database and configure the persistenceProvider element of the service
behavior to point to that database.
C.    Use wsHttpContextBinding for both the client application and the service.
D.    In the method to add an item to the shopping cart, serialize the shopping cart contents after adding the
current item and storing it in a Session variable.

Answer: BC

QUESTION 84
A Windows Communication Foundation (WCF) service is deployed with netTcpBinding.
This service uses a duplex message exchange pattern.You are developing the next version of the WCF service.
You discover that your company’s hardware load balancer performs correctly only for WCF services that use HTTP.
You need to ensure that your service works with the load balancer. What should you do?

A.    Use basicHttpBinding.
B.    Create a custom binding that has the compositeDuplex, textMessageEncoding,
and namedPipeTransport binding elements in this order.
C.    Create a custom binding that has the compositeDuplex, textMessageEncoding,
and wsHttpTransport binding elements in this order.
D.    Use wsHttpBinding.

Answer: C

QUESTION 85
You are developing a Windows Communication Foundation (WCF) service that executes a long-running operation.
The service is accessed from your business applications in a server transaction in which the client does not participate.
You need to ensure that the transaction times out and aborts if the operation has not completed within 45 seconds.
What should you do?

A.    Set the service binding sendTimeout attribute to 00:00:45.
B.    Apply [ServiceBehavior(TransactionTimeout=”00:00:45″)] to the service implementation.
C.    Set the service binding receiveTimeout attribute to 00:00:45.
D.    Apply [OperationBehavior(TransactionScopeRequired=false)] to the service operation.

Answer: B

QUESTION 86
You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.
The Windows Service class will inherit from ServiceBase.
You need to ensure that the WCF service starts when the Windows Service is restarted. What should you do in the Windows Service class?

A.    – Create a public method named Main.
– Create a new ServiceHost in the Main method.
– Override the OnShutdown method and close the ServiceHost.
B.    – Override the OnStart method and create and open a new ServiceHost.
– Override the OnStop method and close the ServiceHost.
C.    – Override the OnPowerEvent method and open a new ServiceHost.
– Override the OnShutdown method and close the ServiceHost.
D.    – Override the OnContinue method and open a new ServiceHost.
– Override the OnStop method and close the ServiceHost.

Answer: B

QUESTION 87
You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache for many Web applications.
The service contract is defined as follows. (Line numbers are included for reference only.)
01  [ServiceContract]
02  public interface IDataCache
03  {
04     …
05  }
06
07
08  public class DataCache : IDataCache
09  {
10     …
11  }
You need to ensure that all users share the cache. Which code segment should you insert at line 07?

A.    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.RepeatableRead)]
B.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
C.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
D.    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.ReadComitted)]

Answer: B

QUESTION 88
You develop a Windows Communication Foundation (WCF) service that uses basic authentication for client credentials.
This service is currently configured to use message security. The service is hosted on a server in workgroup mode.
Users report that their passwords are stolen when they use public computers.
You need to ensure that messages are secure and users are authenticated.
You prevent the service from being called over HTTP through Microsoft Internet Information Services (IIS) configuration.
What should you do next?

A.    Use the transport security mode and specify None for transport client credential type.
B.    Use the transportWithMessageCredential security mode and specify Basic for the transport client
credential type.
C.    Use the message security mode and specify Basic for the transport client credential type.
D.    Use the transportWithMessageCredential security mode and specify None for the transport client
credential type.

Answer: B

QUESTION 89
You are developing a Windows Communication Foundation (WCF) service. One of the parameters used with the
service operations is a security token. The security token is not sensitive.
The monitoring software tracks security tokens and can read tokens in clear text only.
The company security policy requires that you validate all clear text data passed over the corporate network.
You need to ensure that the service verifies that the security token is not changed during transit. What should you do?

A.    For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember
or MessageHeader attribute to EncryptAndSign.
B.    Implement IEndpointldentityProvider in the message contract class.
C.    Implement ISecureConversationSession in the message contract class.
D.    For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember
or MessageHeader attribute to Sign.

Answer: D

QUESTION 90
You are developing a Windows Communication Foundation (WCF) service.
The following code defines and implements the service. (Line numbers are included for reference only.)
01   [ServiceContract(SessionMode = SessionMode.Allowed)]
02   public interface ICatchAll
03   {
04      [OperationContract(IsOneWay = false, Action = “*”, ReplyAction = “*”)]
05      Message ProcessMessage(Message message);
06   }
07
08   public class CatchAllService : ICatchAll
09   {
10      public Message ProcessMessage(Message message)
11      {
12
13          …
14          return returnMsg;
15      }
16   }
You need to ensure that two identical copies of the received message are created in the service.
Which code segment should you insert at line 12?

A.    Message msgCopy = message.CreateBufferedCopy(8192) as Message;
Message returnMsg = message.CreateBufferedCopy(8192) as Message;
B.    MessageBuffer buffer = message.CreateBufferedCopy(8192);
Message msgCopy = buffer.CreateMessage();
Message returnMsg = buffer.CreateMessage();
C.    MessageBuffer buffer = message.CreateBufferedCopy(8192);
Message msgCopy = buffer.CreateMessage();
Message returnMsg = msgCopy;
D.    Message msgCopy = message;
Message returnMsg = message;

Answer: B

If you want to pass Microsoft 70-513 successfully, donot missing to read latest lead2pass Microsoft 70-513 practice tests.
If you can master all lead2pass questions you will able to pass 100% guaranteed.

http://www.lead2pass.com/70-513.html

         

Comments are closed.