Apr 2016 updated: Pass4sure Microsoft 70-513 pdf exam 136-150

100% Guarantee of 70-513 exam answers materials and ebook 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 Apr 70-513 Study Guide Questions:

Q136. An ASP.NET application hosts a RESTful Windows Communication Foundation (WCF) service at /Services/Contoso.svc. The service provides a JavaScript resource to clients. You have an explicit reference to the JavaScript in your page markup as follows. 

<script type="text/javaScript" src="/Services/Contoso.svc/js" /> 

You need to retrieve the debug version of the service JavaScript. 

What should you do? 

A. In the <%@ ServiceHost %> header for /Services/Contoso.svc, set the Debug attribute to true. 

B. In the <%@ Page %> header, set the Debug attribute to true. 

C. In the script tag, append debug to the src attribute. 

D. In the script tag, add a debug attribute and set its value to true. 

Answer: C 


Q137. You are developing a windows Communication Foundation (WCF) service that will be hosted in Microsoft Intemnet Information Services (IIS) 7.0. 

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

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


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: B 


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


Q139. You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2. 

The service in Building1 is configured using the following discovery scopes. 


You need to ensure that the client application can discover the service in Building1 or the service in Building2. 

Which scopes should you add to the client configuration file? 

A. <scopes> 

<add scope="http://contoso.com/Chicago/*"/> 

</scopes> 

B. <scopes> 

<add scope="http://contoso.com/Chicago"/> 

</scopes> 

C. <scopes> 

<add 

scope="ldap:///ou=Building,ou=Chicago,o=contoso,c=us"/> 

</scopes> 

D. <scopes> 

<add 

scope="ldap:///ou=*,o=contoso,c=us"/> 

</scopes> 

Answer: B 


Q140. 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 free draindumps

Far out 70-513 download:

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

01 <ServiceContract()> 

02 Public Interface IDataAccessService 

03 

04 <OperationContract()> 

05 Sub PutMessage(ByVal message As String) 

06 

07 <OperationContract()> 

08 <FaultContract(GetType(TimeoutFaultException))> 

09 <FaultContract(GetType(FaultException))> 

10 Function SearchMessages(ByVal search As String) As String () 

11 

12 End Interface 

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 


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


Q143. You are developing a client that sends several types of SOAP messages to a Windows Communication Foundation (WCF) service method named PostData. 

PostData is currently defined as follows. 

[OperationContract] 

void PostData(Order data); 

You need to modify PostData so that it can receive any SOAP message. 

Which code segment should you use? 

A. [OperationContract(IsOneWay = true, Action = "*", ReplyAction = "*")] void PostData(Order data); 

B. [OperationContract(IsOneWay = true, Action = "*", ReplyAction = "*")] void PostData(BodyWriter data); 

C. [OperationContract] void PostData(BodyWriter data); 

D. [OperationContract] void PostData(Message data); 

Answer: D 


Q144. You develop a Windows Communication Foundation (WCF) service. Many client applications will consume the service. 

You have the following requirements: 

You must enable client sessions on the service. 

The service must support multi-threaded operations. 

If a client application uses sessions, the lifetime of the service instance must be 

scoped to the lifetime of the session. 

If a client application does not use sessions, the lifetime of the service must be 

scoped to the lifetime of a method cal 

You need to configure the service. 

What should you do? (Each correct answer presents part of the solution. Choose three.) 

A. In the ServiceContract attribute, set the value of the InstanceContextMode property to InstanceContextMode.PerSession. 

B. In the ServiceContract attribute, set the value of the SessionMode property to SessionMode.Allowed. 

C. In the ServiceBehavior attribute, set the value of the InstanceContextMode property to InstanceContextMode. PerSession. 

D. In the ServiceContract attribute, set the value of the ConcurrencyMode property to ConcurrencyMode.Multiple 

E. In the ServiceBehavior attribute, set the value of the ConcurrencyMode property to ConcurrencyMode.Multiple 

F. In the ServiceBehavior attribute, set the value of the SessionMode property to SessionMode.Allowed. 

Answer: BCE 


Q145. A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients. (Line numbers are included for reference only.) 


You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is updated by any client calling PutMessage. 

What should you do? 

A. Add the following attribute to the TeamMessageService class, before line 10. 

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 

B. Add the following attribute to the TeamMessageService class, before line 10. 

[ServiceBehavior(InstanceContextMode = 

InstanceContextMode.PecSession) ] 

Than change che binding definition on the service at line 25, and on the client to the following. 

WSHttpBinding binding = new WSHttpBinding(SecurityMode.None); 

binding.ReiiabieSession.Enabled = true; 


C. Pass a service instance to the instancing code in line 24, as follows. 

ServiceHost host = new ServiceHost(new TeamMessageService()); 

D. Redefine the message string in line 13, as follows. 

static string message = "Today’ s Message"; 

Then change the implementation of PutMessage in lines 19-22 to the following. 

public void PutMessage(string message) { 

TeamMessageService.message = message; > 

Answer: A 


70-513 free practice test

Refined 70-513 interactive bootcamp:

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


Q147. You have an existing Windows Communication Foundation (WCF) service. 

You need to ensure that other services are notified when the service is started. 

What should you do? 

A. Add the following standard endpoint to the service. 

<endpoint name="udpAnnouncementEndpoint" 

kind="udpDiscoveryEndpoint" /> 

B. Add the following standard endpoint to the service. 

<endpoint name="udpDiscoveryEndpoint" 

kind="udpAnnouncementEndpoint" /> 

C. Add a service behavior with the following element. 

<serviceDiscovery> 

<announcementEndpoints> 

<endpoint kind="udpDiscoveryEndpoint" /> 

</announcementEndpoints> 

</serviceDiscovery> 

D. Add a service behavior with the following element. 

<serviceDiscovery> 

<announcementEndpoints> 

<endpoint kind="udpAnnouncementEndpoint" /> 

</announcementEndpoints> 

</serviceDiscovery> 

Answer: D 


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


Q149. You are developing a Windows Communication Foundation (WCF) service. 

You need to enable security auditing for all events. 

What should you do? 

A. Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success. 

B. Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application. 

C. Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure. 

D. Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security. 

Answer: C 


Q150. You develop a Windows Communication Foundation (WCF) service that uses basic authentication for client credentials. This service is currently configured to use message security. 

The service is hosted on a server in workgroup mode. 

Users report that their passwords are stolen when they use public computers. 

You need to ensure that messages are secure and users are authenticated. 

You prevent the service from being called over HTTP through Microsoft Internet Information Services (IIS) configuration. What should you do next? 

A. Use the transportWithMessageCredential security mode and specify Basic for the transport client credential type. 

B. Use the message security mode and specify Basic for the transport client credential type. 

C. Use the transport security mode and specify None for transport client credential type. 

D. Use the transportWithMessageCredential security mode and specify None for the transport client credential type. 

Answer: B