How to pass behaviour in WCF DataContract to client application?

Problem Statement: You want to override ToString or any method of DataContract class and method logic should be propagate to client application. Resolution: WCF doesn't transfer any behavior of data contract to client side by default. I am taking here two approaches to communicate to WCF service; through proxy class generated by Visual studio and … Continue reading How to pass behaviour in WCF DataContract to client application?

Advertisements

Implement Role based security using Windows Groups in WCF

This is third blog on security concept in WCF. You can read previous posts: Something about Security in WCF- I Implement windows authentication and security in WCF Service Today I’ll describe how we can implement role based authorization using Windows Group. In this case you will not need to maintain any information in database because … Continue reading Implement Role based security using Windows Groups in WCF

Implement windows authentication and security in WCF Service

This is continuation with previous post on “Security in WCF -I”. Here I’ll explain how we can implement windows authentication with transport level security in intranet environment. Windows authentication In intranet environment, client and service are .Net application.Windows authentication is most suitable authentication type in intranet where client credentials stored in windows accounts & groups. … Continue reading Implement windows authentication and security in WCF Service

Something about Security in WCF- I

Authentication and authorization are key aspects for secure communication between client and server. The service needs to authenticate its callers and correspondingly allow to use allowed operations. Service level authentication is not only thing for secure communication, messages should also be secure so that no tampering can happen. WCF supports variety of authentication mechanism: None: … Continue reading Something about Security in WCF- I

Get WCF Service Metadata on client application

Sometimes the client needs to programmatically verify whether a particular endpoint supports a particular contracts. Suppose Application administrator deployed application but it was pointing to development environment or some other address. If this feature implemented in application then he can get to know there is difference in service contracts or endpoints. He can then point … Continue reading Get WCF Service Metadata on client application

Resolve AddressAccessDeniedException: HTTP could not register URL http://+:80/ Error in WCF Service

I was facing one issue with hosting wcf service with httpbinding. I was getting below error message "HTTP could not register URL http://+:8088/MarketService/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)." It clearly says service host process does not have access rights to run on particular port. To resolve … Continue reading Resolve AddressAccessDeniedException: HTTP could not register URL http://+:80/ Error in WCF Service

I don’t want to be worry about WCF configuration on client side

I personally feels there is still too much configuration in setting up WCF service infact Microsoft has reduced in new .net frameworks. If client application wants to consume WCF service then you need to create proxy class using Visual Studio and create configuration on Web/App config files (Visual Studio also generates many configuration). So if … Continue reading I don’t want to be worry about WCF configuration on client side

Choosing binding for WCF service

There are different types of bindings supported by WCF. Now question is which binding is suitable for your service.Following is list of frequently used bindings in WCF: BasicHttpBinding: If clients can be non-WCF. This exposes service to the outside world as if it was an ASMX (webservice). You cannot take advantages of modern WS* protocol … Continue reading Choosing binding for WCF service

Difference between TcpBinding and HttpDualBinding for Callback in WCF

The Http bindings serialized messages into XML and send them via HTTP. HTTP is request response protocol, which is one way communication at a time. Caller sends requests to the server and server responds and sends response messages. Once the response is received connection gets closed whereas TCP is bidirectional protocol which enable socket to … Continue reading Difference between TcpBinding and HttpDualBinding for Callback in WCF

Throwing Exceptions from WCF Service (FaultException)

Handling exceptions in WCF service is different than usual exceptions handling in .Net. If service raise exception it should propagate to clients and properly handle by client application. Since Exception object is .Net specific so it cannot propagate to clients because clients can be of different technologies, so to propagate to all kinds of clients … Continue reading Throwing Exceptions from WCF Service (FaultException)