如何将Geneva连接到Net.Tcp绑定 [英] How to Wire Geneva to a Net.Tcp Binding

查看:85
本文介绍了如何将Geneva连接到Net.Tcp绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想知道是否有人知道使用NetTcpBinding将令牌传递给服务的最简单/最好的方法。例如,在Geneva Samples\Extensibility\TrustClient项目中,如果我想更改Calculator服务以在net.tcp:// localhost:8080 / CalcService上运行,我如何在GetServiceBinding()中配置绑定来完成那?该示例使用了WS2007FederationHttpBinding,它具有内置的安全扩展以容纳令牌服务。非常感谢!

- Erik


Erik Johnson

Hi,

I was wondering if anyone knew the easiest/best way to pass tokens to a service using a NetTcpBinding.  For example, in the Geneva Samples\Extensibility\TrustClient project, if I wanted to change the Calculator service to run on net.tcp://localhost:8080/CalcService, how could I configure the binding in GetServiceBinding() to accomplish that?  The sample used the WS2007FederationHttpBinding, which has built-in security extensions to accomodate a token service.  Thanks very much!

- Erik


Erik Johnson

推荐答案

你必须创建自己的绑定组合不同的作品。我不会走这条路,你需要成为一名WCF专家。

我能想到解决这个问题的最简单的方法就是将问题分成两部分。使用WSTrustClient和NetTcpBinding的令牌

WSTrustClient客户端=新的WSTrustClient(新的NetTcpBinding(),url等);
var rst = new RequestSecurityToken();
var token = client.Issuer(rst);

2-使用带有IssueToken的CustomBinding在服务调用中发送令牌

channel = ChannelFactoryOperations.CreateChannelWithIssuedToken(
this.ChannelFactory ,
令牌);


我几个月前写了一篇文章,详细介绍了如何做到这一点.http://blogs.southworks.net/ mwoloski / 2008/12/14 / manage-the -cyclecycle-of-security-tokens-geneva-sts-wcf /

马蒂亚斯
You would have to create your own binding combining different pieces. I would not go that route, you need to be a WCF expert.

The easiest way I can think of solving this is separating the problem in two

1- Obtain the Token using the WSTrustClient and NetTcpBinding

WSTrustClient client = new WSTrustClient(new NetTcpBinding(), url, etc.);
var rst = new RequestSecurityToken();
var token = client.Issuer(rst);

2- Send the token in the service call using a CustomBinding with IssueToken

channel = ChannelFactoryOperations.CreateChannelWithIssuedToken(
                this.ChannelFactory,
                token);


I wrote a post couple of months ago with more details on how to do that
http://blogs.southworks.net/mwoloski/2008/12/14/managing-the-lifecycle-of-security-tokens-geneva-sts-wcf/

Matias


这篇关于如何将Geneva连接到Net.Tcp绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆