070-565 Free Dumps Study Materials
Question 13: }
The BusinessComponent.ProcessTransaction method will only throw exceptions from the
ApplicationException type. You plan to debug the WCF service.
You need to ensure that the WCF service meets the following requirements:
Detailed exception information is provided to the client application.
Subsequent calls can be issued to the service by using the same proxy intance after an exception is
caught in the client application.
What should you do?
A. Add the following code segment at line 08.
[ServiceBehavior(IncludeExceptionDetailInFaults=true)]
Add the following code segment at line 16.
throw appEx;
B. Add the following code segment at line 05.
[FaultContract(typeof(ApplicationException))]
Add the following code segment at line 16.
throw appEx;
C. Add the following code segment at line 08.
[ServiceBehavior(IncludeExceptionDetailInFaults=true)]
Add the following code segment at line 16.
throw new FaultException<ApplicationException>(appEx);
D. Add the following code segment at line 05.
[FaultContract(typeof(ApplicationException))]
Add the following code segment at line 16.
throw new FaultException<ApplicationException>(appEx);
Correct Answer: D
18. You create a Windows Communication Foundation (WCF) application by using Microsoft Visual Studio
2008 and the .NET Framework 3.5.
You create a WCF service by using the following code segment. (Line numbers are included for reference
only.)
01 <ServiceContract()> _
02 Public Interface IContosoService
03
04 <OperationContract()> _
05 Sub ProcessTransaction()
06
07 End Interface
08
09 Public Class ContosoService
10 Implements IContosoService
11
12 Public Sub ProcessTransaction() _
Implements IContosoService.ProcessTransaction
13 Try
14 BusinessComponent.ProcessTransaction()
15 Catch appEx As ApplicationException
16
17 End Try
18 End Sub
19 End Class
The BusinessComponent.ProcessTransaction method will only throw exceptions from the
ApplicationException type. You plan to debug the WCF service.
You need to ensure that the WCF service meets the following requirements:
Provides detailed exception information to the client application.
Subsequent calls can be issued to the service by using the same proxy intance after an exception is
caught in the client application.
What should you do?
A. Add the following code segment at line 08.
<ServiceBehavior(IncludeExceptionDetailInFaults:=True)>
Add the following code segment at line 16.
Throw appEx
B. Add the following code segment at line 06.
<FaultContract(GetType(ApplicationException))>
Add the following code segment at line 16.
Throw appEx
C. Add the following code segment at line 08.
<ServiceBehavior(IncludeExceptionDetailInFaults:=True)>
Add the following code segment at line 16.
Throw New FaultException(Of ApplicationException)(appEx)
D. Add the following code segment at line 06.
<FaultContract(GetType(ApplicationException))>
Add the following code segment at line 16.
Throw New FaultException(Of ApplicationException)(appEx)
Correct Answer: D
19. You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application design specifies the following components:
A user interface implemented as an ASP.NET 3.5 Web application
A Microsoft SQL Server 2005 database to store business data
A Windows Communication Foundation (WCF) service that authenticates users that have their
credentials stored in the SQL Server database
A business data service to transfer data between the user interface and the SQL Server database
In future releases, the application must also be able to authenticate business partners who use
non-Microsoft directory servers to store user credentials.
You need to ensure that the application design meets the extensibility requirements.
What should you do?
A. Implement the business data service as a WCF service.
B. Host the Web application on multiple load-balanced Web servers.
C. Add an abstraction layer between the user interface and the authentication service.
D. Implement database objects that store the corporate user credentials in the same SQL Server
database as the business data.
Correct Answer: C