WCF/WCF Mcq Question Set 1 Sample Test,Sample questions

Question:
 In Windows Communication Foundation (WCF) applications, which of the following is FALSE regarding Sessions?

1.Messages delivered during a session are processed in the order in which they are received

2.They are explicitly initiated and terminated by the receiving application

3.There is no general data store associated with a WCF session

4.Sessions correlate a group of messages into a conversation


Question:
 The standard method for storing data that can be transferred easily from one machine or platform to another is ___

1.XML

2.SOAP

3.WSDL

4.WCF


Question:
 The transport protocol used by SOAP is HTTP.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 WCF services can communicate with _______.

1.all programming languages

2. XML

3.only the languages included with Visual Studio .NET

4.multiple platforms and multiple languages


Question:
 When configuring a WCF service using Visual Studio, you can use either a Web.config file or an App.config file to specify the settings. The choice of the configuration file name is determined by the hosting environment you choose for the service. Where does the endpoint configuration element lie in a .NET configuration file?

1.System.ServiceModel – bindings – endpoint

2.System.ServiceModel – services – service – endpoint

3.System.ServiceModel – endpoint

4.System.ServiceModel – behaviors - behavior – endpoint


Question:
 Which of the following is FALSE regarding the WSHttpBinding class?

1.Provides WS-Addressing

2.Provides un-encrypted messages by default

3.Provides reliable messaging

4.Provides transactions


Question:
A client application interacts with a new Service that calculates interest rates for the banks customers. The Service Contract contains BasicHttpBinding as the binding type in the endpoint configuration. The service contains some methods that return sensitive information such as customers names and addresses. You want to ensure that these methods are encrypted. What should you do?

1.Set the ProtectionLevel to None in the ServiceContractAttribute

2.Set the ProtectionLevel in the OperationContractAttribute to EncryptAndSign for each of the sensitive methods

3.Nothing, all messages will be encrypted and signed already

4.Set the ProtectionLevel to Sign in the ServiceContractAttribute


Question:
A developer has designed a service that contains a method called TakeAction which is decorated with the following attribute: [OperationContractAttribute(IsOneWay=true)] Another client application will invoke the TakeAction operation and continue processing after WCF writes the message to the network. What must the developer of the TakeAction method do to ensure the client action can call this method?

1.use object as the return type

2.Use FaultException as the return type

3.Remove all parameters from the method signature

4.Use void as the return type


Question:
A resource on the Web is uniquely identified by its URI, which means _____

1.Uniform Resource Identifier

2.Universal Registered Identifier

3.Uniform Registered Identifier

4.Universal Resource Identifier


Question:
A service contract is ____

1.not applicable to interface in wcf

2.applicable to interface in wcf

3.Both A and B

4.none of the above


Question:
A service contract specifies what an endpoint communicates to the outside world. At a more concrete level, it is a statement about a set of specific messages organized into basic message exchange patterns (MEPs), such as request/reply, one-way, and duplex. Which of the following is NOT part of the Service Contract specification:

1.The data types of messages

2.The specific protocols and serialization formats

3.The location of the operations

4.The frequency of messages per second


Question:
A WCF service is exposed to the world as a collection of _____

1.endpoints

2.startpoints

3.stoppoints

4.none of the above


Question:
Advantages of WCF are ____

1.WCF provides interoperability between services.

2.WCF doesn't provides interoperability between services.

3.Small changes are not allowed

4.none of the above


Question:
Always end your URI (or URL) with a ________ to avoid an extra trip to the server to determine that it is a site rather than a directory.

1.hyphen

2.slash

3.backslash

4.double slash


Question:
An endpoint indicates where messages can be sent (address).

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Both classes and interfaces represent a grouping of functionality and, therefore, both can be used to define a WCF service contract. However, it is recommended that you use interfaces because they directly model service contracts. Without an implementation, interfaces do no more than define a grouping of methods with certain signatures. Which of the following is a benefit of using interfaces to define Service Contracts?

1.Service contract interfaces can extend any number of other service contract interfaces

2.You can modify the implementation of a service contract by changing the interface implementation, while the service contract remains the same

3.A single class can implement any number of service contracts by implementing those service contract interfaces.

4.All of these


Question:
Data that is in binary format can pass through any firewall.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Data that is in format _________ can pass through many firewalls that ________ cannot penetrate.

1.binary, text

2.text, binary

3.Soap wcf

4.none of the above


Question:
Data that is in _______ format can pass through many firewalls that _______ cannot penetrate.

1. binary, text

2.text, binary

3.SOAP, WCF

4.WCF, SOAP


Question:
For technical specifications, the industry standard term URL is preferred to URI.

1.True

2. False

3.all of the above

4.None of the mentioned


Question:
IIS stands for ____

1. Internet International Services

2.Internet Information Solution

3.Internet Information Services

4.Internet Indirect Services


Question:
In wcf message contract can be applied to ____

1.type using MessageContract attribute

2.type using Contract attribute

3.type using Message attribute

4.none of the above


Question:
In WCF,you can customize the different elements of the architecture to enable connections with any kind of non-Windows clients.

1. Yes

2.No

3.May be

4.Can't say


Question:
It is possible for a single application to be both a client and a service.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
One of the advantages of using _______ is that data are transmitted in a text format rather than a binary format.

1. XML

2.SOAP

3.WSDL

4.WCF


Question:
Services are groups of operations. To create a service contract you usually model operations and specify their grouping. In Windows Communication Foundation (WCF) applications, developers define the operations by creating a method and marking it with the which attribute?

1.ServiceContractAttribute

2.DataMemberAttribute

3.DataContractAttribute

4.OperationContractAttribute


Question:
SOAP stands for _____

1.Subjective, Objective, Answer and Plan

2.Subjective, Oriented, Assessment and Plan

3.Subjective, Objective, Assessment and Plan

4.Subway, Objective, Assessment and Plan


Question:
Study the following line of code: OperationContext.Current.GetCallbackChannel(); The ICalendarDuplexCallback interface is defined as the CallbackContract property in the Service Contract. In which class should you use this line of code?

1.Client

2.You should never use this

3.Both

4.Service Discovery


Question:
The features of WCF are ____

1.Data contracts.

2.Durable messages

3.Service Metadata.

4.All of the above


Question:
The information about the names of the methods, the parameters that can be passed, and the values that are returned from the functions is controlled in some Web services by a description specified in _______.

1. XML

2.SOAP

3.WSDL

4.WCF


Question:
The instancing behaviour (set by using the System.ServiceModel.ServiceBehaviorAttribute.InstanceContextMode property) controls how the InstanceContext is created in response to incoming messages. You have created a new WCF service and set the InstanceContextMode to PerCall. What is the behaviour of the InstanceContext in this mode?

1.A new InstanceContext is created for each call

2.A new InstanceContext is created for each channel

3.A new InstanceContext is created for all calls

4.A new InstanceContext is never created


Question:
The main components of WCF services are _____

1. End point

2.service class

3.Hosting environment

4.All of the above


Question:
The signature of a service operation dictates a certain underlying message exchange pattern (MEP) that can support the data transfer and the features an operation requires. You want to adopt a pattern that supports the sending and receiving of messages by both the service and client. Which patter should you choose?

1.one-way

2.none of these

3.request/reply

4.duplex


Question:
The System.ServiceModel.Channels namespace contains the DeliveryFailure enumeration. DeliveryFailure specifies the possible types of delivery failure for a message read from the queue. Which of the following elements is a valid DeliveryFailure?

1.BadSignature

2.AccessDenied

3.ReceiveTimeout

4.All of these


Question:
To add a WCF Service, select the solution name in the Solution Explorer and select _______ from File menu.

1.Add / New Solution

2.Add / New Web Site

3. Add / New Service

4.Add / New Library


Question:
To rename a Web Service you need to change only the name in the Solution Explorer.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
WCF Applications came into the picture in . Net for creating Service oriented Applications.

1.Yes

2.No

3.May be

4.Can't say


Question:
WCF cannot communicate with other platforms that support SOAP and simple XML.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
WCF exposes Service Meta Data using ____

1. Service Meta Data

2.Mex Endpoint

3.Both A and B

4.none of the above


Question:
WCF is a framework for building _____

1. service-object applications

2.service-oriented applications

3.service-orignal applications

4.service-on applications


Question:
WCF is a part of _______ .Net Framework.

1. 5.0 and above

2.3.0 and above

3.1.0

4.2.0


Question:
WCF is developed by ____

1.Apple Inc.

2.Google

3.IBM

4.Microsoft Corporation


Question:
WCF services can communicate with _____

1.Visual Studio .NET

2.programming languages

3.Multiple platforms and multiple languages

4.XML


Question:
WCF stands for _____

1.Windows Common Framework

2.Windows Communication Foundation

3.Windows Common Foundation

4.Windows Communication Framework


Question:
WCF supports which transport schema?

1.MSMQ

2.HTTP

3.TCP

4.All of the above


Question:
What attribute is used to define a wcf service class?

1.Service Contract

2.Operation Contract

3.Application Contract

4.none of the above


Question:
What is Windows Communications Foundation HTTP Activation?

1.Wcf uses the listener adapter interface to communicate activation over the non-HTTP protocols.

2.Wcf uses the listener adapter interface to communicate activation over the HTTP protocols only.

3.Wcf uses .net to communicate activation over the non-HTTP protocols

4.none of the above


Question:
When a new project is added to a WCF Service solution, the projects are saved independently.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
Which among the following is not a type of contract in wcf?

1.Service Contract

2.Operation Contract

3.Security Contract

4.none of the above


Question:
Which class in WCF represents the unit of communication between endpoints in a distributed environment?

1.RequestContext

2. Message

3.Binding

4.ChannelBase


Question:
Which contract is applicable to interface in WCF?

1.Service Contract

2.Operation Contract

3.Application Contract

4.Data Contract


Question:
Which of the following is NOT true?

1.A WCF Service can be consumed by Windows applications

2.A WCF Service can be consumed by Web applications

3.A WCF Service can perform calculations

4.A WCF Service cannot return a dataset


Question:
Which of the following is not true?

1.A WCF Service can be consumed by

2.A WCF Service can perform calculations

3.Web applications A WCF Service can be consumed by Windows applications

4.A WCF Service cannot return a dataset


Question:
Which of the following is TRUE regarding service operations and references to objects?

1.Objects must be serializable

2.You can’t return values from service operations

3.Objects are passed as references

4.You can’t pass parameters to service operations


Question:
Which of the following statements is false about hosting?

1.Shared hosting is cheaper than dedicated hosting

2.Dedicated hosting is safer than shared hosting

3.Shared hosting is safer than dedicated hosting

4.none of the above


Question:
Which one is not a class in WCF?

1.Client binding

2.Http Binding

3.Http Context Binding

4.none of the above


Question:
Which type of contract is applicable to interface in wcf?

1.Service Contract

2.Operation Contract

3.Both A and B

4.none of the above


Question:
Windows Communication Formats (WCF) is Microsoft's technology for communicating between applications on the same computer system, on a network, or across the 

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
WSDL contains information about the names of the methods, the parameters that can be passed, and the values that are returned from the functions.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
You have created a new class which will be the basis for a Service Contract. You have used ServiceContractAttribute and OperationContractAttribute to decorate the class and the methods. Which of the following is NOT an advantage of using classes instead of interfaces for Service Contracts?

1.Speed

2.All of these are disadvantages

3.Simplicity

4.Multiple Inheritance


Question:
You have created a new service based on Windows Communication Foundation and also a client application to test the service. You want add an endpoint in the web.config file of the client application to use the new service. Which values should you include in you service element of the web.config file?

1.Address

2.Contract

3.Binding

4.All of these


Question:
You’ve created a new class and decorated it with the DataContractAttribute so that it forms a Data Contract for WCF. This class contains several attributes that you want to make available as part of the Data Contract. Currently these attributes are declared as private. What do you need to do to ensure these attributes are serializable?

1.Add the DataMemberAttribute and change the type to public

2.Add the DataContractAttribute to the attribute

3.Change the type to internal

4.Add the DataMemberAttribute or change the type to public


Question:
You’ve created a new class in your .NET project that contains a wide variety of operations grouped together to form part of a Server Contract. You now need to add an attribute to the class to define it as a service contract. Which attribute should you use?

1.OperationContractAttribute

2.DataMemberAttribute

3.DataContractAttribute

4.ServiceContractAttribute


Question:
___ are wcf binding types.

1.Basic Binding

2.Web Binding

3.TCP Binding

4.All of the above


Question:
___ is a popular standard that includes a set of rules for handling requests and responses including class names, method names, and parameters.

1.XML

2.WCF

3.WSDL

4.SOAP


Question:
_____ are the various ways of hosting a WCF Service.

1. Self Hosting

2.IIS

3.WAS

4.All of the above


More MCQS

  1. WCF Mcq Question Set 1
  2. WCF MCQ Quiz
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!