Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

Encrypting the response

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
D.Mitchell - 03 Sep 2004 09:25 GMT
Looks like it should be fairly simple from the example provided with WSE 2
install. I get an error on the last line. Retrieve the signing token OK. It's
definitley not nothing. Anything I am doing wrong.

-- IN THE WEB METHOD
Dim x509st As X509SecurityToken
Dim se As ISecurityElement

'loop over security elements in request
For Each se In context.Security.Elements

   'when current element is message signature
   If TypeOf se Is MessageSignature Then
       Dim ms As MessageSignature = se

       x509st = ms.SigningToken

   End If
Next

'encrypt the response
Dim responseContext As SoapContext = ResponseSoapContext.Current

-- ** ERROR - Refereced security token could not be retrieved **
responseContext.Security.Elements.Add(New EncryptedData(x509st))
SA - 06 Sep 2004 16:11 GMT
You will need to add your security token to the context first, like

responseContext.Security.Tokens.Add(x509st)

HTH
Signature


Sven

> Looks like it should be fairly simple from the example provided with WSE 2
> install. I get an error on the last line. Retrieve the signing token OK. It's
[quoted text clipped - 21 lines]
> -- ** ERROR - Refereced security token could not be retrieved **
> responseContext.Security.Elements.Add(New EncryptedData(x509st))

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.