WCF passing client credentials

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acmlir
    New Member
    • Feb 2008
    • 1

    WCF passing client credentials

    I have made the jump (yes I am slow) and am using WCF. I have a scenario where I need to be able to pass the client credentials from one service to another.
    The configuration is : client app, middle app (acts as host for client app and client of end app), and end app.
    All reside within a single AD and I have control over the client and middle app.
    The client to middle app communications uses the netTcpBinding and the middle app to end app uses basicHttpBindin g. The whole solution is meant to use windows (integrated) security, and the credentials need to flow from the client app to the end app. Is what I am trying to do possible? If so how? Sorry if this is a dumb question...
  • ljbotero
    New Member
    • Mar 2008
    • 1

    #2
    Here's a way I figured out:

    WSHttpBinding b = new WSHttpBinding() ;
    b.Security.Mode = SecurityMode.Me ssage;
    b.Security.Mess age.ClientCrede ntialType = MessageCredenti alType.Windows;
    b.Security.Mess age.NegotiateSe rviceCredential = false;
    EndpointAddress url = new EndpointAddress (myUrl);

    proxy = new proxyClass(b, url);
    proxy.ChannelFa ctory.Credentia ls.Windows.Clie ntCredential =
    myOwnCredential as System.Net.Netw orkCredential;

    Comment

    Working...