Custom UserNameTokenManager using .NET class

Hi,

I have a VB6 ASP dll making a late bound call ("CreateObject") to a .NET DLL. This .NET class is used to call a WSE2.0 enabled web service. The .NET DLL returns a record set to the VB6 ASP dll.

The .NET class can call the web method and it encrypts the request body using a Username/Password token with the password hashed. At the web service, a custom UsernameTokenManager overrides the AuthenticateToken and VerifyHashedPassword functions, normally handled by WSE. The method executes, and returns an encrypted response to the .NET class that made the request.

Therein lies the problem. When the encrypted response is received, WSE throws:

WSE562: The incoming username token contains a password hash. The built-in UsernameTokenManager does not support this type of UsernameToken. Please see the documentation for more details on the UsernameTokenManager.AuthenticateToken method. The security token could not be authenticated or authorized

If I send the response clear text, then everything works great. When encrypted, the error is thrown. I think I need to register a custom UsernameTokenManager for the .NET DLL making the request and receiving the response. I just don't know how or where.

The calling .Net class doesn't have an app.config file to modify to register a custom UsernameTokenManager. How do I register the class that contains the custom UsernameTokenManager for the calling .NET DLL class Does an entry go in the AssemblyInfo.vb file

Thanks,

Mark



Answer this question

Custom UserNameTokenManager using .NET class

  • Custom UserNameTokenManager using .NET class