[Refresh] 70-513 braindumps

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:

Q226. DRAG DROP 

You have a client application that consumes a Windows Communication Foundation (WCF) service. The service contains a class named RegistrationService. The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations. 

The service has the following requirements: 

. The client application must call the SubmitRegistration method synchronously. 

. The client application must call the GetRegistrations method asynchronously. 

You need to complete the client-side code to call the WCF service. 

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


Answer: 


Q227. You are implementing a Windows Communication Foundation (WCF) service contract named IContosoService in a class named ContosoService. The service occasionally fails due to an exception being thrown at the service. 

You need to send the stack trace of any unhandled exceptions to clients as a fault message. 

What should you do? 

A. In the application configuration file on the client, add the following XML segment to the 

system.serviceModel/behaviors configuration section group. 

<endpointBehaviors> 

<behavior name=" debug "> 

< callback Debug includeExceptionDetailInFaults="true" /> 

</behavior> 

</endpointBehaviors> 

Associate the debug behavior with any endpoints that need to return exception details. 

B. In the application configuration file on the service and all the clients, add the following 

XML segment to the system.diagnostics/sources configuration section group. 

<source name="System.ServiceModel" switchValue=" Error " propagateActivity="true"> 

<listeners> 

<add name="ServiceModelTraceListener" 

initializeData="app_tracelog.svclog" 

type="System.Diagnostics.XmlWriterTraceListener" /> 

</listeners> 

</source> 

C. Apply the following attribute to the ContosoService class. <ServiceBehavior(IncludeExceptionDetailInFaults:=True)> 

D. For each OperationContract exposed by IContosoService , apply the following attribute. <FaultContract(GetType(Exception))> 

Answer: C 


Q228. You are maintaining a Windows Communication Foundation (WCF) service that uses a custom UserNamePassword class to authenticate clients. The service certificate is hosted in the deployment server store for trusted root certificate authorities and has a Subject value of TaxServiceKey. Other service certificates hosted on the server also use TaxServiceKey as a Subject value. 

You need to ensure that the service identifies itself with a certificate whose subject name and distinguished names are TaxServiceKey. 

Which code segment should you use? 

A. HostInstance.Credentials.ServiceCertificate.SetCertificate 

(StoreLocation.LocalMachine, StoreName.My, 

X509FindType.FindBySubjectName, 

"CN=TaxServiceKey") 

B. HostInstance.Credentials.ServiceCertificate.SetCertificate 

(StoreLocation.LocalMachine, StoreName.AuthRoot, 

X509FindType.FindBySubjectName, "CN=TaxServiceKey") 

C. HostInstance.Credentials.ServiceCertificate.SetCertificate 

(StoreLocation.LocalMachine, StoreName.My, 

X509FindType.FindBySubjectDistinguishedName, 

"CN=TaxServiceKey") 

D. HostInstance.Credentials.ServiceCertificate.SetCertificate 

(StoreLocation.LocalMachine, StoreName.Root, 

X509FindType.FindBySubjectDistinguishedName, 

"CN=TaxServiceKey") 

Answer: D 


Q229. You are developing a data contract for a Windows Communication Foundation (WCF) service. 

The data in the data contract must participate in round trips. Strict schema validity is not required. 

You need to ensure that the contract is forward-compatible and allows new data members to be added to it. 

Which interface should you implement in the data contract class? 

A. ICommunicationObject 

B. IExtension<T> 

C. IExtensibleObject<T> 

D. IExtensibleDataObject 

Answer: D 


Q230. 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: C 


70-513 actual exam

Down to date 70-513 training:

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


Q232. A WCF service code is implemented as follows. (Line numbers are included for reference only.) 

01 [ServiceContract] 02 [ServiceBehavior(InstanceContextMode = 03 InstanceConcextMode.Single)] 

04 public class CalculatorService 

05 { 

06 [OperacionContract] 

07 public double Calculate(double opl, string op, double op2) 

08 { 

… 

24 } 

25 } 

You need to decrease the response time of the service. 

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

A. Change the service behavior to the following. 

[ServiceBehavior( 

InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = 

ConcurrencyMode.Multiple) ] 

B. Change the service behavior to the following. 

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall) ] 

C. Require the clients use threads, the Parallel Task Library, or other mechanism to issue 

service calls in parallel. 

D. Require the clients to use async operations when calling the service. 

Answer: AB 


Q233. You are developing a custom service host for a Windows Communication Foundation (WCF) service. The service host is named MovieServiceHost. 

You need to deploy the service with the custom service host in Microsoft Internet Information Services (IIS) 7.0. 

What should you do? 

A. Create a factory for the custom service host. Name the factory MovieServiceHostFactory. In the web.config file, add the following attribute to the <add> element within the <serviceActivations> element, factory="HovieServiceHostFactory" 

B. Decorate the custom service host class with the following line. <System.ServiceModel.Activation.ServiceActivationBuildProvider()> 

C. Make sure that the service class has a default constructor. Add a public read-only property with the name ServiceHost that returns an instance of the MovieServiceHost class. 

D. Create a factory for the custom service host. Name the factory MovieServiceHostFactory. In the .svc file, add the following line. <%3 ServiceHost Service="MovieServiceHostFactory" Language="VB"%> 

Answer: A 


Q234. 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: D 


Q235. 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(Of TChannel). 

D. On the client, use GetCallbackChannel (Of T). 

Answer: C 


70-513 free practice questions

Real 70-513 certification:

Q236. A Windows Communication Foundation (WC9 service implements a contract with one-way and requestreply operations. 

The service is exposed over a TCP transport Clients use a router to communicate with the service. The router is impemented as follows. 

(Line numbers are included for reference only.) 

01 Dim host As ServiceHost = 

02 New ServiceHost(GetType(RoutingService)) 

03 hostAddServiceEndpoint( 

04 GetType(lSimplexDatagramRouter), 

05 New NetTcpBinding0, “net.tcp://localhostlRouter” 

06) 

07 Dim lep As List(Of ServiceEndpoint) = 

08 New List(Of SenviceEndpointx) 

09 lepAdd( 

10 New ServiceEndpoint( 

11 CortractDescription.GetContract( 

12 GetType(lSimplexDatagramRouter) 

13)1 

14 New NetTcpBinding0,x 

15 New EndpointAddressf’nettcp://localhost:8080/Logger’) 

16) 

17) 

18 Dim rc As RoutingConfiguration = New RoutingConfiguration() 

19 rc . FitterTable.Add(New Matctf4llMessageFilter0, lep) 

20 host. Description. Behaviors.Add(New RoutingBehavior(rc)) Request-reply operations are failing. 

You need to ensure that the router can handle one-way and request-reply operations. 

What should you do? 

A. Change line 04 as follows. 

Get Type(lRequestReplyRouter), 

B. Change line 04 as follows 

Get Type(lDuplexSessionRouter), 

C. Change line 12 as follows 

GetType(lRequestReplyRouter) 

D. Change line 12 as follows. 

Get Type(IDuplexSessionRouter) 

Answer: B 


Q237. A Windows Communication Foundation (WCF) application uses the following data contract. 


Which code segment should you use? 

A. [DataMember] 

public string firstName; 

[DataMember] 

public string lastName; 

[DataMember(EmitDefaultValue = true)] 

public int age = 0 ; 

[DataMember(EmitDefaultValue = true)] 

public int ID = 999999999; 

B. [DataMember(EmitDefaultValue = false)] 

public string firstName = null; 

[DataMember(EmitDefaultValue = false)] 

public string lastName = null; 

[DataMember(EmitDefaultValue = true)] 

public int age = -1; 

 [DataMember(EmitDefaultValue = false)] public int ID = 999999999; 

C. [DataMember(EmitDefaultValue = true)] 

public string firstName; 

[DataMember(EmitDefaultValue = true)] 

public string lastName; 

[DataMember(EmitDefaultValue = false)] 

public int age = -1; 

[DataMember(EmitDefaultValue = false)] 

public int ID = 999999999; 

D. [DataMember] 

public string firstName = null; 

[DataMember] public string lastName = null; 

[DataMember(EmitDefaultValue = false)] public int age = 0; 

[DataMember(EmitDefaultValue = false)] 

public int ID = 999999999; 

Answer: D 


Q238. A Windows Communication Foundation (WCF) service implements the following cortract. 

<ServiceContract0>? Public Interface lHeloServic e <operationContractQ> <WebGet(UriTempbte: =“helloname={name}”)s Function SayHello(Byval name As String) As nng End Interface The implementation is as follows Public Class HelloService Implements IHelloService 

Public Function SayHello(ByVal name As String) As String - Implements lHelloServiceSayHello 

Retumn “Hello “& name 

End Function 

End Cesst 

The service is self-hosted, and the hosting code is as follows. 

Dim stHost As WebServiceHo = CreateHost() 

svcHo Open() 

Consde ReadLine() 

svcHoaClose() 

You need to implement CreateHost so that the service has a single endpoint hosted 

http:/Ilocalhost8000/HeloService. 

Which code segment should you use? 

A. Dim svc Host As WebSennceHost = New WebServiceHost(GetType(HdloService)) 

svc HotsAddServiceEndpoint(GdType(lHelloService), 

New WebHttpBinding(WebHttpSecurityModeNone), 

“http:/Ibc alhost 8000!HelloService”) 

Return svc Host 

B. Dim baseAddress As Ur New Uri(”http:/i1ocahost:8000r) Dim svcHo As WebServiceHost 

New WebServiceHost(GetType(HelloService), baseAddress) 

svc Host.AddServiceEndpoint(GdType(lHelloService),? 

New Web Http Binding (WebHttpSec urityMode None), 

HelloService) 

Return svc Host 

C. Dim svc Host As WebServiceHost = New WebServiceHost(New HelloSennceO) 

svcHost.AddServiceEndpoint(GetType(IHelloService), 

New WebHttpBinding(WebHttpSecurityModeNone), 

Thttp://bc aihost: 8000/HelloSennce") 

Return svc Host 

D. Dim baseAddress As Ur = New Uri("http/I1ocahost 8OOOP Dim svcHo As 

WebServiceHost = New 

WebServiceHost(New HelloService0, baseAddress) 

svc HostAddServiceEndpoint(GdType(IHelIoService), 

New WebHttpBinding(WebHttpSecuntyMode None), 

"HelloService") 

Return svc Host 

Answer: B 


Q239. A Windows Communication Foundation (WCF) client and service share the following service contract interface. 

[ServiceContract] 

public interface IContosoService { 

[OperationContract] 

void SavePerson(Person person); 

They also use the following binding. 

NetTcpBinding binding new NetTcpBinding { TransactionFlow = true }; 

The client calls the service with the following code 

using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) 

{ IContosoService client = factoryCreateChannelO; 

client SavePerson(person); 

ConsoleWriteLine( 

TransactionCurrentTransactionlnformation. 

Distributedldentifier); 

tsCompleteO; 

The service has the following implementation for SavePerson 

public void IContosoService SavePerson(Person person) 

{ person.Saveo; 

ConsoleWriteLine(TransactionCurrentTransactionlnformation. 

Distributedidentifier); 

The distributed identifiers do not match on the client and the server 

You need to ensure that the client and server enlist in the same distributed transaction 

What should you do? 

A. Add the following attributes to the SavePerson operation on IContosoService. 

[OperationBehavior(TransactionScopeRequired = true)] 

[TransactionFlow(TransactionFlowOption. 

Mandatory)] 

B. Add the following attributes to the SavePerson operation on lContosoService 

[TransactionFlow(TransactionFlowOption Mandatory)] 

[OperationBehavior(TransactionScopeRequired true)] 

C. Add the following attribute to the SavePerson operation on lContosoSernce [OperationBehavior(TransactionScopeRequired true)] Md the following attribute to the implementation of SavePerson. ITransactionFlow(TransactionFlowOptionAllowed)] 

D. Add the following attribute to the SavePerson operation on lContosoService [TransactionFlow(TransactionFlowOption Allowed)] Add the following attribute to the implementation of SavePerson. [OperationBehavior(TransactionScopeRequired true)] 

Answer: D 


Q240. You are modifying a Windows Communication Foundation (WCF) service that provides access to report generation system. The following code segment is part of your service contract. (Line numbers are included for reference only.) 


Client applications are blocked while the service processes reports. You need to ensure that the service methods are asynchronous. 

What should you do? 

A. Insert the following code at line 04. 

[OperationContract] 

Insert the following code at line 07. 

[OperationConcracc(AsyncPactern = true)] 

B. Insert the following code at line 04. 

[OperationConcracc(AayncPaccern = true)] 

C. Insert the following code at line 04. 

[OperotionConcroct(AsyncPactern = false) 

Insert the following code at line 07. 

[OperacionConcracc(AsyncPactern = true)] 

D. Insert the following code at line 04. 

[OperationContract (AsyncPattern = false)] 

Answer: B 



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