You create a client application by using Microsoft .NET Framework 3.5.
The client application consumes a Windows Communication Foundation service that uses the netMsmqBinding binding.
The binding uses a private transactional queue named Library. The following code
fragment is part of the application configuration file
(Line numbers are included for reference only.)
You need to specify the address of the endpoint.
Which attribute should you insert?
You create a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
The service contains the following code segment.
[DataContract]
public class Person{ }
[DataContract]
public class Customer: Person{ }
You need to create a service contract that meets the following requirements:
The service contract must have an operation contract named GetPerson that returns an object of Type Person.
The GetPerson operation must be able to return an object of Type Customer.
Which code segment should you use?
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5.
The service uses the net.tcp transport.
You need to ensure that when the server starts, the service starts and continues to run.
What should you do?
You create a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You write the following code segment.
01 [ServiceContract]
02 public class MyService
03 {
04 [OperationContract]
05
06 public void MyMethod()
07 {
08 ...
09 }
10 }
The service uses a transactional binding. The TransactionFlow property for the binding is set to true
You need to ensure that the MyMethod method meets the following requirements:
The method uses a client-side transaction if a client-side transaction exists.
The method uses a server-side transaction if a client-side transaction does not exist.
Which code segment should you insert at line 05?
You create 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 [ServiceContract(SessionMode=SessionMode.Required)]
02 public interface IOrderManager
03 {
04
05 void CloseOrder();
06 }
You need to decorate the operation as the method that closes the current session.
Which code segment should you insert at line 04?
You create a Windows Communication Foundation (WCF) application by using
Microsoft .NET Framework 3.5.
The desktop client calls the WCF service to query its status. The call can take up to 10 seconds to complete.
The client application must remain responsive when querying the service.
You need to generate the required proxy. What should you do?
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5.
You create the following service definition
[ServiceContract(SessionMode=SessionMode.Required)] public interface IMyService {...}
You need to custom manage the lifetime of the session.
Which service implementation should you use?
You create a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You write the following code segment.
01 [ServiceContract]
02 public interface IMyService
03 {
04 [OperationContract]
05 void MyMethod();
06 }
07
06 public class serviceImpl:IMyService
09 {
10 [OperationBehavior(TransactionScopeRequired=true)]
11 public void MyMethod(){ }
12}
You need to ensure that concurrent calls are allowed on the service instance.
Which code segment should you insert at line 07?
You are creating a Windows Communication Foundation service by using Microsoft
.NET Framework 3.5
You need to ensure that data sent in a SOAP header is in the following XML
format.
You are creating a distributed application by using Microsoft .NET Framework 3.5.
The application uses Windows Communication Foundation (WCF).
The distributed application provides point-to-point security.
You need to ensure that the distributed application provides end-to-end security instead of point-to-point security.
Which binding mode should you use?