WCF Interview Questions and Answers
WCF Interview Questions Windows Communication Foundation Interview Questions
What is Windows Communication Foundation?
Windows Communication Foundation is Microsoft's unified programming model for building service-oriented applications with managed code. It extends the .NET Framework to enable developers to build secure and reliable transacted Web services that integrate across platforms and interoperate with existing investments. Windows Communication Foundation combines and extends the capabilities of existing Microsoft distributed systems technologies, including Enterprise Services, System.Messaging, Microsoft .NET Remoting, ASMX, and WSE to deliver a unified development experience across multiple axes, including distance (cross-process, cross-machine, cross-subnet, cross-intranet, cross-Internet), topologies (farms, fire-walled, content-routed, dynamic), hosts (ASP.NET, EXE, Windows Presentation Foundation, Windows Forms, NT Service, COM+), protocols (TCP, HTTP, cross-process, custom), and security models (SAML, Kerberos, X509, username/password, custom).
How does Windows Communication Foundation address Service Oriented Architecture (SOA)?
Windows Communication Foundation is the first programming model built from the ground up to provide implicit service-oriented application development, enabling developers to work autonomously and build applications that are more version independent, thereby increasing application resilience to change.
How do Windows Communication Foundation and BizTalk work together?
BizTalk and Windows Communication Foundation are complementary technologies. BizTalk provides business process orchestration, message transformation, business activity monitoring, and more through designers and visual tools. Windows Communication Foundation provides a unified framework for building secure and reliable transacted Web services. When Windows Communication Foundation ships, BizTalk will provide a Windows Communication Foundation adapter that enables Windows Communication Foundation services to be incorporated into business process orchestration. In future versions of BizTalk, the integration between the technologies will be even more seamless, with Windows Communication Foundation providing the core messaging and Web service capabilities of BizTalk. How does Windows Communication Foundation relate to Visual Studio 2005? Visual Studio 2005 is the next release of the .NET Framework and Visual Studio development tools. Windows Communication Foundation is a set of additional managed class libraries that provide a unified framework for building advanced Web services. Windows Communication Foundation extends the .NET Framework and is fully compatible with Visual Studio 2005, meaning that developers using Visual Studio 2005 will be able to program against the Windows Communication Foundation class libraries using the language of their choice, their existing skills, and a familiar environment.
What is the relationship of Windows Communication Foundation to Web Services Enhancements 2.x to ASP.NET Web services?
Web Services Enhancements (WSE) augments ASP.NET Web services support with key WS-* features; Windows Communication Foundation is the next-generation Web services infrastructure for Windows. The version of WSE that ships prior to Windows Communication Foundation will be wire-level compatible and Microsoft will provide guidance to customers and developers on upgrading WSE code to Windows Communication Foundation.
Is Windows Communication Foundation going to interoperate with my existing applications?
The current plan is for Windows Communication Foundation to provide wire-level interoperability with WSE3, System.Messaging, .NET Enterprise Services, and ASMX applications. With minimal or no changes to code, applications built with these technologies will be able to call Windows Communication Foundation services and be callable by Windows Communication Foundation services.
Will Windows Communication Foundation applications interoperate with Web services built with other technologies?
Yes. By default, services built with Windows Communication Foundation will communicate with other services based on the interoperable Web services specifications. This means that Windows Communication Foundation services will communicate with any application built on an infrastructure that also conforms to these standards. Microsoft is deeply committed to platform interoperability and is an active member of key standards organizations defining the latest Web services standards. Microsoft also continues to engage in public interoperability workshops to help ensure cross-platform communication with other vendors.
Will Windows Communication Foundation be backwards compatible with existing distributed systems technologies?
Windows Communication Foundation represents the next logical version for each of today's distributed systems stacks. As such, developers using today's technologies will be able to apply their existing skills to Windows Communication Foundation application development. In addition, Windows Communication Foundation will enable side-by-side operation of applications built with existing technologies and Windows Communication Foundation-based applications. Finally, Microsoft will provide guidance for developers upgrading existing code from ASMX, .NET Remoting, .NET Enterprise services, WSE, System.Messaging to Windows Communication Foundation. What are the core components of an Windows Communication Foundation service? A service class, implemented in C# or VB.NET or another CLR-based language that implements one or more methods; A host environment?an application domain and process?in which the service runs; One or more endpoints that allow clients to access the service.
What attachments protocol will be used in Windows Communication Foundation?
SOAP Message Transmission Optimization Mechanism (MTOM) will be the attachment technology supported in Windows Communication Foundation.
Will Windows Communication Foundation support transactions that can be coordinated across different platforms?
Yes. Windows Communication Foundation will plug into the Microsoft Distributed Transaction Coordinator (MSDTC) extensibility model and will support WS-AtomicTransaction as well as WS-Coordination to enable coordinated transactions across platforms.
Does Windows Communication Foundation support peer-to-peer interaction?
Yes. Windows Communication Foundation services can be hosted in a variety of application types, including desktop applications (built with Windows Presentation Foundation or Windows Forms), COM+ components, Windows Services, etc. This enables developers to simply build service endpoints and have Windows Communication Foundation handle the communication between them.
What is Windows Communication Foundation's default communication encoding on the wire?
By default, Windows Communication Foundation uses SOAP (perhaps with some WS-* extensions), represented on the wire in its usual text-based XML encoding. When two Windows Communication Foundation-based services communicate with each other, however, it makes sense to optimize this communication. All of the same features are provided, including reliable messaging, security, and transactions, but the wire encoding used is an optimized binary version of SOAP. Messages still conform to the data structure of a SOAP message, referred to as its Infoset, but their encoding uses a binary representation of that Infoset rather than the standard angle-brackets-and-text format of XML.
Does Windows Communication Foundation support both synchronous and asynchronous messaging?
Yes. Windows Communication Foundation supports multiple message patterns, including one-way, request/response, two-way (duplex), and queued.
How are Windows Communication Foundation services hosted?
A class implementing a Windows Communication Foundation service is typically compiled into a library. By definition, all libraries need a host application domain and Windows process to run in. Windows Communication Foundation provides two options for hosting libraries that implement services. One is to use a host application domain and process provided by the Windows Activation Service (WAS), while the other allows a service to be hosted in any application domain running in an arbitrary process (such as a Windows Forms application, a console application, an NT Service, etc).
What is Service-Orientation and how is it related to Windows Communication Foundation?
Service Orientation is a specific set of architectural principles for building loosely coupled services that help developers maximize the return on your application investments over time. The services have explicit boundaries, are autonomous, share schema and contracts, and determine compatibility based on policy. Applications based on these principles provide benefits in maintainability, reusability, and manageability of connected systems. Windows Communication Foundation is the first programming model built from the ground up for building service-oriented applications.
How will Windows Communication Foundation make service-oriented development easier?
Today, it is difficult to build service-oriented applications due to the lack of an intuitive service-oriented programming model. Web services provide a great start, but lack support for more advanced communication, including secure and reliable transacted services. Windows Communication Foundation provides both an intuitive service-oriented programming model and the advanced functionality to create service-oriented applications that interoperate across organizational and platform boundaries.
What specifications will Windows Communication Foundation support?
Windows Communication Foundation will support a broad range of Web services standards, including basic standards (XML, XSD, XPath, SOAP, WSDL) and advanced standards and specifications that comprise the WS-* architecture. These include WS-Addressing, WS-Policy, WS-Security, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-AtomicTransaction, WS-Coordination, WS-Policy, and MTOM.