Select chapter



Basic (1.papers)
Advanced (1.papers)


  

wcf interview questions and answers

1
What is a service contract ?
  1. Service contract is an attribute when it is applied on top of a class or interface , the corresponding class is exposed to the clients .
  2. Service Contract is a group of messages .
  3. service contract is a group of data members which are exposed to the 
    clients as data members .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
2
What is an operation contract ?
  1. an operation contract is an attribute when it is applied on top of any operation or method , the corresponding method is exposed ( visible ) to the clients .
  2. an operation contract is an attribute when it is applied on any method or operation that operation must return serialised data back to client from wcf service .
  3. an operation contract used for returning faults back to the callers .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
3
What is a data contract ?
  1. data contract is an attribute which must be applied to return a complex serialized type to exchange data between wcf service and client .
  2. data contract attribute must be applied on top of methods to expose methods to the clients .
  3. data contract attribute must be applied on an interface to make a class serilazable which is implementing the interface .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
4
what is wcf and what is the use of wcf ?
  1. Wcf stands for windows common foundation , and is a distributed technology which replaces webservices.
  2. wcf stands for windows communication foundation, wcf acts as a unified model for all the microsoft distributed technologies .
  3. wcf is a distributed technology which replaces dcom RMI .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
5
How to consume a wcf service from client application ( choose most relevant step by step procedure ) ?
  1. 1.Create a proxy class of wcf service in client machine and create a proxy class of wcf client in server where wcf service is running and start communicating using both the proxies .
  2. 1.Create wcf proxy in client application .
    2.Define end point in client as well as wcf service application .
  3. 1.Create wcf service proxy in client application .
    2.Define end point in client application .
    3.Create object of a proxy class from client application and call proxy methods .
    
  4. All the above options are correct .
Show Answer
Share Facebook gmail Twitter
6
types of hosting in wcf (identify one or more options available for hosting a wcf service ) ?
  1. iis hosting .
  2. windows activation service hosting .
  3. self hosting and windows service hosting .
  4. All the above options are correct .
Show Answer
Share Facebook gmail Twitter
7
How to overload a method in wcf ?
  1. there is no way to overload a method which is marked with operation contract attribute in wcf .
  2. no extra mechanism required for overloading a method , it is same as c# overloading .
  3. same as C# overloading but we need to assign a value to the name parameter in the operation contract attribute .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
8
what is binding in wcf ?
  1. binding contains the information about how to communicate to the wcf service from wcf client .
  2. binding can contain protocol , message exchange mechanism like xml/json/text/mtom and security features .
  3. binding contains the information about how to exchange data between two end points .
  4. All the above options are correct .
Show Answer
Share Facebook gmail Twitter
9
which is the default binding in wcf ?
  1. NetNamedPipe Binding
  2. NetMsmqBinding
  3. WSHttpBinding
  4. BasicHttpBinding
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
11
what is the use of DataMember attribute in wcf ?
  1. data member attribute makes a data member or a variables data serializable .
  2. data member attribute makes a method visble to the client applications.
  3. data member attributes makes a class visible to the client applications .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
12
What is an end point in wcf ?
  1. An end point is a combination of address , binding and contract .
  2. an end point is required for the wcf client to identify the location of wcf service .
  3. an endpoint is used by the wcf service to locate wcf client .
  4. Option 1 and 2 are correct .
Show Answer
Share Facebook gmail Twitter
13
what is abc of wcf ?
  1. abc stands for address binding and contract .Address refers to the address of wcf client and binding refers to the communication mechanism between wcf client and wcf service .
  2. abc stands for address binding and contract . Address refers to the location where wcf service is existing and binding contains information about how to communicate to the wcf service . Contract usually refers to the service contract with which client has to communicate .
  3. abc refers to address binding and contract . ABC can be collectively called as end point .
  4. option 2 and 3 are correct .
Show Answer
Share Facebook gmail Twitter
14
what is wsdl and what is the use of wsdl in wcf ?
  1. wsdl stands for web services description language . Wsdl is used for creating proxy classes in wcf .
  2. wsdl stands for web services description language . Wsdl used for exchaning data between wcf client and wcf service .
  3. wsdl is a protocol used for communication between client and service ( wsdl is used in webservices as well as wcf ) .
  4. None of the above.
Show Answer
Share Facebook gmail Twitter
15
In which name space ServiceContractAttribute class is present in wcf ?
  1. System.WCF
  2. System.WCFService 
  3. System.ServiceModel
  4. System.Service
Show Answer
Share Facebook gmail Twitter
16
Which wcf binding will not allow transaction ?
  1. NetTCPBinding
  2. WSHttpBinding
  3. BasicHttpBinding
  4. NetMsmqBinding
Show Answer
Share Facebook gmail Twitter
17
what is a request reply contract ?
  1. A request reply service is an operation contract for which a client makes a call to operation and client has to wait till getting reply from service .
  2. A request reply service is an operation contract which is used only for asynchronous communication ( when an async request is sent the service will send async response or reply ) .
  3. A request reply service is an operation contract which for which a client makes a synchronous request and service will respond with an asynchronous reply .
  4. None of the above .
Show Answer
Share Facebook gmail Twitter
18
what is a one way contract in wcf ?
  1. An operation contract which is having return type as void is called as one way contract .
  2. One way contract is an operation contract which can be called by a client and client will not expect any reply .
  3. Both the definitions are correct .
Show Answer
Share Facebook gmail Twitter
19
what is a duplex contract in wcf ?
  1. a duplex contract in wcf is a type of request reply operation contract .
  2.  a duplex contract is a type of service contract which enables both client and service can send messages independently to the others .
  3. a duplex contract is a service contract which works only when client supplies callback contract .
  4. options 2 and 3 are correct .
Show Answer
Share Facebook gmail Twitter
20
which wcf binding will not support security ?
  1. NetTcpBinding
  2. NetMsmqBinding
  3. WSHttpBinding
  4. BasicHttpBinding
Show Answer
Share Facebook gmail Twitter
Read more papers :