You create an application by using Microsoft Visual Studio .NET 2008 and the .NET
Framework 3.5. The application exposes a Windows Communication Foundation (WCF)
service. The service will be consumed by a client-side code that runs in the Web
pages of an ASP.NET AJAX Web application. You need to ensure that data
serialization between the service and the application incurs minimum latency.
Which data format should you use?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET
Framework 3.5. The application processes sales order documents. The application
contains a component that retrieves the sales order documents from a FTP server
and stores the data in a Microsoft SQL Server database. You need to ensure that
the component meets the following requirements:
Periodically polls the FTP server to check for new order documents Executes
without dependencies on other software components Executes without user
interaction
Executes by using a specific security context
Allows system administrators to change the security context by retaining the same
component code What should you do?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET
Framework 3.5. You configure the Windows Communication Foundation (WCF) service
to be exposed by using the HTTP and TCP endpoints. You plan to deploy the WCF
service. You need to identify the host environment that provides the following
services:
Message-based activation
Health management
Process recycling capabilities
Which hosting environment should you use?
You are creating an application by using Microsoft .NET Framework 3.5. You use
Windows Communication Foundation (WCF) to create the application. The
YourUserNamePasswordValidator class is implemented in the host application of the
WCF service. The host application is named YourServiceHost.exe. You write the
following code segment.
namespace YourSecureService
{
class YourUserNamePasswordValidator : UserNamePasswordValidator {
public override void Validate(string userName, string password)
{
...
}}
}
You need to perform custom validation of the user name and password by using the
YourUserNamePasswordValidator class. What should you do?
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();
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?
You are creating a Windows Communication Foundation (WCF) service by using
Microsoft .NET Framework 3.5. The service will be hosted on a Web server. You
plan to deploy the service in an existing Web application. You need to identify
the Web applications on the Web server that are registered for WCF. Which utility
should you use?
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5. You create the following service contract. (Line numbers are
included for reference only.)
01 [ServiceContract]
02 public interface IMyService
03 {
04 [OperationContract]
06 List GetData(int index);
07 }
You need to ensure that the GetData operation can be accessed by using the URI in
the following manner:
GetData/1 for the index value 1
GetData/2 for the index value 2
..
GetData/n for the index value n
Which code segment should you insert at line 05?
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5. The service has an operation contract named GetMessage. You
write the following code segment to implement the service. (Line numbers are
included for reference only.)
01 public Message GetMessage()
02 {
03 Message msg=null;
04 string action="GetMessageResponse";
05 MessageVersion ver=MessageVersion.Default;
06 FileStream stream=new FileStream(@"D:\File.xml", 07 FileMode.OpenOrCreate);
09 return msg;
10 }
You need to send the contents of the File.xml file to a client application by
using the SOAP body.
Which code segment should you insert at line 08?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET
Framework 3.5. The component will return custom business objects. You plan to
develop a design strategy that meets the following requirements:
The component can be accessed by the .NET Windows applications and JavaScript-
based Web applications. The component can be consumed by the client applications
by using the minimum amount of code. The least amount of network bandwidth is
consumed. You need to implement the design strategy by using the minimum amount
of development effort. What should you do?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET
Framework 3.5. The application exposes a Windows Communication Foundation (WCF)
service that will be consumed by an ASP.NET application. The WCF application and
the ASP.NET application will be
deployed on the same server. You need to ensure that the WCF service meets the
following requirements:
The communication between the applications incurs minimum latency. The binding
satisfies the ordered delivery constraint that is specified in the service
implementation by using the DeliveryRequirements attribute.
Which binding object should you use?