【问题标题】:How to Include a Security Token to the SOAP Request?如何在 SOAP 请求中包含安全令牌?
【发布时间】:2017-08-18 11:06:36
【问题描述】:

在这里,我想使用 c# 将安全令牌添加到 SOAP 请求消息中,但我无法弄清楚。有人可以帮忙吗? 在这里我尝试过类似的东西

Request.ServicesExternalClient se = new Request.ServicesExternalClient();
            se.ClientCredentials.UserName.UserName = "UserName";
            se.ClientCredentials.UserName.Password = "Password1";
            BindingElementCollection elements =  se.Endpoint.Binding.CreateBindingElements();   
 elements.Add(SecurityBindingElement.CreateUserNameOverTransportBindingElement());

here 是 CreateUserNameOverTransportBindingElement() 的描述。

【问题讨论】:

    标签: c# wcf soap


    【解决方案1】:

    这里已经提到了一个详细的例子:

    Add Security Credentials to a SOAP Message

    【讨论】:

      猜你喜欢
      • 2016-06-11
      • 1970-01-01
      • 2020-01-11
      • 2016-12-12
      • 2018-04-09
      • 2015-07-06
      • 2021-06-22
      • 1970-01-01
      • 2020-02-01
      相关资源
      最近更新 更多