Re: WSE 2.0 Example not compiling for KeyAlgorithm

Tech-Archive recommends: Fix windows errors by optimizing your registry



WSE2.0 is definitely for working with VS2003. It is WSE3.0 that is
compatible with VS2005. So you are okay there.

As for KeyAlgorithm, if you point to that word in code, right click on it,
and select "go to definition", you will find that it is a class inside of
the WSE 2.0 API. More precisely:

Microsoft.Web.Services2.Security.Cryptography.KeyAlgorithm

hth

Julie Lerman


<nsyforce@xxxxxxx> wrote in message
news:1120163998.857324.56980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I'm trying to experiment with a Custom Security Token. I'm going
> through an article that comes with WSE 2.0 entitled "How to: Create a
> Class Representing a Custom XML Security Token". In the example, they
> give the following constructor:
>
> Public Sub New(ByVal serviceToken As SecurityToken)
> MyBase.New(XmlTokenNames.TypeNames.TokenType)
> ' Set the lift time
> _lifeTime = New LifeTime(DateTime.Now, 8 * 60 * 60)
>
> ' Now generate a key.
> _key = CType(KeyAlgorithm.Create("AES128"),
> SymmetricKeyAlgorithm)
> _key.GenerateKey()
>
> ' Generate the encrypted form of the key
> _serviceToken = serviceToken
> End Sub 'New
>
> There's no KeyAlgorithm anywhere. I've been searching and can find no
> sign of it. I ran into a similiar problem with XmlTokenNames, but
> finally discovered it was a custom class that I found in the quick
> start examples. I'm not so lucky with KeyAlgorithm. I did find
> something somewhere that seemed to imply that maybe this is something
> that comes with VS2005. I am still on 2003. That being the case, can
> I use this example? If so, how do I get KeyAlgorithm?
>
> Thanks in advance.
>


.