Showing posts with label Why WCF. Show all posts
Showing posts with label Why WCF. Show all posts

Sunday, June 8, 2014

.net basics question and answer

Q. What is the use of remoting ?
Ans:- It helps to make remote method calls to objects which are residing in different appdomain. These Appdomain can be located in a different geographical location or different networks.

Q.How do you create a remoting object ?
Ans:-Create a interface -- Implement the object by creating MarshalbyRef -- Host your server object using Remoting"RegisterWellKnownServiceType" -- Create the client to call the service"Activator.GetObject".

Q.Problems with remoting
Ans:-Client and server can be only in .NET language , complicated, Faster than other remoting technologies, pick and choose Channel and formatter ( customization)

Q.what is a webservice ?
Ans:-Webservice is a technology by which you can expose your business functionality on HTTP using SOAP XML format.

Q.How can we do webservice security
Ans:-specify windows , passport , forms and pass credentials through the client proxy object


Q.What is WSDL ?
Ans:-It’s a meta data which shows what are the methods , properties , datatypes exposed by a service

Q.What is SOAP ?
Ans:-It’s a XML protocol which is defined how your service and client communicate.

Q.What is difference between Webservice and Remoting
Ans:-Webservice(Cross language , only Http) , Remoting ( only .NET platform , Any protocol)

Q.What is  Service Oriented Archotecture ?
Ans:-SOA is nothing but desigining your system in self contained services which communicate via standard messages thus making your services loosely coupled. Services -- Self contained , Orchestrate , Industry Standard messages , Reliable , Aynshcrounous message , Cross plat form  describe and discover

Q.Why WCF ?
Ans:-It was to satisfy  SOA principles of WS-* specification.

Q.What is WCF ?
Ans:-WCF = Webservices + remoting + COM plus + MSMQ

Q.What is Address binding Contract ?
Ans:-Address - where is it hosted , Binding - how is the protocol , Contract - what  is the interfcae

Q.What is  Service contract , Operation contract and Data contract ?
Ans:-Service contract - Service  name , Operation contract - Your methods and functions , data contract - Custom data type , data member - property and functions of your data contract

Q.namespace of WCF
Ans:-System.ServiceModel

Q.what's the difference between WCF and Webservices ?
Ans:-Webservices = WCF - ( remoting( multiple protocols) + COM plus ( transactions) + MSMQ(queueing))

Q.How do you do self hosting ?
Ans:-Create object of Service host , provide Address ( Uri) , Binding ( Wshttpbinding) , Contract ( Interface) and open the host.