I have a WCF web service, and it can be called through more than one endpoint. How do I dynamically detect which endpoint was used?
For instance, my service can be called through HTTPS with a binding named “WSHttpBinding_TransportSecurity_IMyService” or through a Windows Integrated Authentication binding named “WSHttpBinding_WindowsSecurity_IMyService”. Depending on which one was called, I need to take a slightly different action to determine the identity of the client.
How can I approach this? (If any more specific details are needed I can provide them.)
If you need to know the source binding to determine the callers identity you are doing something wrong. Your service should be protocol agnostic. Identity management can be accomplished using authentication policies.