Why to choose WCF as development platform
Advantage of WSE against ASMX
ASMX only support WS-Basic profile that offer limited featured and do not support advance concepts like security , federation , policy etc.
ASXM only support HTTP/HTTPS protocols while WCF support many
Advantage of WCF against ASMX
ASMX only support WS-Basic profile that offer limited featured and do not support advance concepts like federation , policy etc.
Advantage of WCF against WSE3
WCF is further augmentation of WSE and now native part of dot net framework , it have much better abstraction of transport channels and can support multiple protocols
Does WCF support sessions
Yes, but not all the bindings and instancing mode support it, By default session is turned on for the bindings that support it. http://www.codeproject.com/Articles/188749/WCF-Sessions-Brief-Introduction
What are reliable session and how can we configure reliable session in WCF Service.
This actually implements WS-Reliable Messaging protocols and ensures that messages will be delivered exactly once in in the order it was sent, even if connection itself is not reliable. http://msdn.microsoft.com/en-us/library/ms733136(v=vs.110).aspx
How does server capabilities (2000,2003,2008) effect WCF deployment options,
Yes it affect type of hosting options available.read more...
How Client callback are implemented in WCF
We need to implement a call back contract with service. http://idunno.org/archive/2008/05/29/wcf-callbacks-a-beginners-guide.aspx
Difference between WCF Client Proxy and Channels
http://www.sujitbhujbal.com/2012/03/difference-between-proxy-and-channel.html
How we can achieve Operation Overloading while exposing WCF Services?
By default, WSDL doesn’t support operation overloading. Overloading behavior can be achieved by using “Name” property of OperationContract attribute.
[ServiceContract]
interface IMyCalculator
{
[OperationContract(Name = "SumInt")]
int Sum(int arg1,int arg2);
[OperationContract(Name = "SumDouble")]
double Sum(double arg1,double arg2);
}
When the proxy will be generated for these operations, it will have 2 methods with different names i.e. SumInt and SumDouble.
What are the different types of binding available in WCF and when to use what
Most common binding are
basicHttpBinding
basicHttpContextBinding
WSHttpBinding
WSHttpContextBinding
WSDualHttpBinding
WSFederationHttpBinding
NetNamedPipeBinding
NetMsmqBinding
NetPeerTcpBinding
Read More http://wcftutorial.net/wcf-types-of-binding.aspx
What is the difference in between MEX and WSDL endpoint based metadata exchanges
MEX endpoints allow clients to receive the service’s metadata by using SOAP messages instead of http get requests. You can create MEX endpoint that can be accessed through http, https, tcp, and even named pipes. The response that you will receive when calling a MEX endpoint’s GetMetadata operation will include the content of the WSDL and all the XSD files that are linked to it. http://blogs.microsoft.co.il/blogs/idof/archive/2011/08/10/wsdl-vs-mex-knockout-or-tie.aspx
How do you choose which binding to use
Choice is made based on requirements like Interoperability , Transaction requirement , Security requirement , authentication requirement , fadaration requirment , message delivery requirment etc. A general guildeline can be folund here http://msdn.microsoft.com/en-us/library/ms731092(v=vs.110).aspx
What are the possible ways to activate and configure a WCF Service Instance
Inline Activation using .SVC file
Configuration Based activation using config file that also support custom implementation of service host without SVC file
Using ASP.Net routing configuration to support conditional activition without SVC file
Read More
What is the disadvantage of configuring a WCF service with .svc
First it makes configuration flexible and if required we can creates REST like enpoints using ASP.Net routing based conditional activiations.http://msdn.microsoft.com/en-us/library/ee358760.aspx
What are the deployment options available with WCF and what are there capabilities.
Self hosting, IIS, WAS, Windows service , Read More MSDN:Hosting WCF Service
What is the Advantage of hosting a service in IIS
High Scalability through multiple worker process
Process Recycling
Automatic Process Activation
Message based service activation
IIS Built in Security Features like Authentication
Read more MSDN:Hosting in Internet Information Services
What are suggest best practices for deployment of WCF service under IIS
Always implement service as separate DLL
Endpoints must be configured using base address and relative URIs
Do not configure your service to use non native protocols like TCP on IIS6 that is not natively supported
Though WCF provides session information but do not store state information in IIS because it may lost while app pool recycles
Prefer reusing WCF Proxy instances because proxy creations are expensive operations. It also boost performance by using proxy caching feature and thread safe
Prefer using Asyn client call (begin/end version) to improve middle tire performance
Do not run two application under same same app pool because it causes temporary folder overwrite , always have different application running under different app pool each configured using different user ID and temporary folder settings
Use asynchronous processing model in between ASP.Net runtime and WCF runtime to increase performance , this can be done via configuration files
Read more MSDN:Internet Information Services Hosting Best Practices
Can a WCF IIS deployment have multiple base address and when such configuration should be used
Yes , When we need to publish different end points to same service such as Internet and intranet version Read More.. MSDN:Supporting Multiple IIS Site Bindings
Wow do we secure a WCF Service
Security WCF service has three parts , Authentication , Authorization add Message protection
Authentication
For authentication either we can use built-in authentication support like windows ,basic or custom.
WCF also provide support for authentication service that works leverage ASP.Net membership already configured in any other application
Authorization
Role Based , Identity based , Resource Based (Windows ACLs)
Message Protection
Message Level (Certificates Digitals Signature etc), Transport Level (SSL)
Impersonation
Transport Level impersonation
Soap Level impersonation
http://msdn.microsoft.com/en-US/library/bb386582(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/ff406125.aspx
http://msdn.microsoft.com/library/ff405740.aspx
How transaction are handled in WCF
WCF provides WSAT protocol that is actually part of WS* protocol to implement transaction, it uses Lightweight or distributed transaction manager as required..G.WCF Transactions
How WCF REST is implemented
It is implemented by using WebGet and WebInvoke attribute, that actually uses UriTemplateMatch class to match and invoke WCF operation.C.WCF REST