Apr 2016 updated: Examcollection Microsoft 70-513 test engine 121-135

Exam Code: 70-513 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-513 Exam.

2016 Apr 70-513 Study Guide Questions:

Q121. You are moving a Windows Communication Foundation (WCF) service into production. You need to be able to monitor the health of the service. 

You only want to enable all performance counter instances exposed by the ServiceModelService 4.0.0.0 counter group. 

Which element should you add to the system.serviceModel section in the application configuration file? 

A. <diagnostics performanceCounters="ServiceOnly" /> 

B. <diagnostics wmiProviderEnabled="true" performanceCounters="Off" /> 

C. <diagnostics performanceCounters="All" /> 

D. <diagnostics wmiProviderEnabled="true" /> 

Answer: A 


Q122. Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service. 

You need to enable message logging and include all security information such as tokens and nonces in logged messages. 

What should you do? 

A. In the application configuration file, add the logKnownPii attribute to the message logging diagnostics source and set the value of the attribute to true. 

Generate the ContosoService class using the Add Service Reference wizard. 

Add a reference to System.ServiceModel.Routing.dll. 

Add the following code segment. 

Dim client As ContosoService = New ContosoService() 

Dim behavior As SoapProcessingBehavior = New SoapProcessingBe 

havior() behavior.ProcessMessages = True 

client.Endpoint.Behaviors.Add(behavior) 

B. In the application configuration file, add the following XML segment to the 

system.serviceModel configuration section group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true" 

logEntireMessage="true" /> 

</diagnostics> 

C. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

Generate the ContosoService class using the Add Service Reference wizard. 

Add the following code segment. 

Dim client As ContosoService = New ContosoService() 

client.Endpoint.Behaviors.Add(New CallbackDebugBehavior(True)) 

D. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

In the application configuration file, add the logKnownPii attribute to the message logging 

diagnostics source and set the value of the attribute to true. 

In the application configuration file, add the following XML segment to the 

system.serviceModel configuration section group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true"/> 

</diagnostics> 

Answer: D 


Q123. You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. The client applications call the service in a transaction. The service contract is defined as follows. (Line numbers are included for reference only.) 

01 <ServiceContract()> 

02 Public Interface IDatallpdate 

03 

04 <OperationContract()> 

05 <TransactionFlow(TransactionFlowOption.Handatocy)> 

06 Sub Update (ByVal accountNumber As String, 

ByVal amount As Double) 

07 

08 End Interface 

09 

10 Class UpdateService 

11 Implements IDataUpdate 

12 

13 <OperationBehavior( 

TransactionScopeRequired:=True, TransactionAutoComplete:=True)> 

14 Public Sub Update(ByVal accountNumber As String, 

ByVal amount As Double) 

Implements IDataUpdate.Update IS 

16 Try 

17 18 Catch ex As Exception 

19 WriteErrorLog(ex) 20 

21 End Try 

22 

23 End Sub 

24 

25 End Class 

Customers report that the transaction completes successfully even if the Update method throws an exception. 

You need to ensure that the transaction is aborted if the Update method is not successful. 

What should you do? 

A. insert the following line at line 20. Throw 

B. Replace line 13 with the following line. <OperationBehavior( TransactionScopeRequired:MTrue, TransactionAutoComplece:"False)> 

C. Insert the following line at line 09. <ServiceBehavlor( TransactionAutoCoropleteOnSessionClose:"False) > 

D. Insert the following line at line 09. <ServiceBehavior( TransacCionAucoCompleteOnSesslonClose:"True) > 

Answer: A 


Q124. 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. Request-Response by using the IRequestChannel interface for clients and the IReplyChannel 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. Datagram by using the IOutputChannel interface for clients and the IInputChannel interface for the service. 

Answer: D 


Q125. A Windows Communication Foundation (WCF) service is responsible for transmitting XML documents between systems. The service has the following requirements: 

. It must minimize the transmission size by attaching the XML document as is without using escape characters or base64 encoding. . It must interoperate with systems that use SOAP but are not built on the .NET platform. 

You need to configure the service to support these requirements. 

Which message encoding should you use? 

A. Binary message encoding 

B. MTOM (Message Transmission Optimization Mechanism) message encoding. 

C. Text message encoding with message version set to none. 

D. Text message encoding with message version set to SOAP 1.2. 

Answer: B 


70-513 actual exam

Replace 70-513 dumps:

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


Q127. A Windows Communication Foundation (WCF) service is deployed with netTcpBinding. This service uses a duplex message exchange pattern. You are developing the next version of the WCF service. 

You discover that your company's hardware load balancer performs correctly only for WCF services that use HTTP. 

You need to ensure that your service works with the load balancer. 

What should you do? 

A. Use basicHttpBinding. 

B. Create a custom binding that has the compositeDuplex, textMessageEncoding, and namedPipeTransport binding elements in this order. 

C. Create a custom binding that has the compositeDuplex, textMessageEncoding, and wsHttpTransport binding elements in this order. 

D. Use wsHttpBinding. 

Answer: C 


Q128. You are creating a Window s Communication Foundation (WCF) service application. The application needs to service many clients and requests simultaneously. The application also needs to ensure subsequent individual client requests provide a stateful conversation. 

You need to configure the service to support these requirements. 

Which attribute should you add to the class that is implementing the service? 

A. <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession, ConcurrencyMode:=ConcurrencyMode.Single)> 

B. <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerCall, ConcurrencyMode:=ConcurrencyMode.Reentrant)> 

C. <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession, ConcurrencyMode:=ConcurrencyMode.Multiple)> 

D. <ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerCall, ConcurrencyMode:=ConcurrencyMode.Multiple)> 

Answer: C 


Q129. You are developing a Windows Communication Foundation (WCF) service that returns location information for authorized law enforcement agencies. The service contract is as follows. 


Users are authenticated and impersonated. The system uses ASP.NET roles. The members of law enforcement are members of the LawEnforcement role. 

You need to ensure that only members of the LawEnforcement role can call these methods. 

What are two possible ways to achieve this goal (Each correct answer presents a complete solution? Choose two.) 

A. Add a PrincipalPermissionAttribute to each method that should be available only to members of law enforcement. Set its SecurityAction to Demand and set the role equal to LawEnforcement. 

B. Use the CurrentPrincipal property of the thread. Call the IsInRole method specifying LawEnforcement as a parameter. 

C. Create a GenericPrincipal specifying Thread.CurrentPrincipal.Identity as the IIdentityParameter and LawEnforcement as the only value for the Roles parameter. 

D. At the beginning of each method, enumerate each ClaimSet in a new WindowsClaimSet. Use the FindClaims method to locate a claim type named Role with a right named LawEnforcement. 

Answer: AB 


Q130. Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service. 

You need to enable message logging and include all security information such as tokens and nonces in logged messages. 

What should you do? 

A. In the application configuration file, add the logKnownPii attribute to the message 

logging diagnostics source and set the value of the attribute to true. 

Generate the ContosoService class using the Add Service Reference wizard. Add a 

reference to System.ServiceModel.Routing.dll. 

Add the following code segment. 

ContosoService client = new ContosoService(); 

SoapProcessingBehavior behavior = new SoapProcessingBehavior(); 

behavior.ProcessMessages = true; 

client.Endpoint.Behaviors.Add(behavior); 

B. In the application configuration file, add the following XML segment to the 

system.serviceModel configuration section group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true" 

logEntireMessage="true" /> 

</diagnostics> 

C. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

Generate the ContosoService class using the Add Service Reference wizard. 

Add the following code segment. 

ContosoService client = new ContosoService(); 

client.Endpoint.Behaviors.Add(new CallbackDebugBehavior(true)); 

D. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

In the application configuration file, add the logKnownPii attribute to the message logging 

diagnostics source and set the value of the attribute to true. In the application configuration 

file, add the following XML segment to the system.serviceModel configuration section 

group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true"/> 

</diagnostics> 

Answer: D 


70-513 exam cost

Free 70-513 study guides:

Q131. You are developing a Windows Communication Foundation (WCF) service that will be hosted in Microsoft Internet Information Services (IIS) 7.0. 

The service must be hosted in an IIS application named Info. You need to enable this service to be hosted in IIS by changing the web.config file. 

Which XML segment should you add to the web.config file 

A. < serviceHostingEnvironment > 

< serviceActivations > 

<add relativeAddress =" Info.svc " service="Info" /> 

</ serviceActivations > 

</ serviceHostingEnvironment > 

B. < serviceHostingEnvironment > 

< serviceActivations > 

<add relativeAddress ="Info" service=" Info.svc " /> 

</ serviceActivations > 

</ serviceHostingEnvironment > 

C. < serviceHostingEnvironment > 

< transportConfigurationTypes > 

<add name="Info" transportConfigurationType =" Info.svc " /> 

</ transportConfigurationTypes > 

</ serviceHostingEnvironment > 

D. < serviceHostingEnvironment > 

< transportConfigurationTypes > 

<add name=" Info.svc " transportConfigurationType =" FileNotRequired " /> 

</ transportConfigurationTypes > 

</ serviceHostingEnvironment > 

Answer: A 


Q132. A Windows Communication Foundation (WCF) service interacts with the database of a workflow engine. Data access authorization is managed by the database, which raises security exceptions if a user is unauthorized to access it. 

You need to ensure that the application transmits the exceptions raised by the database to the client that is calling the service. 

Which behavior should you configure and apply to the service? 

A. routing 

B. serviceDebug 

C. serviceSecurityAudit 

D. workflowUnhandledException 

Answer: B 


Q133. You are developing a Windows Communication Foundation (WCF) service that will be hosted in Microsoft Internet Information Services (IIS) 7.0. 

The service must be hosted in an IIS application named Info. You need to enable this service to be hosted in IIS by changing the web.config file. 

Which XML segment should you add to the web.config file 

A. < serviceHostingEnvironment > 

< serviceActivations > 

<add relativeAddress =" Info.svc " service="Info" /> 

</ serviceActivations > 

</ serviceHostingEnvironment > 

B. < serviceHostingEnvironment > 

< serviceActivations > 

<add relativeAddress ="Info" service=" Info.svc " /> 

</ serviceActivations > 

</ serviceHostingEnvironment > 

C. < serviceHostingEnvironment > 

< transportConfigurationTypes > 

<add name="Info" transportConfigurationType =" Info.svc " /> 

</ transportConfigurationTypes > 

</ serviceHostingEnvironment > 

D. < serviceHostingEnvironment > 

< transportConfigurationTypes > 

<add name=" Info.svc " transportConfigurationType =" FileNotRequired " /> 

</ transportConfigurationTypes > 

</ serviceHostingEnvironment > 

Answer: A 


Q134. You are creating a Windows Communication Foundation (WCF) service that is implemented as follows. 

(Line numbers are included for reference only.) 

01|ServiceContract] 

02[ServiceBehavior (includeExceptionDetàilslnFaults = true) 1 

03putiic class OrderService 

04{ 

05[Operation Contract] 

06putiic void Submit Order (Order an Order) 

07{ 

O8try 

09{ 

10... 

11) 

12catch (DivideByZeroExcepton ex) 

13{ 

15) 

16) 

17) 

You need to ensure that the stack trace details of the exception are not included in the error information sent to the client. 

What should you do? 

A. Replace line 14 with the following line. Throw: 

B. Replace line 14 with the following line throw new FaultException<Order>(anOrder, ex.ToString(fl; 

C. After hne 05, add the following line. [FaultContract(typeof(FaukEception<Order>))J Replace line 14 with the following line throw ex; 

D. Alter hne 05, add the following line [FaultContract(typeof(FaultException<Order>))J Replace line 14 with the following line. Throw new FaultException<Order>(anOrder, "Divide by zero exception”): 

Answer: D 


Q135. A Windows Communication Foundation (WCF) service implements the following contract. (Line numbers are included for reference only.) 

01 [ServiceContract] 

02 public interface IDataAccessService 

03 { 

01 [OperationContract] 

05 void PutMessage(string message); 

07 [OperationContract] 

08 [FaultContract(typeof(TimeoutFaultException)) ] 

09 [FaultContract(typeof(FaultException) ) ] 

10 stringf] SearchMessages(string search); 

11 } 

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 



see more 70-513 - TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

Microsoft 70-513 Certification Sample Questions and Answers: http://www.braindumpsall.net/70-513-dumps/

P.S. New 70-513 dumps PDF: http://www.4easydumps.com/70-513-dumps-download.html