nerdexam
Microsoft

70-513 · Question #62

You develop a Windows Communication Foundation (WCF) service. Many client applications will consume the service. You have the following requirements: - You must enable client sessions on the…

The correct answer is B. In the ServiceContract attribute, set the value of the SessionMode property to C. In the ServiceBehavior attribute, set the value of the InstanceContextMode property to E. In the ServiceBehavior attribute, set the value of the ConcurrencyMode property to. B (not F): Service ContractAttribute.SessionMode Property Gets or sets whether sessions are allowed, not allowed or required. - ServiceBehaviorAttribute Class ecifies the internal execution behavior of a service contract implementation…

Manage application lifecycle

Question

You develop a Windows Communication Foundation (WCF) service. Many client applications will consume the service. You have the following requirements:

  • You must enable client sessions on the service.
  • The service must support multi-threaded operations.
  • If a client application uses sessions, the lifetime of the service

instance must be scoped to the lifetime of the session.

  • If a client application does not use sessions, the lifetime of the

service must be scoped to the lifetime of a method cal You need to configure the service. What should you do? (Each correct answer presents part of the solution. Choose three.)

Options

  • AIn the ServiceContract attribute, set the value of the InstanceContextMode property to
  • BIn the ServiceContract attribute, set the value of the SessionMode property to
  • CIn the ServiceBehavior attribute, set the value of the InstanceContextMode property to
  • DIn the ServiceContract attribute, set the value of the ConcurrencyMode property to
  • EIn the ServiceBehavior attribute, set the value of the ConcurrencyMode property to
  • FIn the ServiceBehavior attribute, set the value of the SessionMode property to

How the community answered

(60 responses)
  • A
    8% (5)
  • B
    85% (51)
  • D
    2% (1)
  • F
    5% (3)

Explanation

B (not F): Service ContractAttribute.SessionMode Property Gets or sets whether sessions are allowed, not allowed or required. - ServiceBehaviorAttribute Class ecifies the internal execution behavior of a service contract implementation. - ServiceBehaviorAttribute.InstanceContextMode Property Gets or sets the value that indicates when new service objects are created. One of the InstanceContextMode values; the default value is PerSession. E (not D): ServiceBehaviorAttribute.ConcurrencyMode Property Gets or sets whether a service supports one thread, multiple threads, or reentrant calls. [ServiceContract( SessionMode=SessionMode.Required [ServiceBehavior( ConcurrencyMode=ConcurrencyMode.Single, InstanceContextMode=InstanceContextMode.PerSession, ReleaseServiceInstanceOnTransactionComplete=true

Topics

#WCF#session management#InstanceContextMode#ConcurrencyMode

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice