Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2.

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: znmaster (zengniu2001_at_hotmail.com)
Date: 10/10/04


Date: Sun, 10 Oct 2004 22:06:03 +0800

I've installed WSE2 and the sample certificates in my computer according to
the readme file.I ran the sample "AsymmetricEncryption"but failed. The main
source code of the the client is as following:
public void Run()
        {
            // Create an instance of the Web service proxy

            StockServiceWse serviceProxy = new StockServiceWse();
         // Configure the proxy
            ConfigureProxy(serviceProxy);

            // Generate the Asymmetric key
           // 'true' will prompt you for a cert, 'false' will use the
quickstart sample cert
            X509SecurityToken token = AppBase.GetServerToken( false, true );

            if (token == null)
                throw new ApplicationException("Unable to obtain security
token.");

            // Add an EncryptedData element to the security collection
            // to encrypt the request.

 serviceProxy.RequestSoapContext.Security.Elements.Add( new EncryptedData(
token ) );

               // Call the service
 Console.WriteLine("Calling {0}", serviceProxy.Url);
 String[] symbols = {"FABRIKAM", "CONTOSO"};
 StockQuote[] quotes = serviceProxy.StockQuoteRequest( symbols );......}
When it ran to the line "tockQuote[] quotes =
serviceProxy.StockQuoteRequest( symbols )",
I got a exeception info like this:

Calling http://localhost/AsymEncryptCodeService/AsymEncryptService.asmx
****** Exception Raised ******
System.Web.Services.Protocols.SoapException:
SOAP-Fault code: http://schemas.xmlsoap.org/soap/envelope/:Server
Message: Server unavailable, please try later

It seems that the service is not available,but I doubt that the exception is
caused by the usage of certificate. If I didn't encrypt the soap message,
there would be no such problem. I did install the certificate according to"
Microsoft WSE\v2.0\Samples\Sample Test Certificates\readme.htm" and I've
read "Additional steps for the AsymmetricEncryption sample" as well!
 I almost got mad! Please help me !



Relevant Pages

  • RE: Referenced security token could not be retrieved
    ... Your java client probably needs to use a function that can generate the ... Reads the SubjectKeyIdentifier information from the certificate. ... > BEGIN FULL SOAP MESSAGE REQUEST ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Referenced security token could not be retrieved
    ... I'm attempting to call a .Net Web Service from a Java client and I always ... I created a simple Hello World Web Service and then enabled WSSE for the ... I exported this certificate to a file and then imported it ... BEGIN FULL SOAP MESSAGE REQUEST ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • WSE - X.509 signed meesage- Multiple SoapExtensions
    ... If my client sends a SOAP message that is signed using a X.509 certificate, ... the service is not able to verify the signature. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: How to get key container or public key from CertificateContext?
    ... that cert has a keycontainer/private key associated with it. ... See .NET "KeyPal" source code and function GetCertContainernamestherein: ... > i want to encrypt/decrypt files use certificate in store. ...
    (microsoft.public.platformsdk.security)
  • Re: Access Private Key File From X509 Certificate
    ... i also have source code that does the same programmatically...i can make ... I have a web service that uses a certificate to call another web ... ensure the private key has appropriate rights. ...
    (microsoft.public.dotnet.security)