Saturday, September 18, 2010

WCF question answer

What is ABC of WCF ?

A : Address (Where is the service?)
B : Binding (How do i talk to service?)
C : Contracts (What service can do/perform ?)

Address : Specifies the location of the service which will be like http://Myserver/MyService.Clients will use this location to communicate with our service.

Binding : Specifies how the two paries will communicate in term of transport and encoding and protocols

Contract : Specifies the interface between client and the server.It's a simple interface with some attribute.

there are three types of contract in WCF.
1. DataContract
2. OperationContract
3. ServiceContract

What is endpoint ?
End point is the address where Service resides.


What is the difference between web service and wcf ?
1. Asp.net web services can use only HTTP channel, when WCF support Tcp, Http & msmq
2. Web service can hosted on IIS only, when WCF can be hosted on IIS, Was, self hosting
3. With WCF you can use SSL to encrypt the communication (to do that in ASMX you need to use WSE - Web Services Enhancements), you can send big files and securely (to do that in ASMX you need to use MTOM - Message Transmission Optimization Mechanism)


WCF Security related question & answer
http://msdn.microsoft.com/en-us/library/ff649839.aspx

Wcf Security implementation
http://www.codeguru.com/csharp/.net/net_general/netmyservices/article.php/c13313

No comments: