Improved 70-513: Exambible real preparation from 211 to 225

70-513 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-513
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

Free Certification Real IT 70-513 Exam pdf Collection

Question No. 211

You are developing a Windows Communication Foundation (WCF) client application. 

You instantiate a client class that inherits from ClientBase. The client instance must always be shut down in such a way that it can free up any resources it is referencing. You need to ensure that all exceptions are caught and the instance is always properly shut down. 

Which code segment should you use? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Question No. 212

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


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 22. throw; 

B. Insert the following line at line 09. [ServiceBehavior( TransactionAutoCompleteOnSessionClose = false)] 

C. Replace line 12 with the following line. [OperationBehavior( TransactionScopeRequired = true, TransactionAutoCoroplete - false)] 

D. Insert the following line at line 09. [ServiceBehavior( TransactionAutoCompleteOnSessionClose = true)] 

Answer:


Question No. 213

A Windows Communication Foundation (WCF) solution uses two services to manage a shopping cart. Service A processes messages containing line items that total between $0 and $500. Service B processes messages containing line items that total more than $500. 

All messages are of equal importance to the business logic. 

You need to route incoming messages to the appropriate services by using WCF routing. 

Which two message filters should you add to the router? (Each correct answer presents part of the solution. Choose two.) 

A. a message filter with a priority of 100 that will forward messages that total between $0 and $500 to Service A 

B. a message filter with a priority of 0 that will forward messages that total between $0 and $500 to Service A 

C. a message filter with a priority of 0 that will forward all messages to Service B 

D. a message filter with a priority of 100 that will forward all messages to Service B 

Answer: AC 


Question No. 214

You are developing a Windows Communication Foundation (WCF) service named CalculatorService, which implements the ICalculatorService contract. The service is configured to be discoverable through UDP. CalculatorService contains multiple endpoints. One of the endpoints is configured with the following behavior. 

You need to log all the endpoint metadata information that is added by the service host. Which code segment should you use? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Question No. 215

You are modifying a Windows Communication Foundation (WCF) service that issues security tokens. The service is accessible through the named pipe protocol. No endpoints are added in the service code. The configuration file for the service is as follows. (Line numbers are included for reference only.) 


You need to ensure that new and existing client applications can access the service through HTTP and named pipes. 

What should you do? 

A. Insert the following line at line 05. <endpoint address=http://www.contoso.com binding="wsHttpBinding" contract="Contoso.TokenService" /> 

B. Insert the following line at line 05. <endpoint address="http://www.contoso.com" binding="basicHttpBinding" contract="Contoso.TokenService" /> 

C. Insert the following line at line 08. <add baseAddress="http://www.contoso.com" /> 

D. Insert the following line at line 08. < add baseAddress="net.tcp://www.contoso.com:8090" /> 

Answer:


Question No. 216

A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service. 

You must ensure that the client application can interact with the WCF service. 

What should you do? 

A. On the OperationContractAttribute, set the AsyncPattern property value to true. 

B. On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client. 

C. On the client, create a proxy derived from DuplexClientBase<TChannel>. 

D. On the client, use GetCallbackChannel<T>. 

Answer:


Question No. 217

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") 

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") 

Answer:


Question No. 218

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 ImpersonateCallerForAulOperations 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:


Question No. 219

You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache for many Web applications. The service contract is defined as follows. (Line numbers are included for reference only.) 

01 <ServiceContract()> 02 Public Interface IDataCache 03 

04 . . . 05 End Interface 06 07 08 Public Class DataCache 09 Implements IDataCache 10 

11 . . . 12 End Class 

You need to ensure that all users share the cache. 

Which code segment should you insert at line 07? 

A. <ServiceBehavior (InstanceContextMode : = InstanceContextMode.PerSession)> 

B. <ServiceBehavior(TransactionIsolationLevel:= IsolationLevel.RepeatableRead)> 

C. <ServiceBehavior(TransactionIsolationLevel:= IsolationLevel.ReadCommitted)> 

D. <ServiceBehavior(InstanceContextMode:= InstanceContextMode.Single)> 

Answer:


Question No. 220

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:


Question No. 221

DRAG DROP 

You develop a Windows Communication Foundation (WCF) service that is hosted within a console application. The service implements the IRegistrationService interface in a class named RegistrationService. The service uses the following endpoint URL: 

http://localhost:8080/registrationservice/basic 

You need to configure the console application to host the service. 

How should you complete the relevant markup? (To answer, drag the appropriate markup segment to the correct location in the answer area. Each 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 No. 222

You are creating a Windows Communication Foundation (WCF) service based on WSHttpBinding. New audit requirements dictate that callers must be authenticated on every call to ensure that their credentials have not been revoked. 

You need to ensure that the service will not cache the security request token. 

What should you do? 

A. Apply a ServiceBehavior attribute to the service implementation class with the InstanceContextMode property set to Single. 

B. In the message security configuration, change clientCredentialType from IssuedToken to UserName. 

C. In the message security configuration, set establishSecurityContext to false. 

D. At the end of every operation, call the SessionStateUtility.RaiseSessionEnd method. 

Answer:


Question No. 223

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 serviceAuthorizationManagerType attribute of the serviceAuthorization behavior to Message. 

B. Set the includeExceptionDetaillnFaults 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. 

Answer:


Question No. 224

Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc. 

The <system.serviceModel> section of the configuration file is as follows. (Line numbers are included for reference only.) 

01 <system.serviceModel> 

02 

<behaviors> 

03 <serviceBehaviors> 

04 <behavior> 

05 <serviceDebug 

includeExceptionDetailInFaults="false"/> 

06 

07 </behavior> 

08 </serviceBehaviors> 

09 </behaviors> 

10 <serviceHostingEnvironment 

multipleSiteBindingsEnabled="true" /> 

11 </system.serviceModel> 

You need to ensure that the service publishes the WSDL description at 

http://services.contoso.com/OrderLookupService.svc?wsdl. 

What should you do? 

A. Change the serviceDebug element at line 05 as follows. 

<serviceDebug includeExceptionDetailInFaults="true"/> 

B. Insert the following element at line 06. 

<serviceDiscovery> 

< announcementEndpoints> 

<endpoint name="wsdlAnnouncement" kind="udpAnnouncementEndpoint" /> 

</announcementEndpoints> 

</serviceDiscovery> 

C. Insert the following element at line 06. 

<serviceMetadata httpGetEnabled="true" /> 

D. Insert the following element at line 06. 

<serviceMetadata httpGetEnabled="false" /> 

Answer:


Question No. 225

You develop a Windows Communication Foundation (WCF) service. 

You name the service MovieService in the Movie namespace. The service is hosted in Microsoft Internet Information Services (IIS). 

You copy the assembly containing the service to the bin folder in the virtual directory path. 

You need to set up the URI that is mapped to the service. 

What should you do? 

A. Add the following code segment to the web.config file. 

<serviceHostingEnvironment> 

<serviceActivations> 

odd relativeAddress="./Movie" service="Movie.MovieService"/> 

</serviceAct ivations> 

</serviceHostingEnvironment> 

B. Add a Movie.svc file in the root of the virtual path with the following line. 

<%8ServiceHost language="C#" Service="MovieService"*> 

C. Add the following code segment to the web.config file. 

<serviceHostingEnvironment> 

<serviceActivations> 

odd relativeAddress=" . /Movie, svc" service="Hovie.MovieService"/> 

</serviceActivations> 

</serviceHostingEnvirorunent> 

D. Add a Movie.svc file in the root of the virtual path with the following line. 

<%8ServiceHost language="C#" Service="MovieService.svc"%> 

Answer: