web analytics

The Same As Real 70-513 Test Questions Offered By Passleader Help You Pass Exam Easily (1-20)

QUESTION 1
You are creating a Windows Communication Foundation (WCF) service to process orders. The data contract for the order is defined as follows:
[DataContract]
public class Order
{
    [DataMember]
    public string CardHolderName { get; set; }
    [DataMember]
    public string CreditCardNumber { get; set; }
}
You have the following requirements:
— Enable the transmission of the contents of Order from the clients to the service.
— Ensure that the contents of CreditCardNumber are not sent across the network in clear text.
— Ensure that the contents of CreditCardNumber are accessible by the service to process the order.
You need to implement the service to meet these requirements. What should you do?

A.    Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.
B.    Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt.
C.    Change the data type of CreditCardNumber from string to SecureString.
D.    Implement the CreditCardNumber property getter and setter In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method.

Answer: B

QUESTION 2
You are creating a Windows Communication Foundation (WCF) service that accepts messages from clients when they are started. The message is defined as follows:
[MessageContract]
public class Agent
{
    public string CodeName { get; set; }
    public string SecretHandshake { get; set; }
}
You have the following requirements:
— The CodeName property must be sent in clear text.
— The service must be able to verify that the property value was not changed after being sent by the   client.
— The SecretHandshake property must not be sent in clear text and must be readable by the service.
What should you do?

A.    Add a MessageBodyMember attribute to the CodeName property and set the ProtectionLevel to Sign.
Add a MessageBodyMember attribute to the SecretHandshake property and set the ProtectionLevel to EncryptAndSign.
B.    Add a DataProtectionPermission attribute to the each property and set the ProtectData property to true.
C.    Add an xmlText attribute to the CodeName property and set the DataType property to Signed.
Add a PasswordPropertyText attribute to the SecretHandshake property and set its value to true.
D.    Add an ImmutableObject attribute to the CodeName property and set its value property to true.
Add a Browsable attribute to the SecretHandshake property and set its value to false.

Answer: A

QUESTION 3
A Windows Communication Foundation (WCF) client uses the following service contract.
(Line numbers are included for reference only.)
01 [ServiceContract]
02 public interface IService
03 {
04     [OperationContract]
05     string Operation1();
06     [OperationContract]
07     string Operation2();
08 }
You need to ensure that all calls to Operation1 and Operation2 from the client are encrypted and signed. What should you do?

A.    Set the ProtectionLevel property in line 01 to EncryptAndSign.
B.    Set the ProtectionLevel property in line 04 and line 06 to Sign.
C.    Add a SecurityCriticalAttribute ror each operation.
D.    Add a SecunitySafeCriticalAttribute for each operation.

Answer: A

QUESTION 4
You are creating a Windows Communication Foundation (WCF) service that implements the following service contract.
[ServiceContract]
public interface IOrderProcessing
{
    [OperationContract]
    void ApproveOrder(int id);
}
You need to ensure that only users with the Manager role can call the ApproveOrder method. What should you do?

A.    In the method body, check the Rights PosessesProperty property to see if it contains Manager
B.    Add a PrincipalPermission attribute to the method and set the Roles property to Manager
C.    Add a SecurityPermission attribute to the method and set the SecurityAction to Demand
D.    In the method body, create a new instance of WindowsClaimSet.
Use the FindClaims method to locate a claimType named Role with a right named Manager

Answer: B

QUESTION 5
You are developing a Windows Communication Foundation (WCF) service. The service needs to access out-of-process resources. You need to ensure that the service accesses these resources on behalf of the originating caller. What should you do?

A.    Set the value of ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel to TokenlmpersonationLevel.Impersonation
B.    Set the value of ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel to TokenlmpersonationLevel.Delegation
C.    Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding
D.    Set the PnncipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding

Answer: B

QUESTION 6
A Windows Communication Foundation (WCF) service has the following contract.
[ServiceContract(Namespace=”http://contoso.com”)]
public interface IShipping
{
    [OperationContract]
    string DoWork(int id);
}
This is one of several service contracts hosted by your application. All endpoints use SOAP 1.2 bindings with WS-Addressing 1.0. The System.ServiceModel.MessageLogging trace source in the system.diagnostics configuration section is configured with one listener. You need to make sure that only the messages that are returned from the DoWork operation are logged. Which XML segment should you add to the system.serviceModel/diagnostics/messageLogging/filters configuration element?

A.    <add xmlns:addr=”http://www.w3.org/2005/08/addressing”>/addr:Action[text()=’http://contoso.com/
lShipping/DoWorkResponse’] </add>
B.    <add xmlns:soap=”http://www.w3.org/2003/05/soap-envelope”>/soap:Action[text()=’http://contoso.com/
lShipping/DoWorkResponse’] </add>
C.    <add xmlns:addr=”http://www.w3.org/2005/08/addressing”>/addr:Action[text()=`http://contoso.com/
lShipping/DoWork’] </add>
D.    <add xmlns:soap=”http://www.w3.org/2003/05/soap-envelope”>/soap:Action[text()=`http://contoso.com/
lShipping/DoWork’] </add>

Answer: A

QUESTION 7
You are implementing a Windows Communication Foundation (WCF) service contract named lContosoService in a class named ContosoService. The service occasionally fails due to an exception being thrown at the service. You need to send the stack trace of any unhandled exceptions to clients as a fault message. What should you do?

A.    In the application configuration file on the client, add the following XML segment to the
system.serviceModel/behaviors configuration section group.
<endpointBehaviors>
    <behavior name=”debug”>
        <callbackDebug includeExceptionDetaillnFaults=”true” />
    </behavior>
</endpointBehaviors>
Associate the debug behavior with any endpoints that need to return exception details.
B.    In the application configuration file on the service and all the clients, add the following XML segment
to the system.diagnostics/sources configuration section group.
<source name=”System.ServiceModel” switchValue=”Error” propagateActivty=”true”>
    <listeners>
        <add name=”ServiceModelTraceListener” initializeData=”appntracelog.svclog” type=”System.Diagnostics.XmlWriterTraceListener” />
    </listeners>
</source>
C.    Apply the following attribute to the ContosoService class.
[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
D.    For each OperationContract exposed by lContosoService, apply the following attribute.
[FaultContract(typeof(Exception))]

Answer: C

QUESTION 8
A Windows Communication Foundation (WCF) service is generating a separate namespace declaration for each body member of a message contract, even though all body members share the same namespace. You need to simplify the XML representation of your message contract so that the namespace is only declared once. What should you do?

A.    Declare a wrapper namespace for the message contract by using the WrapperNamespace property of the MessageContract attribute
B.    Explicitly set the Namespace property of all the MessageBodyMember attrbutes to the same namespace.
C.    Declare all of the body members as properties of a DataContract class and use the class as the only body member of the message contract.
D.    Declare all of the body members as properties of a separate MessageContract class and use the class as the only body member of the message contract.

Answer: C

QUESTION 9
You are developing a Windows Communication Foundation (WCF) service. You write a method named Submit that accepts messages of the type System.ServiceModel.Channels.Message. You need to process the body of the incoming messages multiple times in the method. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Use the GetBody method of the Message class to read the content of the messages.
B.    Use the CreateBufferedCopy method of the Message class to load the messages into memory.
C.    Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages.
D.    Use the CreateMessage method of the MessageBuffer class to make a copy of the messages.

Answer: BD

QUESTION 10
You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX). You have the following requirements:
— You must enable the /catalog.svc IItems operation to respond using the POX, JSON, or ATOM formats.
— You also must ensure that the same URL is used regardless of the result type.
— You must determine the response format by using the Accepts HTTP header.
What should you do?

A.    Implement the IChannelInitializer interface in the service class.
B.    Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.
C.    Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle. WrappedResponse.
D.    Set the retum type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format.

Answer: D


PassLeader[12]

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

QUESTION 11
A Windows Communication Foundation (WCF) solution uses two services to manage a shopping cart.
Service A processes messages containing line items that total between $0 and $500.
Service B processes messages containing line items that total more than $500. All messages are of equal importance to the business logic.
You need to route incoming messages to the appropriate services by using WCF routing.
Which two message filters should you add to the router? (Each correct answer presents part of the solution. Choose two.)

A.    a message filter with a priority of 100 that will forward messages that total between $0 and $500 to Service A
B.    a message filter with a priority of 0 that will forward messages that total between $0 and $500 to Service A
C.    a message filter with a priority of 0 that will forward all messages to Service B
D.    a message filter with a priority of 100 that will forward all messages to Service B

Answer: AC

QUESTION 12
You have an existing Windows Communication Foundation (WCF) service. You need to ensure that other services are notified when the service is started. What should you do?

A.    Add the following standard endpoint to the service.
<endpoint name=”udpAnnouncementEndpoint” kind=”udpDiscoveryEndpoint” />
B.    Add the following standard endpoint to the service.
<endpoint name=”udpDiscoveryEndpoint” kind=”udpAnnouncementEndpoint” />
C.    Add a service behavior with the following element.
<serviceDiscovery>
    <announcementEndpoints>
        <endpoint kind=”udpDiscoveryEndpoint” />
    </announcementEndpoints>
</serviceDiscovery>
D.    Add a service behavior with the following element.
<serviceDiscovery>
    <announcementEndpoints>
        <endpoint kind=”udpAnnouncementEndpoint” />
    </announcementEndpoints>
</serviceDiscovery>

Answer: D

QUESTION 13
You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue. You need to configure the service to read messages from the failed-delivery queue. Which URI should you specify in the endpoint configuration settings of the service?

A.    net.msmq://localhost/msmq$FailedMessages
B.    net.msmq://localhost/msmq$DeadLetter
C.    net.msmq://localhost/system$DeadXact
D.    net.msmq://localhost/system$DeadLetter

Answer: D

QUESTION 14
You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP. You need to expose that contract over HTTP and TCP. What should you do?

A.    Add a net.tcp base address to the host.
B.    Add an endpoint configured with a netTcpBinding.
C.    Add an endpoint behavior named netTcpBehavior to the existing endpoint.
D.    Add a binding configuration to the existing endpoint named netTcpBinding.

Answer: B

QUESTION 15
You have an existing Windows Communication Foundation (WCF) Web service. The Web service is not responding to messages larger than 64 KB. You need to ensure that the Web service can accept messages larger than 64 KB without generating errors. What should you do?

A.    Increase the value of maxReceivedMessageSize on the endpoint binding.
B.    Increase the value of maxRequestLength on the httpRuntime element.
C.    Increase the value of maxBufferSize on the endpoint binding.
D.    Increase the value of maxBufferPoolSize on the endpoint binding.

Answer: A

QUESTION 16
A Windows Communication Foundation (WCF) service is responsible for transmitting XML documents between systems. The service has the following requirements:
— It must minimize the transmission size by attaching the XML document as is without using escape characters or base64 encoding.
— It must interoperate with systems that use SOAP but are not built on the .NET plafform.
You need to configure the service to support these requirements. Which message encoding should you use?

A.    Binary message encoding
B.    MTOM (Message Transmission Optimization Mechanism) message encoding
C.    Text message encoding with message version set to none
D.    Text message encoding with message version set to SOAP 1.2

Answer: B

QUESTION 17
You are moving a Windows Communication Foundation (WCF) service into production. You need to be able to monitor the health of the service. You only want to enable all performance counter instances exposed by the ServiceModelService counter group. Which element should you add to the system.serviceModel section in the application configuration file?

A.    <diagnostics performanceCounters=”ServiceOnly” />
B.    <diagnostics wmiProviderEnabled=”true” performanceCounters=”Off” />
C.    <diagnostics performanceCounters=”All” />
D.    <diagnostics wmiProviderEnabled=”true” />

Answer: A

QUESTION 18
Four Windows Communication Foundation (WCF) services are hosted in Microsoft Internet Information Services (IIS). No behavior configuration exists in the web.config fiIe. You need to configure the application so that every service and endpoint limits the number of concurrent calls to 50 and the number of concurrent sessions to 25. Which XML segment should you add to the system.serviceModel configuration section of the web.config file?

A.    <behaviors>
    <serviceBehaviors>
        <behavior name=”*”>
            <serviceThrottling maxConcurrentCalls=”50″ maxConcurrentSessions=”25″/>
        </behavior>
    </serviceBehaviors>
</behaviors>
B.    <behaviors>
    <serviceBehaviors>
        <behavior name=”default”>
            <serviceThrottling maxConcurrentCalls=”50″ maxConcurrentSessions=”25″/>
        </behavior>
    </serviceBehaviors>
</behaviors>
C.    <behaviors>
    <serviceBehaviors>
        <behavior name=””>
            <serviceThrottling maxConcurrentCalls=”50″ maxConcurrentSessions=”25″/>
        </behavior>
    </serviceBehaviors>
</behaviors>
D.    <behaviors>
    <serviceBehaviors>
        <behavior name=”ALL”>
            <serviceThrottling maxConncurentCalls=”50″ maxConcurrentSessions=”25″ />
        </behavior>
    </serviceBehaviors>
</behaviors>

Answer: C

QUESTION 19
Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the lTimeService service interface in the TimeService class. You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?

A.    Define the service tag as follows:
<service name=”TimeService”>
Define the endpoint tag as follows:
<endpoint kind=”TimeService” address=”http://localhost:8080/TimeService”
          binding=”wsHttpBinding” contract=”ITimeService”/>
B.    Define the service tag as follows:
<service name=”TimeService”>
Define the endpoint tag as follows:
<endpoint kind=”ITimeService” address=”http://localhost:8080/TimeService”
          binding=”wsHttpBinding” contract=”ITimeService” />
C.    Define the service tag as follows:
<service name=”ITimeService”>
Define the endpoint tag as follows:
<endpoint name=”TimeService” address=”http://localhost:8080/TimeService”
          binding=”wsHttpBinding” contract=”ITimeService”/>
D.    Define the service tag as follows:
<senvice name=”TimeService”>
Define the endpoint tag as follows:
<endpoint address=”http://localhost:8080/TimeService”
          binding=”wsHttpBinding” contract=”ITimeService”/>

Answer: D

QUESTION 20
Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS). You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application. You need to complete the deployment of this service to IIS. What should you do next?

A.    Create an asmx file and add a @ServiceHost directive to this file.
Copy the file to the root of the application directory.
B.    Create an .asmx file and add a @Register directive to this file.
Copy the file to the bin directoyy of the application.
C.    Create a svc file and add a @ServiceHost directive to this file.
Copy the file to the root of the application directory.
D.    Create a .svc file and add a @Register directive to this file.
Copy the file to the bin directory of the application.

Answer: C


The Same As Real 70-513 Test Questions Offered By Passleader Help You Pass Exam Easily

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