WCF 4.0 Routing and Manipulating responses at Router

Can anyone point me in the right direction with this issue? We have a WCF central router and we want to manipulate the responses passing through the router based on some xpath criteria. Basically we want to remove a lot of the details from some error requests and sub some extra details in. Ideally we would also like to log the error.

I know it is generally better practice to update the web services to do this but in our case this is not possible and needs to be performed on the router if at all possible.

Also it would be great if we could log each request and response but that is likely a different solution to the manipulation of the responses.


Not sure if you have solved this but...

You should be able to use WCF Behaviours to do what you need.

Have a logging behaviour to log the requests and responses and another one to log errors/manipulate responses

We use behaviours to log to app fabric, and we have one (nasty) behaviour which catches all exceptions and returns a valid response with an error message. I personally don't like this 'feature' but you can basically do anything to your requests/responses with behaviours

Need Your Help

How to refresh ListView content when popup windows is covering it in android?

android android-listview android-ui

I have a list view which is backed by an ArrayAdapter which in turn is backed by a LinkedList (say var list) ... Now this list is modified by a background thread (NON - UI thread) whenever their is...

Displaying HTML node in tree - height issue

html flex

Grrr so close yet still failing...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.