Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to rewrite this code from Web.Services2 to Web.Services3 upgrade:

Dim st As Tokens.UsernameToken = New Tokens.UsernameToken(user, pwd, Tokens.PasswordOption.SendPlainText)
envelope.Context.Security.Tokens.Add(st)
Dim sf As SecurityOutputFilter = New SecurityOutputFilter
sf.ProcessMessage(envelope)

This code add security toket to my envalope structure.
In addition, envelope.Context.Security it's marked with obsolete.
How obtain the same envelope with Web.Service3 version?

Thank you everyone.

What I have tried:

Dim st As Tokens.UsernameToken = New Tokens.UsernameToken(user, pwd, Tokens.PasswordOption.SendPlainText)
envelope.Context.Security.Tokens.Add(st)
Dim sf As SecurityOutputFilter = New SecurityOutputFilter
sf.ProcessMessage(envelope)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900