locked
unifying code RRS feed

  • Question

  •  System.IdentityModel.Tokens.SecurityToken callerToken = null;
                IClaimsPrincipal claimsPrincipal = Thread.CurrentPrincipal as IClaimsPrincipal;
                if (claimsPrincipal != null && claimsPrincipal.Identities.Count == 1)
                {
                    callerToken = claimsPrincipal.Identities[0].BootstrapToken;
                }

     var channelFactory = new ChannelFactory<ICmisFacadeChannel>("XXX");
                channelFactory.ConfigureChannelFactory();
                ICmisFacadeChannel createChannelActingAs = channelFactory.CreateChannelActingAs(callerToken);                                          
                  var  x = createChannelActingAs.getx();
                    createChannelActingAs.Close();

    Is there way to override ClientBase to achive this?Instead of doing this for every call?

               
    • Edited by chintapali Thursday, May 10, 2012 4:35 PM
    Thursday, May 10, 2012 4:34 PM

All replies