PrepAway - Latest Free Exam Questions & Answers

Tag: 70-523

Exam 70-523: Upgrade: Transition your MCPD .NET Framework 3.5 Web Developer Skills to MCPD .NET Framework 4 Web Developer

What should you do?

You are creating a Windows Communication Foundation (WCF) service that implements operations in a
RESTful manner.
You need to add a delete operation.
You implement the delete method as follows.
string void DeleteItems(string id);
You need to configure WCF to call this method when the client calls the service with the HTTP DELETE
operation. What should you do?

Which approach should you recommend?

You are designing a data access service backed by Microsoft SQL Server. Other developers will use your service as a third-party service.
You have the following requirements:
To reduce maintenance cost, you must write the minimal amount of code required for fulfilling the goals.
The service must function with Microsoft and non-Microsoft technologies.
The service must implement the WS-Security standards.
You need to design the service to meet the requirements.
Which approach should you recommend?

What should you do?

You are creating a Windows Communication Foundation (WCF) service to process orders.
The data contract for the order is defined as follows.
[DataContract]
public class Order {
[DataMember] public string CardHolderName { get; set; [DataMember]
public string CreditCardNumber { get; set; }
}
You have the following requirements:
“Enable the transmission of the contents of Order from the clients to the service.
“Ensure that the contents of CreditCardNumber are not sent across the network in clear text.
“Ensure that the contents of CreditCardNumber are accessible by the service to process the order.
You need to implement the service to meet these requirements.
What should you do?

Which two actions should you perform?

You are adding a Windows Communication Foundation (WCF) service to an existing application. The application is configured as follows. (Line numbers are included for reference only.)
01 <configuration>
02 <system.serviceModel>
03 <services>
04 <service name=”Contoso.Sales.StockService”
05 behaviorConfiguration=”MetadataBehavior”>
06 <host>
07 <baseAddresses>
08 <add
baseAddress=”http://contoso.com:8080/StockService” />
09 </baseAddresses>
10 </host>
11 </service>
12 </services>
13 <behaviors>
14 <serviceBehaviors>
15 <behavior name=”MetadataBehavior”>
16 </behavior>
17 </serviceBehaviors>
18 </behaviors>
You need to configure the service to publish the service metadata.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

What are two possible ways to achieve this goal?

A WCF service code is implemented as follows. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 <ServiceBehavior(
03InstanceContextMode:=InstanceContextMode.Single)>
04Public Class CalculatorService
05
06 <OperationContract()>
07Public Function Calculate(ByVal op1 As Double,
08ByVal op As String, ByVal op2 As Double) As Double

24End Function
25
26End Class
You need to increase the rate by which clients get the required response from the service.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)

?

You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF).
The client configuration is as follows.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name=”SocialConfig”>
<security mode=”TransportCredentialOnly”>
<transport clientCredentialType=”Basic”
?realm=”Social API” />
</security>
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address=”http://contoso.com”
binding=”webHttpBinding”
bindingConfiguration=”SocialConfig”
contract=”ISocialStatus”
name=”SocialClient” />
</client>
</system.serviceModel>
The service contract is defined as follows.
[ServiceContract]
public interface ISocialStatus
{
[OperationContract]
[WebInvoke(UriTemplate =
“/statuses/update.xml?status={text}”)]
void UpdateStatus(string text);
}
Which code segment should you use to update the social status?

What should you do?

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(IncludeExceptionDetailsInFaults = true)]
03 public class OrderService
04 {
05 [OperationContract]
06 public void SubmitOrder(Order anOrder)
07 {
08 try
09 {
10
11 }
12 catch(DivideByZeroException ex)
13 {
14
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?

Which XML segment should you add to the system.serviceModel configuration section of the web.config file?

Four Windows Communication Foundation (WCF) services are hosted in Microsoft Internet Information Services (IIS). No behavior configuration exists in the web.config file.
You need to configure the application so that every service and endpoint limits the number of concurrent calls to 50 and the number of concurrent sessions to 25.
Which XML segment should you add to the system.serviceModel configuration section of the web.config file?


Page 3 of 1412345...10...Last »