I'd like to have two processes running within the same user's logon session communicate via WCF. NetNamedPipesBinding seems the most appropriate for this. BUT there could be multiple users logged in and running these processes, so I want a way to ensure each process only talks to other processes in the same user's logon session. Also each user could in theory be logged in to the same machine more than once - again here the processes in different logon sessions should not talk to each other.
I'm not particularly concerned with security (unlike this question), it's just a matter of having a way so each process only talks to the other process within the same user session.
One solution would be to add a unique logon session id to the endpoint address, but I'm not sure how to get a unique logon session (see my question on this here). I thought there might be some way baked into WCF for this, or a standard way of approaching this.