Chris McKelt

Remembering Thoughts

 

Recent comments

Archive

Authors

Categories

None


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012

WCF Windsor Interceptor, AOP with Logging and Exception Handler Interceptor

WcfServiceExample.zip (7.57 mb)

 

The above example uses Windows Communication Foundation (WCF) Integration Facility 

The main idea here is that WCF should get the service instances from Windsor, which gives us all the usual advantages of IoC plus Windsor's interceptors capabilities. It isn't a lot of code, but it makes it much easier to work with WCF services.

The service contains 2 simple methods on the HelloWorld class.

--  SayHello -- returns a string "Hello World"
--  ThrowException -- throws an exception

Every single call to each of these is intercepted and logged.  Whilst the throw exception will always be caught by the exceptionhandler interceptor.

The first project in the solution is the WCF service, whilst the second is just a WPF client tester.
The project outlook is as follows:








Posted by Chris on Tuesday, February 03, 2009 5:29 AM
Permalink | Comments (2) | Post RSSRSS comment feed

Comments (2) -

Søren Denmark

Friday, April 08, 2011 5:31 AM

Søren

Hi

Are you able to do this with the new WCF REST Templates in VS2010 too?

Seems like you don't have the ServiceContract Interface any more, so how do I make it work with Castle

TIA

Søren

Chris United Kingdom

Saturday, April 16, 2011 9:03 PM

Chris

Hi
Sorry havent had a look at the WCF REST Templates in VS2010 -  will try to have a look and see if this works Smile