首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WIF3.5 - WIF4.5:在哪里设置SecurityTokenServiceConfiguration.TrustedEndpoints

WIF3.5 - WIF4.5:在哪里设置SecurityTokenServiceConfiguration.TrustedEndpoints
EN

Stack Overflow用户
提问于 2014-10-04 12:30:52
回答 1查看 340关注 0票数 0

我必须将构建在WIF 3.5上的堆栈迁移到WIF 4.5。这是一个有点慢的过程,因为我找不到太多关于这方面的详细文档。

我遇到了一个拦截器,我似乎找不到SecurityTokenServiceConfiguration.TrustedEndpoints是如何迁移的。我们有一个扩展SecurityTokenServiceConfiguration的Configuration类

代码语言:javascript
复制
MyConfiguration: SecurityTokenServiceConfiguration

在构造器中有一些建立可信端点的代码:

代码语言:javascript
复制
//Add transport security message credential endpoint
this.TrustEndpoints.Add(new ServiceHostEndpointConfiguration(
            typeof(IWSTrust13SyncContract),
            new UserNameWSTrustBinding(SecurityMode.TransportWithMessageCredential),
            "/mixed/username"));

我不知道如何在WIF4.5中做同样的事情。有人有什么建议或建议吗?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2014-10-30 16:08:57

尝试在您的配置文件中执行此操作:

代码语言:javascript
复制
<service name="System.ServiceModel.Security.WSTrustServiceContract" behaviorConfiguration="ServiceBehavior">
        <endpoint address="IWSTrust13" binding="ws2007HttpBinding" contract="System.ServiceModel.Security.IWSTrust13AsyncContract" bindingConfiguration="ws2007HttpBindingConfiguration">
          <identity>
            <userPrincipalName value="yourUpn" />

          </identity>
        </endpoint>
<service/>

然后定义所需的绑定。

代码语言:javascript
复制
<ws2007HttpBinding>
        <binding name="ws2007HttpBindingConfiguration">
          <security mode="TransportWithMessageCredential">
            <message establishSecurityContext="false" />
          </security>
        </binding>
      </ws2007HttpBinding>

您可能需要将该绑定与一个方案相关联。希望这能帮到你。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26189638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档