Re: X509 Signing: criticism on code snippet



Hi,
You are not specifying what elements should be signed with the signature.
(Signature references).
I recommend you to use a policy file instead of code to describe the
security requeriments for your service.

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

"Mr. BogoMips" <MrBogoMips@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D395530C-E17C-4E11-BC10-68E9CE619E76@xxxxxxxxxxxxxxxx
> Hello All,
> I'm attempting to execute a secured webservice over an https connection.
> I followed all the documentation provided with the WSW2.0 sp2 but
> unfortunately I get a final error message related to x509 digital signing
> of
> the message.
>
> The Webserivce runs on BEA WebLogic Server 8.1
>
> I would show you the process and the code I've written down to get
> possibly
> suggestions and criticism to point me on the way.
>
> 1. I've got the .wsdl and, by wsdl.exe I've generated the proxy class
> 2. I've changed the superclass to WebServicesClientProtocol
> 3. I've write the following code:
>
> // BEGIN C# Snippet
> X509SecurityToken signatureToken = GetSecurityToken(); // OK
> GetDocumentSoapService svc = new GetDocumentSoapService(); // The Proxy
>
> // HTTPS Configuration cut off...
>
> SoapContext requestContext = svc.RequestSoapContext;
> requestContext.Security.Tokens.Add(signatureToken);
> MessageSignature sig_c = new MessageSignature(signatureToken);
> requestContext.Security.Elements.Add(sig_c);
> requestContext.Security.Timestamp.TtlInSeconds = 60;
> svc.executeTheRemoteMethod("Hello World!");
> // END C# Snippet
>
> I receive the following error message:
>
> // BEGIN ERROR MESSAGE
> An unhandled exception of type
> 'System.Web.Services.Protocols.SoapHeaderException' occurred in
> system.web.services.dll
>
> Additional information: Could not resolve key for signature
> weblogic.xml.security.signature.Signature@4719a8
> // END ERROR MESSAGE
>
> Where I'm wrong?
>
> Thanks in advance


.



Relevant Pages

  • Re: Outlook Error
    ... It would help if you posted the exact error message, ... signature. ... Milly Staples [MVP - Outlook] ... unsolicited mail sent to my personal account will be deleted without ...
    (microsoft.public.outlook)
  • Re: Problem with Entourage Signatures
    ... While I am typing the body text, an error message ... I have rebuilt the database and have trashed the Signature file, ... To continue typing my text, I have to click on the OK button on ...
    (microsoft.public.mac.office.entourage)
  • Re: Cant create file. - PLEASE HELP!!!!
    ... Jeff wrote: ... > I am using Outlook 2003. ... I had a signature and vcf attachment inserted automatically ... > After I hit the OK button, I get the error message window one more ...
    (microsoft.public.outlook.general)
  • Problem using WSE 2.0 with ASP.NET 2.0
    ... I am trying to verify the signature of the messages. ... I get an error message of “Parser Error Message: ... Prev by Date: ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Problem with SoapExtensionTypes in ASP.NET 2.0
    ... I am trying to verify the signature of the messages. ... I get an error message of “Parser Error Message: ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)