Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2.
From: znmaster (zengniu2001_at_hotmail.com)
Date: 10/10/04
- Next message: znmaster: "How can I get rid of it :The <RequestSecurityToken> element contained one or more invalid child elements and/or attributes."
- Previous message: leighsword: "Message Expired"
- Next in thread: Hervey Wilson [MSFT]: "Re: Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2."
- Reply: Hervey Wilson [MSFT]: "Re: Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2."
- Messages sorted by: [ date ] [ thread ]
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 !
- Next message: znmaster: "How can I get rid of it :The <RequestSecurityToken> element contained one or more invalid child elements and/or attributes."
- Previous message: leighsword: "Message Expired"
- Next in thread: Hervey Wilson [MSFT]: "Re: Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2."
- Reply: Hervey Wilson [MSFT]: "Re: Encounter exception which may be caused by usage of certificates when I run the sample "AsymmetricEncryption" in WSE2."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|