How to pass Microsoft 70-513 Real Exam in 24 Hours [exam question 196-210]

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-513 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-513-dumps.html


70-513 Product Description:
Exam Number/Code: 70-513 vce
Exam name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Instant Access to Free VCE Files: Microsoft 70-513 TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

70-513 examcollection

Actual of 70-513 sample question materials and samples for Microsoft certification for consumer, 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 Mar 70-513 Study Guide Questions:

Q196. 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"); 

Answer: C 


Q197. A Windows Communication Foundation (WCF) service uses the following service contract. 

<ServiceContract> 

Public Interface IService <OperationContract0>? 

Function Operation 1 (RyVal s As String) As String 

End Interface You need to ensure that the operation contract Operation 1 responds to HTTP POST requests. 

Which code segment should you use? 

A. <OperationContract0> <Weblnvoke(Method:z’POST”)> Function Operation 1 (ByVal s As String) As String 

B. <OperationContract0> <WebGet(UriTemplate: “POST’)> Function Operation 1 (ByVal s As String) As String 

C. <OperationContract(ReplyAction: ‘POST")> Function Operation 1 (ByVal s As String) As String 

D. <OperationContract(Action:z”POST”)> Function Operation 1 (ByVal s As String) As String 

Answer: A 


Q198. A class named TestService implements the following interface. 

 [ServiceContract] 

public interface lTestService { 

[OperationContract] 

DateTime GetServiceTime; 

TestService is hosted in an ASP.NET application. 

You need to modify the application to allow the GetServiceTime method to return the data formatted as JSON. 

It must do this only when the request URL ends in /ServiceTime. 

What should you do? 

A. Add this attribute to the GetServiceTime method. 

[Weblnvoke(MetMode”POST”)] 

In the web.config file, add this element to 

system.serviceModel/behaviors/endpointBehaviors. 

<behavior namee"Json”> 

<enableWebScript /> 

</behavior> 

In the web.config file, configure TestService in the system.serviceModel/services collection 

as follows 

<service namez“TestService”> 

<endpoint address"/ServiceTime” 

contracts“TestService” 

behaviorConfiguration=”Json” 

bindingz”webHttpBinding” /> 

</service> 

B. Add this attribute to the GetServiceTime method. 

[WebInvoke(Method = “GET’, 

UriTemplate "/ServiceTime”, 

ResponseFormat = WebMessageFormat.Json)] 

In the web.config file, configure TestService in the system.serviceModel/services collection 

as follows. 

<service namez“TestService"> 

<endpoint address="/ServiceTime” 

contract=”TestService” 

bindinge”webHttpBinding” /> 

</service> 

C. Add this attribute to the GetServiceTime method 

[WebGet( 

ResponseFormat= WebMessageFormat.Json, 

UriTemplatee="/ServiceTime”)] 

Create a new svc file named JsonVersion.svc with the following content. 

<%@ ServiceHost Service"TestService’ 

Factorye=“System.ServiceMode.ActivationWebServiceHostFactory" %> 

D. Add this attribute to the GetServiceTime method. 

[WebGet(UriTemplate = (Uson)/ServiceTime”)] 

Create a new .svc file named Jsonversion svc with the following content 

<%@ ServiceHost Servicee”TestService” 

Factory=”System ServiceModel.ActivationWebServiceHostFactory" %> 

Answer: C 


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


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


70-513 free question

Most recent 70-513 exam price:

Q201. A client application calls a Windows Communication Foundation (WCF) service with a proxy class that was generated by Visual Studio. 

The service binding was changed from wsHttpBinding to basicHttpBinding. The method signatures in the service contract are changed. 

After these changes, the client application receives errors when calling methods on the service. 

You need to ensure that the client can invoke methods on the service successfully. 

What should you do? 

A. Update the configuration file to use basicHttpBinding. 

B. Enable anonymous authentication for the service. 

C. Copy the configuration file elements under the <system.servicelviodel> element from the service back to the client. 

D. Update the service reference. 

Answer: D 


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


Q203. A service implements the following contract. (Line numbers are included for reference only.) 


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 


Q204. A Windows Communication Foundation (WCF) service is required to log all authorization attempts to the Windows Event Log. 

You need to configure a behavior and apply it to the service to support this requirement. 

Which behavior should you configure and apply? 

A. serviceAuthenticationManager 

B. serviceAuthorization 

C. serviceCredentials 

D. serviceSecurityAudit 

Answer: D 


Q205. 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/items 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 return type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format. 

Answer: D 


70-513 keys

Downloadable 70-513 answers:

Q206. You develop a Window Communication Foundation (WCF) service. 

You have the following requirements: 

. Create a data contract to pass data between client applications and the service. . Create the data that is restricted and cannot pass between client applications and the service. 

You need to implement the restricted data members. 

Which member access modifier should you use? 

A. Protected 

B. Public 

C. Shared 

D. Private 

Answer: C 


Q207. You develop a Windows Communication Foundation (WCF) service to generate reports. Client applications call the service to initiate report generation but do not wait for the reports to be generated. The service does not provide any status to the client applications. 

The service class is defined as follows. (Line numbers are included for reference only.) 

01 <ServiceContract()> 

02 Public Class ReportGeneratorService 

03 

04 Private Function GenerateReports( ByVal clientID As Integer) As Integer 

05 & 

06 Return 0 

07 End Function 

08 

09 End Class 

You need to ensure that client applications can initiate reports without waiting for status. 

Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) 

A. Insert the following code at line 03. <OperationContract(IsOneWay:=True)> 

B. Insert the following code at line 03. <OperationContract(AsyncPattern:=False)> 

C. At line 04, change the GenerateReports method from Private to Public. 

D. Remove line 06. At line 04, change the type of GenerateReports method to Sub. Remove the code As Integer from the method definition. 

Answer: AD 


Q208. You are developing a Windows Communication Foundation (WCF) service. One of the parameters used with the service operations is a security token. The security token is not sensitive. The monitoring software tracks security tokens and can read tokens in clear text only. 

The company security policy requires that you validate all clear text data passed over the corporate network. 

You need to ensure that the service verifies that the security token is not changed during transit. 

What should you do? 

A. For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember or MessageHeader attribute to EncryptAndSign. 

B. Implement IEndpointldentityProvider in the message contract class. 

C. Implement ISecureConversationSession in the message contract class. 

D. For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember or MessageHeader attribute to Sign. 

Answer: D 


Q209. A Windows Communication Foundation (WCF) service handles online order processing for your company. 

You discover that many requests are being made with invalid account numbers. 

You create a class named AccountNumberValidator that has a method named Validate. 

Before the message is processed, you need to validate account numbers with AccountNumberValidator and reject messages with invalid account numbers. 

You create a new class that implements the IParameterInspector interface. 

Which code segment should you use in this class? 

A. public void AfterCall(string operationName, object[] outputs, 

object returnValue, 

object correlationState) 

string accountNumber = GetAccountNumber(outputs); 

var validator = new AccountNumberValidator(); 

if(!validator.Validate(accountNumber)) 

throw new FaultException(); 

public object BeforeCall(string operationName, object[] inputs) 

return null; 

B. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

return; 

public object BeforeCall(string operationName, 

object[] inputs) 

string accountNumber = GetAccountNumber(inputs); 

var validator = new AccountNumberValidator(); 

if (!validator.Validate(accountNumber)) 

throw new FaultException(); 

return null;} 

C. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

string accountNumber = GetAccountNumber(outputs); 

var validator = new AccountNumberValidator(); 

if(!validator.Validate(accountNumber) 

returnValue = new FaultException(); 

public object BeforeCall(string operationName, 

object[] inputs) 

{ return null; } 

D. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

return; 

public 

object BeforeCall(string operationName, object[] inputs) { 

string accountNumber = GetAccountNumber(inputs); 

var validator = new AccountNumberValidator(); 

if (!validator.Validate(accountNumber)) 

return new FaultException(); 

Answer: B 


Q210. You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer. 

You need to expose the following class as a service named Arithmetic with an operation named Sum. 

Public Class Calculator Public Function Add (ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class Which code segment should you use? 

A. <ServiceContract(Namespace:="Arithmetic")> Public Class Calculator <OperationContract(Action:="Sum")> Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class 

B. <ServiceContract(ConfigurationName:="Arithmetic")> Public Class Calculator <OperationContract(Action:="Sum")> Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class 

C. <ServiceContract(Name:="Arithmetic")> Public Class Calculator <OperationContract(Name:="Sum")> Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class 

D. <ServiceContract(Name:="Arithmetic")> Public Class Calculator <OperationContract(ReplyAction:="Sum")> Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class 

Answer: C 



see more 70-513 dumps