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.
Julie Lerman - 02 Jul 2005 02:44 GMT
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
> 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
[quoted text clipped - 24 lines]
>
> Thanks in advance.