QUESTION 211
You are developing a Windows Communication Foundation (WCF) service. The following code defines and implements the service. (Line numbers are included for reference only.)
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; |
Correct Answer: B
QUESTION 212
You are modifying a Windows Communication Foundation (WCF) service that provides access to report generation system. The following code segment is part of your service contract. (Line numbers are included for reference only.)
Client applications are blocked while the service processes reports.
You need to ensure that the service methods are asynchronous.
What should you do?
A. |
Insert the following code at line 04. [OperationContract] Insert the following code at line 07. [OperationConcracc(AsyncPactern = true)] |
B. |
Insert the following code at line 04. [OperationConcracc(AayncPaccern = true)] |
C. |
Insert the following code at line 04. [OperotionConcroct(AsyncPactern = false) Insert the following code at line 07. [OperacionConcracc(AsyncPactern = true)] |
D. |
Insert the following code at line 04. [OperationContract (AsyncPattern = false)] |
Correct Answer: B
QUESTION 213
You are developing a Windows Communication Foundation (WCF) service that contains the following code segment.
[ServiceContract ]
public interface ICustomerService
{
&
}
public class CustomerService : ICustomerService
{
&
}
The service is self-hosted in a console application. Older client applications access the service at http://contoso.com:8080/CustomerService/V1. Newer client applications access the service at http://contoso.com:8080/CustomerService/V2.
You need to ensure that any client application can access the service at either address.
Which code segment should you use?
A. |
Uri serviceAddress1 = new Uri(“http://contoso.com:8080/CustomerService/V1”); Uri serviceAddress2 = new Uri(“http://contoso.com:8080/CustomerService/V2”); ServiceHost host = new ServiceHost(typeof(ICustomerService), new Uri[] { serviceAddress1, serviceAddress2 }); |
B. |
Uri serviceAddress1 = new Uri(“http://contoso.com:8080/CustomerService/V1”); Uri serviceAddress2 = new Uri(“http://contoso.com:8080/CustomerService/V2”); ServiceHost host = new ServiceHost(typeof(CustomerService), new Uri[] { serviceAddress1, serviceAddress2 }); |
C. |
Uri serviceAddress = new Uri(“http://contoso.com:8080/”); ServiceHost host = new ServiceHost(typeof(CustomerService), new Uri[] { serviceAddress }); host.AddServiceEndpoint(typeof(ICustomerService), new BasicHttpBinding(), “CustomerService/V1”); host.AddServiceEndpoint(typeof(ICustomerService), new BasicHttpBinding(), “CustomerService/V2”); |
D. |
Uri serviceAddress = new Uri(“http://contoso.com:8080/”); ServiceHost host = new ServiceHost(typeof(ICustomerService), new Uri[] { serviceAddress }); host.AddServiceEndpoint(typeof(CustomerService), new BasicHttpBinding(), “CustomerService/V1”); host.AddServiceEndpoint(typeof(CustomerService), new BasicHttpBinding(), “CustomerService/V2”); |
Correct Answer: C
QUESTION 214
You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service. (Line numbers are included for reference only.)
01 Dim myBinding As BasicHttpBinding =
New BasicHttpBinding()
02 Dim myEndpointAddress As EndpointAddress =
New EndpointAddress(
“http://contoso.com/TaxService.svc”)
03
04 Dim client As ITaxService =
channelFactory.CreateChannel()
05 Dim data As String = client.GetData(1)
You need to consume the service.
Which code segment should you insert at line 03?
A. |
Dim channelFactory = New ChannelFactory(Of ITaxService)() |
B. |
Dim channelFactory = New ChannelFactory(Of ITaxService)(myBinding) |
C. |
Dim channelFactory = New ChannelFactory(Of ITaxService) (myBinding, myEndpointAddress) |
D. |
channelFactory = New ChannelFactory(Of ITaxService) (“http://contoso.com/TaxService.svc”) |
Correct Answer: C
QUESTION 215
You have a self-hosted Windows Communication Foundation (WCF) service. You need to configure the service to provide an X.509 certificate during authentication. What should you use to configure the service?
A. |
the Certificate property of the X509CertificatelnitiatorServiceCredential class |
B. |
the SetCertificate method of the X509CertificatelnitiatorServiceCredential class |
C. |
the SetCertificate method of the X5O9CertificateRecipientServiceCredential class |
D. |
the TrustedStoreLocation property of the X5O9CertificateRecipientServiceCredential class |
Correct Answer: C
QUESTION 216
You are integrating a Windows Communication Foundation (WCF) service within an enterprise-wide Service
Oriented Architecture (SQA)
Your service has the following service contract.
[ServiceContract]
public class CreditCardConfirmationService { [OperationContracti public Boolean ConfirmCreditCard(string cc Number double orderAmount, nmt orderNumber) { )
)
You need to allow the code in the ConfirmCreditCard method to participate automatically in existing transactions. If there is no existing transaction, a new transaction must be created automatically.
What should you do?
A. |
Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new TransactionScopeO) block. |
B. |
Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new CommittableTransactionO) block. |
C. |
Add an [OperationBehavior(TransactionScopeRequired true)] attribute to the ConfirmCreditCard method. |
D. |
Add an [OperationBehavior(TransactionAutoComplete true)J attribute to the ConfirmCreditCard method. |
Correct Answer: C
QUESTION 217
A Windows Communication Foundation (WCF) service has the following contract.
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. |
odd xmlns:soap=”http://www.u3.org/2003/05/soap-envelope”> //soap:Action[text() = ‘http://contoso.com/I5hipping/DoWorkResponse’] </add> |
B. |
<odd xmlns:addr-“http://vww.w3.org/2005/08/addressing”> //addr:Action[text() – `http://contoso.com/IShipping/DoWorkResponse’ ] </add> |
C. |
<add xmlns:addr=”http://www.w3.org/2005/Q8/addressing”> //addr:Action[text() = ‘http://contoso.com/IShipping/DoUork’ ] </add> |
D. |
<add xmlns:soap?quot;http://www.w3.org/2003/05/soap-envelop”>; //soap:Action[text() = 1http://contoso.com/I3hipping/DoWork’] </add> |
Correct Answer: A
QUESTION 218
You are creating an application using Visual Studio 2010. The application consumes a Windows Communication Foundation (WCF) service. You are adding a service reference to the WCF service. You need to ensure that the generated proxy does not block the calling thread when executing a service method. What should you do when adding the service reference?
A. |
Set the Collection type to ObservableCollection. |
B. |
Select the Reuse types in all referenced assemblies option. |
C. |
Select the Generate asynchronous operations option. |
D. |
Select the Always generate message contracts option. |
Correct Answer: C
QUESTION 219
You have a secured Windows Communication Foundation (WCF) service. You need to track unsuccessful attempts to access the service. What should you do?
A. |
Set the authorizationManagerType attribute of the serviceAuthorization behavior to Message |
B. |
Set the includeExceptionDetailslnFaults attribute of the serviceDebug behavior to true |
C. |
Set the Mode attribute of the security configuration element to Message |
D. |
Set the messageAuthenticationAuditLevel attribute of the serviceSecurityAudit behavior to Failure. |
Correct Answer: D
QUESTION 220
DRAG DROP
You develop a Windows Communication Foundation (WCF) service that uses the SOAP protocol. You must secure the service by using Kerberos authentication for the transport layer. The SOAP messages must be authenticated by using a Security Assertion Markup Language (SAML) token. You need to configure the service configuration file. How should you complete the relevant markup? (To answer, drag the appropriate markup segment to the correct locations in the answer area. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Correct Answer:
Instant Access to Download Testing Software & PDF File for Microsoft 70-513 Real Exam
Instant Access to Try Microsoft 70-513 Free Demo
100-105 Dumps VCE PDF
200-105 Dumps VCE PDF
300-101 Dumps VCE PDF
300-115 Dumps VCE PDF
300-135 Dumps VCE PDF
300-320 Dumps VCE PDF
400-101 Dumps VCE PDF
640-911 Dumps VCE PDF
640-916 Dumps VCE PDF
70-410 Dumps VCE PDF
70-411 Dumps VCE PDF
70-412 Dumps VCE PDF
70-413 Dumps VCE PDF
70-414 Dumps VCE PDF
70-417 Dumps VCE PDF
70-461 Dumps VCE PDF
70-462 Dumps VCE PDF
70-463 Dumps VCE PDF
70-464 Dumps VCE PDF
70-465 Dumps VCE PDF
70-480 Dumps VCE PDF
70-483 Dumps VCE PDF
70-486 Dumps VCE PDF
70-487 Dumps VCE PDF
220-901 Dumps VCE PDF
220-902 Dumps VCE PDF
N10-006 Dumps VCE PDF
SY0-401 Dumps VCE PDF