client credentials RRS feed

  • Question

  • Is there a way to pull client credentials in Server side mesage inspectors?

    Proxy.ClientCredentials.UserName.UserName = "test"
    Proxy.ClientCredentials.UserName.Password ="pwd"

    In server message inspectors in
    public class TestMessageInspector : IDispatchMessageInspector
    public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext){

    Tuesday, February 8, 2011 4:03 PM


  • the username is always available in the current security context.


    as for the password, you cannot get it in the inspector. assuming the message is not encrypted, you could implement a custom message encoder. 

    WCF Security, Interoperability And Performance Blog
    • Marked as answer by chintapali Tuesday, February 8, 2011 11:15 PM
    Tuesday, February 8, 2011 7:49 PM