How to Catch Invalid UserID/Password on Client (WSE 3.0) ?

I have a Web service and a windows client that calls the service. I am using WSE3, x509 to encrypt with a custom UserNameToken.

I am trying to figure out how to specifically catch a wrong UserID/Pwd so I can display a friendly message.

I call my WS method with a Try/Catch, specifically catching exceptions of type "ResponseProcessingException".ResponseProcessingException.Fault.Message contains, in part, the text:

"WSE565: The password provided by the SecurityTokenManager does not match the one on the incoming token."

Besides parsing text, I see no obvious way to detect an invalid UserID/Pwd.

Is there a better way to get what I am looking for? Is there a better way to handle WS exceptions on the client?

Thanks

[1057 byte] By [RobertP] at [2007-12-25]

.NET Development

Site Classified