Can I combine calls in WCF?

I have two methods that I need to call in my WCF application from the client.

Authentication (username, password) GetUser (username)

Can these calls be combined to avoid so many calls being sent back / forth?

+5
source share
3 answers

There are several ways to deal with this type of thing. First, you can use WCF sessions to run a group of commands that need to maintain some context between calls:

http://msdn.microsoft.com/en-us/library/ms733136.aspx

Secondly, you can use WCF support for WS-Security standards to avoid having to pass credentials as a second call:

http://msdn.microsoft.com/en-us/library/aa702565.aspx

+4
+1

I would recommend taking a look at Agatha , a framework created by Davy Brion . It is built on top of WCF and implements a message / response style. In particular, it allows you to combine queries to minimize round trips.

+1
source

All Articles