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 / March 2006

Tip: Looking for answers? Try searching our database.

WSE589: Cannot retrieve parent token reference for a derived key t

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Bridge bridgecanada _ com> - 14 Mar 2006 00:50 GMT
I'm trying to see whether I can preserve some sort of backwards compatibility
for WSE2 before we force people to upgrade to WSE3.  I'm trying to compile
our existing code for configuring the proxy with tokens, but I'm getting the
following error when I call the WebMethod:

   MyNUnitTests.WebServices.TestServiceTests.TestAccessWse :
System.InvalidOperationException : WSE589: Cannot retrieve parent token
reference for a derived key token.

  at
Microsoft.Web.Services3.Security.Tokens.DerivedKeyToken.GetXml(XmlDocument
document)
  at Microsoft.Web.Services3.Security.Security.SerializeXml(SoapEnvelope
document)
  at
Microsoft.Web.Services3.Security.SecurityOutputFilter.ProcessHeader(Security
security, SoapEnvelope envelope)
  at
Microsoft.Web.Services3.Security.SecurityOutputFilter.ProcessMessage(SoapEnvelope envelope)
  at
Microsoft.Web.Services3.Security.Wse2PipelinePolicy.LegacyFilterWrapper.ProcessMessage(SoapEnvelope envelope)
  at Microsoft.Web.Services3.Pipeline.ProcessOutputMessage(SoapEnvelope
envelope)
  at Microsoft.Web.Services3.Xml.SoapEnvelopeWriter.Finish()
  at Microsoft.Web.Services3.Xml.XmlWrappingWriter.Flush()
  at
System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

I can't find any reference to this error anywhere.  The code which I use to
configure the proxy is:

           DerivedKeyToken dk1 = new DerivedKeyToken(token);

           proxy.RequestSoapContext.Security.Tokens.Add(dk1);

           // Sign the Message
           proxy.RequestSoapContext.Security.Elements.Add(
               new MessageSignature(dk1));

           // Encrypt the Message
           proxy.RequestSoapContext.Security.Elements.Add(
               new EncryptedData(dk1));

Thanks,

-Mike
Pablo Cibraro - 14 Mar 2006 15:10 GMT
Hi Mike,

What kind of token are you using as base token for the DerivedKey token ?.
The token manager on the service side can not resolve the reference to that
token.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax

> I'm trying to see whether I can preserve some sort of backwards
> compatibility
[quoted text clipped - 50 lines]
>
> -Mike
Mike Bridge bridgecanada _ com> - 14 Mar 2006 18:50 GMT
Hi Pablo,

Sorry, I should have included the parameter types in my call; I'm using a
UsernameToken:

   new UsernameToken(login, password, PasswordOption.SendHashed);

And this was the method signature to anoint my proxy with the various tokens:

   public void ConfigureProxy(WebServicesClientProtocol proxy,
UsernameToken token)

Thanks!

-Mike

> Hi Mike,
>
[quoted text clipped - 60 lines]
> >
> > -Mike
Pablo Cibraro - 14 Mar 2006 22:15 GMT
Hi Mike,

In that case, you must include the UsernameToken in the message.

proxy.RequestSoapContext.Security.Tokens.Add(token);

Try with that one and let me know.

Regards,
Pablo.

> Hi Pablo,
>
[quoted text clipped - 83 lines]
>> >
>> > -Mike

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.