2016 June Microsoft Official New Released 70-513 Q&As in GreatExam.com!
100% Free Download! 100% Pass Guaranteed!
70-513 dumps free share: GreatExam presents the highest quality of 70-513 exam practice test which helps candidates to pass the 70-513 exams in the first attempt.
Following questions and answers are all new published by Microsoft Official Exam Center: (The full version is in the end of the article!!!)
QUESTION 171
Drag and Drop Question
You use Visual Studio to develop a Windows Communication Foundation (WCF) service.
The service is not hosted.
You cannot use the WcfTestClient.exe tool to test the service.
You need to test the service from a separate Visual Studio solution that contains a simple console application.
Which four actions should you perform in sequence? (To answer, move the appropriate four actions from the list of actions to the answer area and arrange them in the correct order.)
QUESTION 172
A Windows Communication Foundation (WCF) service implements the following contract. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 Public Interface IDataAccessService
04 <OperationContract()>
05 Sub PutMessage(ByVal message As String)
07 <OperationContract()>
08 <FaultContract(GetType(TimeoutFaultException))>
09 <FaultContract(GetType(FaultException))>
10 Function SearchMessages(ByVal search As String) As String ()
12 End Interface
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.
Answer: C
QUESTION 173
You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner.
You need to add a delete operation.
You implement the delete method as follows.
Sub DeleteItems (ByVol id As String)
You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation.
What should you do?
A. Add the WebInvoke(UriTemplate: = “/Items/{id>”, Method: = “DELETE”) attribute to the
operation.
B. Add the HttpDelete attribute to the operation.
C. Replace the string parameter with a RemovedActivityAction parameter.
D. Change the Sub statement to Function and specify RemovedActivityAction as the return type.
Answer: A
QUESTION 174
A Windows Communication Foundation (WCF) client configuration file contains the following XML segment in the system.serviceModel element.
<client>
<endpoint address=” net.tcp://server/ContosoService “
binding=” netTcpBinding “
contract=” Contoso. IContoso Service “
name=” netTcp ” / >
<endpoint address=” net.pipe://localhost/ContosoService “
binding=” netNamedPipeBinding “
contract=” Contoso. IContoso Service “
name=” netPipe ” />
</client>
You need to create a channel factory that can send messages to the endpoint listening at net.pipe://localhost/ContosoService.
Which code segment should you use
A. Dim factory As ChannelFactory (Of Contoso. IContosoService ) =
New ChannelFactory (Of Contoso. IContosoService )(” Contoso. IContosoService “)
B. Dim factory As ChannelFactory (Of Contoso. IContosoService ) =
New ChannelFactory (Of Contoso. IContosoService )(” netNamedPipeBinding “)
C. Dim factory As ChannelFactory (Of Contoso. IContosoService ) =
New ChannelFactory (Of Contoso. IContosoService )(” netPipe “)
D. Dim factory As ChannelFactory (Of Contoso. IContosoService ) =
New ChannelFactory (Of Contoso. IContosoService )( ” net.pipe://localhost/ContosoService “)
Answer: D
QUESTION 175
You are developing a new version of an existing message contract named CustomerDetailsVersion1.
The new version of the message contract must add a Department field of type String to the SOAP header.
You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1.
You need to ensure that all client applications can consume the service.
Which code segment should you use?
A. [MessageContract]
public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = false)]
public string Department;
}
B. public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = false)]
public string Department;
}
C. [MessageContract]
public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = true)]
public string Department;
}
D. public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = true)]
public string Department;
}
Answer: A
QUESTION 176
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 Property CodeName As String
Public Property SecretHandshake As String
End Class
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: B
QUESTION 177
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 178
Drag and Drop Question
You have a client application that consumes a Windows Communication Foundation (WCF) service.
The service contains a class named RegistrationService.
The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations.
The service has the following requirements:
– The client application must call the SubmitRegistration method synchronously.
– The client application must call the GetRegistrations method asynchronously.
You need to complete the client-side code to call the WCF service.
Which six code segments should you use in sequence? (To answer, move the appropriate six code segments from the list of code segments to the answer area and arrange them in the correct order.)
Answer:
QUESTION 179
A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace.
The service is implemented in a class named DataAccessService, which implements the IDataAccess interface and also is defined in the MyApplication namespace.
The hosting code is as follows. (Line numbers are included for reference only.)
You need to create a ServiceHost instance and assign it to the host variable.
You also need to instantiate the service host.
Which line of code should you insert at line 04?
A. host = New ServiceHost(“MyApplication.DataAccessService”)
B. host = New ServiceHost(“MyApplication.IDataAccess”)
C. host = New ServiceHost(GetType(IDataAccess))
D. host = New ServiceHost(GetType(DataAccessService))
Answer: D
QUESTION 180
You create a Windows Communication Foundation (WCF) service.
The service must meet the following requirements:
– Communicate errors as exceptions that originate in the service operations.
– Publish the errors as part of the WCF contract.
You need to throw an exception inside the service operation method.
Which type of exception should you throw?
A. ProtocolException
B. FaultException
C. PoisionMessageException
D. CommunicationException
Answer: B
GreatExam is now offering GreatExam 70-513 PDF dumps with 100% passing guarantee. Use GreatExam 70-513 PDF and pass your exam easily. Download Microsoft 70-513 exam dumps and prepare for exam.
2016 Microsoft 70-513 exam dumps (All 341 Q&As) from GreatExam:
http://www.greatexam.com/70-513-exam-questions.html [100% Exam Pass Guaranteed!!!]