PrepAway - Latest Free Exam Questions & Answers

Category: 70-569

Exam 70-569: UPGRADE: Transition your MCPD Enterprise Application Developer Skills to MCPD Enterprise Application Developer 3.5, Part 2

Which code segment should you add?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully defined a service contract named IManageOrders. You write the following code segment.

public class OrderImpl : IManageOrders {
public void MarkOrderClosed(int orderId){
try {

}
catch (SqlException exc){
throw new FaultException<DataFault>(new DataFault()); }}}
[DataContract]

public class DataFault {
}

You need to create a fault contract for the MarkOrderClosed method on the IManageOrders service contract. Which code segment should you add?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application connects to a Microsoft SQL Server 2005 database by using LINQ to SQL. The database contains a table named MarketTransaction. The MarketTransaction records must be validated against certain business rules before they are added to or updated in the database. You need to design a validation strategy for the MarketTransaction records. You also need to ensure that the schema changes do not affect the validation code. What should you do?

02 new Uri (?http://localhost:8000/ExamService?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment. (Line numbers are included for reference only.)

01 Uri baseAddress=
02 new Uri (?http://localhost:8000/ExamService?);
03 Uri mexAddress=new Uri(“”);
04 ServiceHost serviceHost=new ServiceHost(typeof( 05 ExamService), baseAddress);
06 ServiceMetadataBehavior smb=
07 serviceHost.Description.Behaviors.
08 Find<ServiceMetadataBehavior>();
09 if (smb != null)
10 {
12 }
13 else
14 {
15 smb=new ServiceMetadataBehavior();
16 serviceHost.Description.Behaviors.Add(smb);

17 }
18 smb.HttpGetUrl=mexAddress;
When you browse to the base address of the service, you receive the following message:
“Metadata publishing for this service is currently disabled.” You debug the code and discover that the ServiceMetadataBehavior behavior was previously nonexistent. You need to enable metadata publishing. What should you do?


Page 7 of 14« First...56789...Last »