Tips to Pass 70-513 Exam (46 to 60)

Accurate of 70-513 free practice questions materials and questions for Microsoft certification for IT engineers, Real Success Guaranteed with Updated 70-513 pdf dumps vce Materials. 100% PASS TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 exam Today!

2016 Apr 70-513 Study Guide Questions:

Q46. You are creating a Windows Communication Foundation (WCF) service. 

You have the following requirements: 

Messages must be sent over TCP. 

The service must support transactions. 

Messages must be encoded using a binary encoding. 

Messages must be secured using Windows stream-based security. 

You need to implement a custom binding for the service. 

In which order should the binding stack be configured? 

A. tcpTransport windowsStreamSecurity transactionFlow binaryMessageEncoding 

B. transactionFlow binaryMessageEncoding windowsStreamSecurity tcpTransport 

C. windowsStreamSecurity tcpTransport binaryMessageEncoding transactionFlow 

D. binaryMessageEncoding transactionFlow tcpTransport windowsStreamSecurity 

Answer: B 


Q47. You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service. 

The WCF service contains the following code segment. (Line numbers are included for reference only.) 


The existing Web service returns the EmployeeID as an attribute of the EmployeeInfo element in the response XML. 

You need to ensure that applications can consume the service without code changes in the client. 

What should you do? 

A. Insert the following code at line 02. 

<DataConttactFormat()> 

Insert the following code at line 22. 

<DataMember ()> 

B. Insert the following code at line 02. 

<XmlSerializerFormat()> 

Insert the following code at line 22. 

<XmlAtttibute()> 

C. Insert the following code at line 09. 

<XmlSerializerFocmat()> 

Insert the following code at line 22. 

<XmlAttribute()> 

D. Insert the following code at line 20. 

<DataContractFormat()> 

Insert the following code at line 22. 

<DataMember()> 

Answer: D 


Q48. You are creating a Windows Communication Foundation (WCF) service. 

You need to ensure that the service is compatible with ASP.NET to make use of the session state. 

Which binding should you use? 

A. NetTcp ContextBinding 

B. BasicHttpContextBinding 

C. NetTcp Binding 

D. NetMsmqBinding 

Answer: B 


Q49. You develop a Windows Communication Foundation (WCF) SOAP service that contains a class named Order. The Order class includes a field named secret that stores private data. 


The service has the following requirements: 

. The secret field must be encrypted. 

. All other fields in the Order class must serialize as plain text. 

You need to configure serialization for the Order class. 

What should you do? 

A. Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to Sign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

B. Add a MessageHeader attribute to the secret field and set the ProtectionLevel to Sign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

C. Add a MessageHeader attribute to the secret field and set the ProtectionLevel to EncryptAndSign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

D. Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to EncryptAndSign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

Answer: A 


Q50. DRAG DROP 

You have a client application that uses an existing Windows Communication Foundation (WCF) service. The client application contains a defined EndpointAddress object named endpointAddress. 

A class named ServiceClient is generated by using the Svcutil tool to invoke the WCF service. Instances of the ServiceClient class are created as follows: 

ServiceClient client = new ServiceClient(CreateBinding(), endpointAddress); 

The client application must meet the following requirements: 

. Optimize message-level security when transporting both text files and large files. . Provide transport-level security by using the HTTPS protocol. 

You need to create the code for the CreateBinding() method. 

Which four code segments should you use in sequence? (To answer, move the appropriate four code segments from the list of code segments to the answer area and arrange them in the correct order.) 


Answer: 


70-513 exam prep

Improve 70-513 download:

Q51. You are creating a Windows Communication Foundation (WCF) service that implements the following service contract. 

<ServiceContract()> 

Public Interface IOrderProcessing 

<OperationContract()> 

Sub ApproveOrder(ByVal id As Integer) 

End Interface 

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.PossessProperty 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 


Q52. A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the ITimeService 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=" ITimeService " > 

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=" TimeService " 

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. 

<service name=" TimeService "> 

Define the endpoint tag as follows. 

<endpoint address="http://localhost:8080/TimeService" 

binding=" wsHttpBinding " 

contract=" ITimeService "/ > 

Answer: D 


Q53. You are developing a client application that consumes a Windows Communication Foundation (WCF) service. 

You use the svcutil.exe utility to create a proxy for the service. 

You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns. 

You create an instance of the client proxy with the following code. 

var client = new TravelServiceClient(); 

You need to ensure that a callback is received when the GetFlight operation is called asynchronously. 

Which code segment should you use? 

A. client.BeginGetFlight(GetFlightCallback, null); client.GetFlight(); 

B. client.GetFlight(); client.BeginGetFlight(GetFlightCallback, null); 

C. client.GetFlightCompleted += new EventHandler<GetFlightCompletedEventArgs>( GetFlightCallback); client.GetFlightAsync(); 

D. IAsyncResult asyncResult = client.BeginGetFlight( GetFlightCallback, client); client.EndGetFlight(asyncResult); 

Answer: C 


Q54. You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms application. 

The ServiceHost instance is created in the Form constructor. 

You need to ensure that the service is not blocked while the UI thread is busy. 

What should you do? 

A. Decorate the service implementation class with the following line of code. 

<ServiceBehavior( 

UseSynchronizationContext:=False)> 

B. Decorate the service implementation class with the following line of code. 

<ServiceBehavior( 

ConcurrencyMode:=ConcurrencyMode.Multiple)> 

C. Call the Invoke method of the form and supply a delegate. 

D. Call the BeginInvoke method of the form and supply a delegate. 

Answer: A 


Q55. You create a Windows Communication Foundation (WCF) service and deploy it with wsHttpBinding and message security enabled. 

You create an intermediate WCF service for logging messages sent to the primary service. The intermediate service is called via the clientVia endpoint behavior. 

The primary service is receiving malformed data from a client application. 

You need to enable inspection of the malformed data and prevent message tampering. 

What should you do? 

A. Specify a protection level of None in the service contract for the intermediate service. Disable message and transport security from the client application configuration file. 

B. Specify a protection level of Sign in the service contract for the intermediate service. Disable transport security from the client application configuration file. 

C. Modify the binding on the intermediate service to use netNamedPipeBinding. 

D. Modify the binding on the intermediate service to use webHttpBinding. 

Answer: B 


70-513 vce

Validated 70-513 forum:

Q56. You are working with a Windows Communication Foundation (WCF) client application that has a generated proxy named SampleServiceProxy. 

When the client application is executing, in line 02 of the following code, the channel faults (Line numbers are included for reference only.) 

01 SampleServiceProxy proxy new SampleServiceProxy() 

02try 

03{ 

04proxy Processlnvoice(invoice); 

05) 

06catch 

07{ 

08 (proxy. State == CommunicationState. Faulted) 

09{ 

11) 

12) 

13 proxy Update Customer(customer); 

You need to retumn proxy to a state in which it can successfully execute the call in line 13. 

Which code segment should you use at line 10? 

A. proxy.CloseO; 

B. proxy new SampleServiceProxy0;c 

C. proxy.AbortO, 

D. proxy.Open() 

Answer: C 


Q57. You develop a Windows Communication Foundation (WCF) RESTful service that provides media streaming services. The service includes the following code. (Line numbers are included for reference only.) 


The service must return an XML response. 

You need to apply the correct attribute to AddMediaTitle method. 

Which code segment should you insert at line 05? 

A. [WebInvolce(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped)] 

B. [WebInvoice (ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle .Bare) ] 

C. [WebInvolce (Method= “POST”) ] 

D. [WebInvoice] 

Answer: A 


Q58. A Windows Communication Foundation (WCF) client communicates with a service. You created the client proxy by using Add Service Reference in Microsoft Visual Studio. 

You need to ensure that the client accepts responses of up to 5 MB in size. 

What should you change in the configuration file’? 

A. the value of the maxBufferPoolSize attribute to 5242880 

B. the value of the maxReceivedMessageSize attribute to 5242880 

C. the value of the maxBytesPerRead attribute to 5242880 

D. the value of the maxBufferSize attribute to 5242880 

Answer: B 


Q59. 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 BasicHttpBinding myBinding = new BasicHttpBinding(); 02 EndpointAddress myEndpointAddress = new EndpointAddress( "http://contoso.com/TaxService.svc"); 

04 ITaxService client = channelFactory.CreateChannel(); 

05 string data = client.GetData(1); 

You need to consume the service. 

Which code segment should you insert at line 03? 

A. var channelFactory = new ChannelFactory<ITaxService>(); 

B. var channelFactory = new ChannelFactory<ITaxService>( myBinding); 

C. var channelFactory = new ChannelFactory<ITaxService>( myBinding, myEndpointAddress); 

D. var channelFactory = new ChannelFactory<ITaxService>( "http://contoso.com/TaxService.svc"); 

Answer: C 


Q60. You are developing a Windows Communication Foundation (WCF) client application. The client application contains the following code. 


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