You are developing a Windows Communication Foundation (WCF) service to provide shopping cart support.
ASP.NET compatibility mode is not enabled. The shopping cart information must be retained across user
visits to the store until the user explicitly empties the cart or submits the cart contents to order.
You need to implement the service as a DurableService.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.
Use basicHttpBinding for both the client application and the service.
B.
Create the persistence provider database and configure the persistenceProvider element of the service behavior to point to that database.
C.
Use wsHttpContextBinding for both the client application and the service.
D.
In the method to add an item to the shopping cart, serialize the shopping cart contents after adding the current item and storing it in a Session variable.
Explanation:
Durable services are Windows Communication Foundation (WCF) services that use context bindings, attributes,
and new configuration elements to persist service state information to a store, such as a SQL database,
which means that durable services have the capability to restore their own state when they are recycled.
Durable services are useful when implementing long-running stateful conversations.Durable services are Windows Communication Foundation (WCF) services that are designed to be durable and long-running,
and to survive application and server restarts. Durable services are persisted using either the out-of-the-box provider created by
a SqlPersistenceProviderFactory or a custom persistence provider derived from the abstract class PersistenceProvider or LockingPersistenceProvider.Caution:
To use SqlPersistenceProviderFactory, create your persistence database using the scripts from .NET Framework 3.0.
These scripts install by default to the C:\Windows\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\EN\*.sql directory.Tutorial: Create a Durable Service
(http://msdn.microsoft.com/en-us/library/bb628514(v=vs.90).aspx)
BC