2017-08-18 53 views
0

这里我想添加安全tocken到一个SOAP请求消息使用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的说明()。

回答

相关问题