all groups > dotnet web services enhancements > june 2005 >
You're in the

dotnet web services enhancements

group:

WSE 2.0 Example not compiling for KeyAlgorithm


WSE 2.0 Example not compiling for KeyAlgorithm nsyforce NO[at]SPAM aol.com
6/30/2005 2:02:20 PM
dotnet web services enhancements:
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.
Re: WSE 2.0 Example not compiling for KeyAlgorithm Julie Lerman
7/1/2005 9:44:49 PM
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


[quoted text, click to view]

AddThis Social Bookmark Button