Hi,
You can use the Microsoft.Web.Services3.Security.SecurityTokenRequest class.
(I am not sure if this class is available in previous WSE versions)
WSE automatically serializes this class as the message you are looking for.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com
> Hi!
>
[quoted text clipped - 39 lines]
> </soap:Body>
> </soap:Envelope>
Gustav - 09 Feb 2006 15:06 GMT
Hi!
How do I accomplish this using WSE 2.0?
/ Gustav
unfortuna
> Hi,
>
[quoted text clipped - 50 lines]
> > </soap:Body>
> > </soap:Envelope>
Gustav - 09 Feb 2006 17:20 GMT
I hope you refer to the RequestSecurityToken wich exist in both WSE2.0 and
WSE3.0?
Anyhow to start the securconversation and recieve a RSTR I do the
following(see code below) but I get the following exception:
An unhandled exception of type
'Microsoft.Web.Services2.AsynchronousOperationException' occurred in
microsoft.web.services2.dll
Additional information: WSE101: An asynchronous operation raised an exception.
//Create proxy for the tokenService
SecurityTokenServiceClient stsProxy = new SecurityTokenServiceClient(new
Uri(https://webservice));
//Create the security token request
RequestSecurityToken rst = new
RequestSecurityToken("http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue");
//Request the token from the Issuer
RequestSecurityTokenResponse response = stsProxy.IssueSecurityToken(rst);
Appriciate any comments on what the problem could be.
/ Gustav
> Hi,
>
[quoted text clipped - 50 lines]
> > </soap:Body>
> > </soap:Envelope>
Pablo Cibraro - 10 Feb 2006 13:23 GMT
Gustav,
Do you have additional information about the error ? I mean, WSE usually
logs the complete error in the eventlog.
Your code seems to be ok.
Regards,
Pablo Cibraro.
>I hope you refer to the RequestSecurityToken wich exist in both WSE2.0 and
> WSE3.0?
[quoted text clipped - 80 lines]
>> > </soap:Body>
>> > </soap:Envelope>
Gustav - 01 Mar 2006 12:56 GMT
the application log says:
WSE050: The following exception was encountered:
System.InvalidOperationException: Private Key is not available
at
Microsoft.Web.Services2.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] ciphertext, Boolean useOAEP)
at
Microsoft.Web.Services2.Security.Cryptography.RSA15KeyExchangeFormatter.DecryptKey(Byte[] cipherKey)
at Microsoft.Web.Services2.Security.EncryptedKey.Decrypt()
at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)
at
Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)
at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message).
For more information, see Help and Support Center at
> Gustav,
> Do you have additional information about the error ? I mean, WSE usually
[quoted text clipped - 88 lines]
> >> > </soap:Body>
> >> > </soap:Envelope>