Sorry, I can be late ... but better late than never :) What you can do is share the object between your applications ... For example, create a random GUID in the first and send it to the second (serialization ...). then if both AppDomains know this auth token, you can do something like this:
And then you just need to add the behavior of your endpoint to your endpoint on both sides:
customer:
ChannelFactory<TInterface> factory; factory = new ChannelFactory<TInterface>(BuildLocalBinding(), "net.pipe://localhost/foo"); factory.Endpoint.Behaviors.Add(new CProcessAuthenticationBehavior());
server:
ServiceHost svcHost = new System.ServiceModel.ServiceHost(imlpementationType); svcHost.AddServiceEndpoint(interfaceType, binding, "net.pipe://localhost/foo"); svcHost.Description.Endpoints[0].Behaviors.Add(new CProcessAuthenticationBehavior());
Well ... this can be done in config, but I will let you dig :)
Hope this helps.
source share