Final Review - Tutorial Questions Flashcards
Which .NET attribute is used to decorate a WCF service contract definition? That is, the entire contract, not the individual methods/properties of the contract.
ServiceContract
What instance mode causes nothing to be displayed or no change to be visible?
PerCall
What instance mode allows the client to see its own changes but not those of any other instance?
PerSession
What instance mode allows all clients to have access to the changes made by other instances?
Single
What is it absolutely necessary to adjust in the service configuration to maintain a working application when switching to a different binding?
The endpoint address
Why apply the ServiceBehavior attribute to a class?
To customize the instancing behavior of the class
Which WCF uses PerCall instancing as its default instancing mode?
BasicHttpBinding
What is the default instancing mode of NetTcpBinding and NetNamedPipeBinding?
PerSession
What is the PerCall instancing mode of all three bindings?
PerCall
What is the PerSession instancing mode of BasicHttpBinding?
PerCall
What is the PerSession instancing mode of NetTcpBinding and NetNamedPipeBinding?
PerSession
What is the Single instancing mode of all three bindings?
Single
The following line appears in connectToMessageBoard() in the client’s MainWindow class:
DuplexChannelFactory<IMessageBoard> channel = new DuplexChannelFactory<IMessageBoard>(this, "MessagingService");</IMessageBoard></IMessageBoard>
What is the significance of the argument “this” in the above call?
It’s the client object that implements the callback method
Which type of contract is NOT ever implemented by a WCF service?
A callback contract
What is the purpose of the WCF callbacks implemented in Tutorial 6?
To allow the service to update all clients in real time with changes to the MessageBoard service object