i have a client & server application which communicate using WCF. To add some custom session information to each WCF message header i wrapped the client WCF channel into a "ClientChannelProxy" class and used the Unity Interception extension to add my custom header information using aspects.
IUnityContainer container = new UnityContainer();
container.AddNewExtension<Interception>();
container.RegisterType<IClientService, ClientServiceProxy>();
container.Configure<Interception>().SetInterceptorFor<IClientService>(new
TransparentProxyInterceptor());
This works fine for the client since i can easly configure the unity container and interception using the code shown above.
But how to setup unity and interception on the server side? My WCF service is configured in a .SVC file, i don't have any possiblity to configure interception and getting my aspects executed.
<%@ ServiceHost Language="C#" Debug="true" Service="Test.ClientService" %>
<!-- How to configure Unity Interception for this WCF-Service ? -->
Would ne nice if anyone could help me getting it working. Thanks!