Задайте вопросЗадайте вопрос
 

ОтвеченоHandling username/password validation errors

  • 21 августа 2006 г. 14:24varely Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    Hi,

    I try to implement custom token provider as is shown in "Token Provider" sample from WCF samples collection. There, when user's credentials validation fails in my custom UserNamePasswordValidator is trown new SecurityTokenException.

    On the client side i receive MessageSecurityException from which i'm not able to get error message from the server, only general exception description: "An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail". But FaultException also doesn't contain my error message.

    Also, i tried to change trowing of SecurityTokenException with FaultException but has same results.

    Can someone provide some guidance on how to handle this exception in client layer? Or may be is there other workaround to be able to receive on the client side error messages about unsuccessful validations in UserNamePasswordValidator? I just want to show to the user more descriptive error message than simple "Authentication failed".

    PS: I have seen other topics with the same question as mine, but i don't find any answer, so, i will put same question again - i'm sorry for this.

    Regards

Ответы

Все ответы