Need New 70-513 Exam Dumps? Download the valid PassLeader 341q 70-513 exam dumps! PassLeader offer the newest 70-513 pdf and vce dumps, which including all the new 70-513 exam questions and answers. We PassLeader ensure that our 341q 70-513 practice test is the most valid and you can get all real exam questions with our 70-513 study guide and pdf ebook materials. We share the 70-513 sample questions with vce and pdf for free download now!
keywords: 70-513 exam,341q 70-513 exam dumps,341q 70-513 exam questions,70-513 pdf dumps,70-513 practice test,70-513 vce dumps,70-513 study guide,70-513 braindumps,TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 Exam
QUESTION 141
Drag and Drop Question
You create a Windows Communication Foundation (WCF) service. The service must be multi-threaded and maintain state across threads. You need to create the code for the service. Which code segments should you use? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code 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.)
Answer:
QUESTION 142
You are developing a Windows Communication Foundation (WCF) client application. The client application contains the following code.
The configuration file contains the following lines.
You need to ensure that the service is consumed. Which code segment should you use?
A. var client = new SocialClient(“SocialClient”);
client.Endpoint.Behaviors.Add(new WebHttpBehavior());
B. var client = new SocialClient(“SocialClient”);
client.Endpoint.Behaviors.Add(new WebScriptEnablingBehovior());
C. var client = new SocialClient(“POST”);
client.Endpoint.Behaviors.Add(new WebHttpBehovior());
D. var client = new SocialClient(“POST”);
client.Endpoint.Behaviors.Add(new WebScriptEnablingBehavior());
Answer: A
QUESTION 143
You develop a Windows Communication Foundation (WCF) service that interacts with Microsoft Message Queuing (MSMQ). The service requires sessions. You need to create a custom binding that enables messages sent to the queue to be viewed when you are using a listener tool. Which binding elements should you use?
A. textMessageEncoding and msmqTransport in this order.
B. textMessageEncoding and msmqIntegrationTransport in this order.
C. msmqTransport and textMessageEncoding in this order.
D. msmqIntegrationTransport and textMessageEncoding in this order.
Answer: A
QUESTION 144
You develop a Windows Communication Foundation (WCF) service that is hosted by using Windows Activation Services (WAS). You need to configure the service to accept requests that use the TCP/IP protocol. What should you do? (Each correct answer presents part of the solution. Choose two.)
A. Run the aspnet_regiis executable to enable TCP/IP service activation.
B. In Control Panel, enable the Windows Communication Foundation HTTP Activation feature.
C. In Control Panel, enable the WCF Non-HTTP Activation feature.
D. Run the appcmd executable to enable TCP/IP service activation.
Answer: BD
QUESTION 145
You have a Windows Communication Foundation (WCF) service that uses a multicast protocol as a custom transport. The service implements the channel framework. You need to choose a message exchange pattern for the transport. What should you use?
A. Datagram by using the IOutputChannel interface for clients and the IInputChannel interface for the service.
B. Half-Duplex by using the IRequestChannel interface for clients and the IReplyChannel interface for the service.
C. Duplex by using the IDuplexChannel interface for both clients and the service.
D. Request-Response by using the IRequestChannel interface for clients and the IReplyChannel interface for the service.
Answer: A
Part 2 – VB
QUESTION 146
A Windows Communication Foundation (WCF) service that handles corporate accounting must be changed to comply with government regulations of auditing and accountability. You need to configure the WCF service to execute under the Windows logged-on identity of the calling application. What should you do?
A. Within the service configuration, add a serviceAuthorization behavior to the service, and set impersonateCallerForAllOperations to true.
B. Within the service configuration, add a serviceAuthenticationManager behavior to the service, and set serviceAuthenticationManagerType to Impersonate.
C. Within the service configuration, add a serviceSecurityAudit behavior to the service, and set serviceAuthorizationAuditLevel to SuccessOrFailure.
D. Within the service configuration, add a serviceCredentials behavior to the service, and set type to Impersonate.
Answer: A
QUESTION 147
A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 Public Interface ITeamMessageService
04 <OperationContract()>
05 Function GetMessage() As String
07 <OperationContract()>
08 Sub PutMessage(ByVal message As String)
09 End Interface
The code for the service class is as follows.
10 Public Class TeamMessageService
11 Implements ITeamMessageService
13 Dim key As Guid = Guid.NewGuid()
14 Dim message As String = “Today s Message”
16 Public Function GetMessage() As String _
17 Implements ITeamMessageService.GetMessage
19 Return String.Format(“Message:{0}. Key:{1}”, message, key)
20 End Function
22 Public Sub PutMessage(ByVal message As String) _
23 Implements ITeamMessageService.PutMessage
25 Me.message = message
26 End Sub
28 End Class
The service is self-hosted. The hosting code is as follows.
29 Dim host As ServiceHost = New ServiceHost(GetType(TeamMessageService))
30 Dim binding As BasicHttpBinding = New BasicHttpBinding(BasicHttpSecurityMode.None)
31 host.AddServiceEndpoint(“MyApplication.ITeamMessageService”, binding, “http://localhost:12345”)
32 host.Open()
You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is updated by any client calling PutMessage. What should you do?
A. Add the following attribute to the TeamMessageService class, before line 10.
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.Single)>
B. Add the following attribute to the TeamMessageService class, before line 10.
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)>
C. Pass a service instance to the instancing code in line 29, as follows.
Dim host As ServiceHost = New ServiceHost(New TeamMessageService())
D. Redefine the message string in line 14, as follows.
Shared message As String = “Today s Message”
E. Change the implementation of PutMessage in lines 22-26 to the following.
Public Sub PutMessage(ByVal message As String) _
Implements ITeamMessageService.PutMessage
TeamMessageService.message = message
End Sub
Answer: A
QUESTION 148
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.
Answer: B
QUESTION 149
Drag and Drop Question
You develop a Windows Communication Foundation (WCF) service. The service implements the IRegistrationService interface in a class named RegistrationService. You need to configure the service to use file-less activation. How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code 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.)
Answer:
QUESTION 150
You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?
A. Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.
B. Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.
C. Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.
D. Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.
Answer: C
http://www.passleader.com/70-513.html
QUESTION 151
You develop a Windows Communication Foundation (WCF) service. You enable all performance counters and run multiple calls to the service. The service must isolate session data for each user. You need to monitor the instancing behavior used in the service. Which performance counter should you monitor?
A. ServiceModelService 4.0.0.0\Calls
B. ServiceModelService 4.0.0.0\Instances
C. ASP.NET State Service\State Server Sessions Active
D. ASP.NET State Service\State Server Sessions Total
Answer: B
QUESTION 152
A service implements the following contract. (Line numbers are included for reference only.)
The service is implemented as follows.
ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages. You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session. What should you do?
A. Insert the following attribute to OperationOne on IContosoService.
<TransactionFlow(TransactionFlowOption.Mandatory)>
Insert the following attribute to OperationTwo on IContosoService.
<TransactionFlow(TransactionFlowOption.Mandatory)>
B. Insert the following attribute to OperationOne on ContosoService.
<OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=False)>
Insert the following attribute to OperationTwo on ContosoService.
<OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=True)>
C. Add the following XML segment to the application config file in the system.serviceModel/bindings configuration section.
<netMsmqBinding>
<binding name=”contosoTx” durable=”true” receiveContextEnabled=”true” />
</netMsmqBinding>
Then use the NetMsmqBinding named contosoTx to listen for messages from the clients.
D. Add the following XML segment to the application config file in the system.serviceModel/bindings configuration section.
<customBinding>
<binding name=”contosoTx”>
<transactionFlow />
<binaryMessageEncoding />
<msmqTransport durable=”true” />
</binding>
</customBinding>
Then use the CustomBinding named contosoTx to listen for messages from the clients.
Answer: B
QUESTION 153
You have a Windows Communication Foundation (WCF) service. The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues. You need to configure the service. In the web.config file for the service, what should you do?
A. In the service configuration diagnostics section, set the value of the performancCounters property to All.
B. Enable message logging for the endpoint.
C. Enable the Windows Management Instrumentation (WMI) provider.
D. In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.
Answer: A
QUESTION 154
You develop a Windows Communication Foundation (WCF) service that contains the following code segment. (Line numbers are included for reference only.)
You need to ensure that all service endpoints are available to client applications. Which code segment should you insert at line 04?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
QUESTION 155
You are hosting a Windows Communication Foundation (WCF) service at http://www.contoso.com for a law enforcement agency. The agency adds operations to support sending biometric fingerprint data via non-buffered streaming. The service data is not routed between intermediaries. The WCF binding you are using by default does not support encryption. You need to ensure that fingerprint data is not disclosed when it is passed over the network. What should you do?
A. Use basicHttpBinding with message security to https://www.contoso.com.
B. Use basicHttpBinding over transport security at https://www.contoso.com.
C. Use wsHttpBinding over message security at https://www.contoso.com.
D. Use wsHttpBinding over transport security at http://www.contoso.com.
Answer: B
QUESTION 157
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.)
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. Option A
B. Option B
C. Option C
D. Option D
Answer: C
QUESTION 159
You are developing a Windows Communication Foundation (WCF) service. One of the service operations contains the following code.
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. Option A
B. Option B
C. Option C
D. Option D
Answer: C
QUESTION 160
You are developing a Windows Communication Foundation (WCF) client application. The client application contains the following code.
The configuration file contains the following lines.
You need to ensure that the service is consumed. Which code segment should you use?
A. Dim client As SocialClienc = New SocialClienc(“POST”)client.Endpoint.Behaviors.Add(New WebHttpBehavior())
B. Dim client As SocialClient = New SocialClient(“SocialClient”)client.Endpoint.Behaviors.Add(New WebHttpBehavior())
C. Dim client As SocialClient = New SocialClient(“SocialClient”)client.Endpoint.Behaviors.Add(New WebScriptEnablingBehavlor())
D. Dim client As SocialClient = New SocialClient(“POST”)client.Endpoint.Behaviors.Add(New WebScriptEnablingBehovior())
Answer: B
http://www.passleader.com/70-513.html