Windows Communication Foundation (WCF) Flashcards
7 cards from real MCTS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Windows Communication Foundation (WCF) flashcards as text
In WCF, what does the ABC acronym stand for when describing an endpoint?
Answer: Address, Binding, Contract
Every WCF endpoint is defined by its Address (where it is), Binding (how to communicate), and Contract (what operations are available).
Which WCF binding is optimized for cross-machine communication over TCP and is NOT suitable for internet-facing services?
Answer: NetTcpBinding
NetTcpBinding uses the TCP transport for efficient intranet communication but is not suitable for internet scenarios because TCP port 808 is typically blocked by firewalls.
Which .NET attribute marks an interface as a WCF service contract?
Answer: [ServiceContract]
[ServiceContract] is applied to an interface or class to declare it as a WCF service contract, defining the overall service.
What is the default message encoding used by BasicHttpBinding?
Answer: Text/XML
BasicHttpBinding uses text-encoded XML by default, ensuring interoperability with non-WCF SOAP clients.
Which WCF service behavior must be enabled to allow clients to retrieve the service's WSDL metadata?
Answer: serviceMetadata
The serviceMetadata behavior, with httpGetEnabled or httpsGetEnabled set to true, exposes the WSDL so clients can generate proxies.
Which class is used to self-host a WCF service inside a managed .NET application such as a console app?
Answer: ServiceHost
ServiceHost is instantiated with the service type and base addresses to host a WCF service outside of IIS in any managed process.
Which WCF binding uses SOAP 1.2 by default and provides WS-* protocol support such as reliable messaging and security?
Answer: WSHttpBinding
WSHttpBinding implements SOAP 1.2 and supports WS-Security, WS-ReliableMessaging, and WS-AtomicTransaction, making it suitable for secure interoperable services.