.net

ChannelFactory Caching in WCF 4.5

Posted on

ChannelFactory is a factory class for creating the channel instances in a WCF client. This class simplifies the task of creating the channel between a WCF service and a client. When an instantiation is done on the client it means a channel is established with the WCF service and creates the proxy of the service […]

.net

WCF Transactions (Part – 32)

Posted on

A transaction is a collection or group of operations executed as a whole unit. It provides way to logically group single piece of work and execute them as a single unit. WCF allows client applications to create transactions and to propagate transactions across servers. Challenges: Consider a system maintained in consistent state, when application fails […]

.net

WCF Concurrency (Part – 30)

Posted on

Multiple threads executing the application code simultaneously is called Concurrency. Single Concurrency Mode: The default concurrency mode is Single in WCF.This means only a single thread can access the service instance at any given point of time.While a request is being processed by the service instance, an exclusive lock is acquired and all the other […]

.net

Message Protection in WCF (Part – 29)

Posted on

ProtectionLevel parameter is used  to protect message in WCF. ProtectionLevel enum is present in System.Net.Security namespace. The following 6 attributes has the ProtectionLevel named parameter.They are specified in order of precedence. ServiceContractAttribute OperationContractAttribute FaultContractAttribute MessageContractAttribute MessageHeaderAttribute MessageBodyMemberAttribute Example: ProtectionLevel specified at an operationContract level overrides the protectionLevel specified at ServiceContract Level. When you use WSHttpBinding,by […]

.net

WCF Security (Part – 28)

Posted on

Authentication: Authentication is the process of identifying the sender and recipient of the message. Authorization: Authorization is the process of determining roles for authenticated users. Confidentiality: Confidentiality is the process to ensure that only intended recipient of the message can view the message .This is done by encrypting the message. Integrity: Integrity  is the process […]

.net

Throttling in WCF (Part-27)

Posted on

Throttling controls how many messages are processed. What is Throughput? Throughput is the amount of workdone in a given time.In addition to Service InstanceContextMode and Concurrency mode, Throttling settings also influence the Throughput of a WCF service. Throttling settings can be specified either in code or in config file. In app.config file:

In code:

[…]

.net

SessionMode Enumeration in WCF (Part-26)

Posted on

Use SessionMode enumeration with the service contract to allow or restrict bindings to use sessions. Allowed: Service contract supports sessions if the binding supports them This is default value if SessionMode is not defined in service contract NotAllowed: Service contract doesnot support bindings that initiate sessions Required: Service contract requires a binding that supports session […]