2017-08-18 54 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的說明()。

回答

相關問題