1.
Which of the following WCF component is the heart of WCF and is responsible for serving any class as a WCF service provided the class implement an interface with the ServiceContract attribute ?
Correct Answer
B. WCF Runtime
Explanation
The WCF Runtime is the heart of WCF and is responsible for serving any class as a WCF service, provided that the class implements an interface with the ServiceContract attribute. It handles the execution and management of WCF services, including message processing, serialization, and deserialization. The WCF Runtime ensures that the service contracts are properly implemented and facilitates the communication between the service and the client.
2.
Which of the following element of the WCF architecture specifies how to host a service class on the server application ?
Correct Answer
C. Endpoint
Explanation
The endpoint element of the WCF architecture specifies how to host a service class on the server application. The endpoint acts as a bridge between the client and the service, defining the address, binding, and contract of the service. It specifies the communication protocol, message encoding, and other settings required to expose the service to clients. By configuring the endpoint, the service class can be hosted and made accessible to clients over the network.
3.
The ChannelFactory is useful only when interface library is shared with the client.
Correct Answer
A. True
Explanation
The ChannelFactory is a class in .NET that is used to create channels for communication between a client and a service. It is particularly useful when the interface library, which contains the service contract, is shared with the client. This allows the client to create a channel to the service without having to generate proxy classes manually. The ChannelFactory uses the interface library to dynamically create the necessary proxy classes at runtime. Therefore, the statement "The ChannelFactory is useful only when interface library is shared with the client" is true.
4.
Enterprise application build SOA basically consists of which the following building block ?1. Code2. Server Program3. Client Program
Correct Answer
B. 2,3
Explanation
The correct answer is 2,3. In an enterprise application built using Service-Oriented Architecture (SOA), the building blocks include a server program and a client program. The server program is responsible for providing services and processing requests from the client program. The client program interacts with the server program to access and utilize these services. Both the server and client programs are essential components of an SOA-based enterprise application.
5.
Instead of specifying information for endpoints, contracts and channels in a configuration file, you can also use code to write the same
Correct Answer
A. True
Explanation
The given statement is true. Instead of specifying information for endpoints, contracts, and channels in a configuration file, it is possible to use code to write the same information. This means that rather than relying on a separate configuration file, the necessary details can be directly written in the code itself. This approach can provide more flexibility and control over the configuration process, allowing for dynamic changes and customization based on specific requirements.
6.
Which of the following Binding Category support Peer to Peer Transport Protocol ?
Correct Answer
B. Connection Oriented
Explanation
Connection Oriented binding category supports Peer to Peer Transport Protocol. This type of binding establishes a connection between the sender and receiver before data transmission, ensuring reliable and ordered delivery of data. In a peer-to-peer network, where all nodes have equal capabilities, a connection-oriented protocol is necessary for efficient communication between peers. Therefore, connection-oriented binding category is the correct choice for supporting Peer to Peer Transport Protocol.
7.
Which of the following protocols are not supported by Web Server IIS 6 ?1. HTTP2. net.tcp3. net.pipe4. net.msmq
Correct Answer
B. 2,3,4
Explanation
Web Server IIS 6 does not support the protocols net.tcp, net.pipe, and net.msmq. These protocols are not compatible with IIS 6 and therefore cannot be used with this web server.
8.
Which of the following statements related to WCF are correct ?
Correct Answer(s)
B. When transactions are handled in SOA, it forces you to adhere to ACID properties.
C. Transactions in a WCF service are allowed by common bindings
Explanation
In a WCF service, transactions are allowed by common bindings, meaning that transactions can be implemented and managed within the service using commonly available bindings. Additionally, when transactions are handled in a Service-Oriented Architecture (SOA), it enforces adherence to ACID properties, which stands for Atomicity, Consistency, Isolation, and Durability. This ensures that transactions are reliable, consistent, and maintain data integrity. Therefore, both statements related to WCF in the given options are correct.
9.
Which of the following options can be used the TransactionFlowOption attribute ?1. Not Allowed2. Mandatory3. Distributed Transactions
Correct Answer
B. 2, 3
Explanation
The TransactionFlowOption attribute can be used with the options 2 and 3, which are Mandatory and Distributed Transactions. The Mandatory option ensures that a transaction is required for the operation, while the Distributed Transactions option allows the operation to participate in a distributed transaction.
10.
Which of the following options are related to the Data Contracts are correct ?
Correct Answer(s)
A. Data Contract defines the type and format of data that should be exchanged between a client and the WCF service.
B. If a WCF service uses a data contract, the WCF Runtime should be informed to serialize or de-serialize custom data.
Explanation
The first statement is correct because a data contract is used to define the type and format of data that should be exchanged between a client and a WCF service. The second statement is also correct because if a WCF service uses a data contract, the WCF Runtime needs to be informed to serialize or de-serialize custom data. The third statement is incorrect because the Data Contract attribute is actually defined in the System.Runtime.Serialization namespace.