Welcome to MSDN Blogs Sign in | Join | Help

Setting a User Principal on the Endpoint

How do I set the user principal name that the client will use when calling the service?

The user principal name can be set through either code or configuration, and it's considered a part of the endpoint address used by the client. That means that physically you'll find the user principal name and the description of the endpoint collocated.

In configuration that looks like:

<client>
<endpoint address="..." binding="..." bindingConfiguration="..." contract="..." name="...">
<identity>
<userPrincipalName value="name@address.com" />
</identity>
</endpoint>
</client>

And, in code that looks like:

EndpointAddress address = new EndpointAddress(
"...",
UpnEndpointIdentity.CreateUpnIdentity("name@address.com"),
null
);

Next time: Differences Between WSDL and XSD

Published Thursday, November 08, 2007 5:00 AM by Nicholas Allen

Comments

Thursday, November 08, 2007 1:50 PM by Nicholas Allen's Indigo Blog

# A Call to SSPI Failed

Rather than talking about the solution to one specific question, today's article is about asking good

Sunday, April 20, 2008 12:30 AM by alik levin's

# WCF Security Resources

This is a digest of WCF Security resources I was collecting for some time. Drop me a comment in case

Sunday, May 11, 2008 12:24 PM by 江南白衣

# WCF Security Resources(转)

This is a digest of WCF Security resources I was collecting for some time. Drop me a comment in case it is useful.

New Comments to this post are disabled
 
Page view tracker