Wednesday 10 April 2013

Which is the default mode for Instancing in WCF

Ans) PerCall

Which protocol is used for platform-independent communication in WCF

Ans) SOAP(Simple Object Access Protocal) , which is directly supported from WCF

Which is Default Message Exchange Pattern(MEP) in WCF

Ans) Request/Response

Which NameSpace is required in a class to use DataContract or DataMember attribute for a class or Properties

using System.Runtime.Serilization; 

can we have multiple endpoints with the same address in WCF

 Ans) NO

Does BasicHttpBinding supports HTTPS in WCF

Ans) Yes

Is SOAP envelope created while using WebHttpBinding in WCF

Ans) NO

Which is the right binding for RESTful communication and other situations where SOAP isn't required in WCF

Ans)webHttpBinding is good for Restful communication and other situations where SOAP(simple object access protocol) isn't required. Because Information/Message is transferred  directly through HTTP or HTTPS.

which binding is used if you are using WCF-to-WCF communication between processes on the same machine in WCF

Ans)  NetNamedPipesBinding 

Which Contract is used to document the errors occurred in the service to client in WCF

Ans) Fault Contract is used to document the errors occurred in the service to client.

Which NameSpace is used to access WCF Service

using System.ServiceModel;

what is WCF in .Net

                      W.C.F Stands for Windows Communication Foundation. It is a unified Framework for rapidly building Service Oriented Applications. It is provided as Framework with it's own run time and libraries. .Net component is executed using CLR but the request/response will be handled by WCF Framework.It is built on top of .Net Framework.
  Example : 

  • WCF(MS Standard, Windows Standard)
  • To develop Distributed Programming.
  • .Net Program--Any user
  • With their own propitiatory methods

what is Distributed Programming

                      Communication between multiple server application or services in Network is known as Distributed Programming.

  • Some Share common protocols(SOAP,WSDL).[note: here SOAP Stands for Simple object Access Protocols and WSDL Stands for Webservice Description Language] but not a common platform.        example : Facebook, twitter and orkut etc.....
  • Some Share common protocols and common platform like .Net

what is an EndPoint in WCF

EndPoint :
                 These is a structure which provides information about our service(program). EndPoint includes three things and they are easily reffered as ABC
               A  ----> Address
               B  ----> Binding
               C  ----> Contract
Address : A Network Address Where the end point resides.
             example: http://silverkey.com/services/demo.svc
Binding :  Specifies How the endpoint communicates with the world.


     Defining things Like :
                  - Transport (eg: HTTP,TCP).
                  - Encoding (Text,Binary,MTOM).
                  - Security options( SSL,Message security)
Examples
                  BasicHttpBinding , NetTcpBinding,NetMSMQBinding, NetNamePipeBinding.


Contract : 
                 Specifies What the EndPoint Communicates.


Defining Things Like :
                    ->  Message Exchange patterns (one-way, duplex way............)
                    ->  Service operations.
                    -> Behaviours (Exchange meta-Data, Impersonatation, Authorization)
EndPoint

which bindings/bindings doesn't support reliable session in WCF

Ans) basicHttpBinding doesn't support Reliable session

Can we use both WCF Services and WCF Data Services in a single service

Ans) No

What are the Three Message Patterns available in WCF

There are Three types of Message patterns available in WCF. Those are 

  • One Way Contract
  • Duplex Contract
  • Request-Reply Contract