Working with WSTrustChannelFactory and web proxy settings

944 views Asked by At

in WSTrustChannelFactory documentation there is a reference to working with proxy:

  One common pattern where the OnBehalfOf feature is used is the proxy 
  pattern where the client cannot access the STS directly but instead 
  communicates through a proxy gateway

I can't seem to find an example.
In some of my users' computers a proxy is defined for exteral request.
How can I request the token if the STS is behind proxy.

Currently I am getting it as follows:

var rst = new RequestSecurityToken{...}
IWSTrustChannelContract wsTrustChannelContract = factory.CreateChannel();
var token = wsTrustChannelContract.Issue(rst) as GenericXmlSecurityToken;

How can I change it to using the proxy?

Thanks.

1

There are 1 answers

0
leastprivilege On

OnBehalfOf is for situations where you build the proxy yourself - like the ADFS proxy. I haven't seen any sample for that either - but it follows the same pattern as ActAs.

It has nothing to do with "regular" web proxies that might be between you and your STS.

But have a look here: How can I set an HTTP Proxy (WebProxy) on a WCF client-side Service proxy?