Hi,
I have two methods that I need to call in my WCF application from the client.
Authenticate(username, password) GetUser(username)
Is it possible to combine these calls to avoid so many calls being sent back/forth?
Hi,
I have two methods that I need to call in my WCF application from the client.
Authenticate(username, password) GetUser(username)
Is it possible to combine these calls to avoid so many calls being sent back/forth?
There are a few ways to handle this type of thing. First, you can use WCF sessions to initiate a group of commands that need to maintain some context between calls:
http://msdn.microsoft.com/en-us/library/ms733136.aspx
Secondly, you can take advantage of WCF's support for WS-Security standards to avoid the need to pass credentials as a second call:
This is a very old thread, but this sounds like a good application of a Service Bus. I read about Rhino Service Bus a little while back and it fits the bill from what you said.
http://msdn.microsoft.com/en-us/magazine/ff796225.aspx
You can send a number of requests to the service (just like you said) in one network request instead of one at a time.
I would recommend having a look at Agatha, a framwork created by Davy Brion. It builds on top of WCF, and implements a Request/Response style of messaging. In particular, it allows you to batch together requests so minimise round-trips.