0

we are having trouble in generating security token for anonymous login. We have two kinds of login:

  1. Usual username and password (Registered)
  2. Using the 2 user's info(Unregistered/Anonymous)

We are using Claims Based Authentication, Sharepoint 2010.

Anonymous login was working perfectly around 2 weeks before, but now it does not.

User is redirected to login page instead of the destined page.

Web configs for STS, Services, Virtual Directories are the same. ULS logs:

  • w3wp.exe (0x4200) 0x09F0 SharePoint Foundation Claims Authentication Critical An exception occurred when trying to issue
    security token: The security token username and password could not be validated..
  • w3wp.exe (0x4200) 0x09F0 SharePoint Foundation Claims Authentication Could not rebuild forms user token.
  • w3wp.exe (0x5450) 0x09E0 SharePoint Foundation Claims Authentication User '{0}' not found.
  • w3wp.exe (0x5450) 0x09E0 SharePoint Foundation Claims Authentication Failed validation on user ''.
  • w3wp.exe (0x5450) 0x09E0 SharePoint Foundation Claims Authentication SPSecurityTokenService.Issue() failed:
    System.ServiceModel.FaultException`1[Microsoft.IdentityModel.Tokens.FailedAuthenticationException]: The security token username and password could not be validated.
    (Fault Detail is equal to
    Microsoft.IdentityModel.Tokens.FailedAuthenticationException: The
    security token username and password could not be validated.).

  • w3wp.exe (0x4200) 0x1E44 SharePoint Foundation Claims Authentication Request for security token failed with exception:
    System.ServiceModel.FaultException: The security token username and
    password could not be validated. at
    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response) at
    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) at
    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst) at
    Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri
    context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo)

  • w3wp.exe (0x4200) 0x1E44 SharePoint Foundation Claims Authentication An exception occurred when trying to issue security
    token: The security token username and password could not be
    validated..

What else could be cause of the issue?

Update

Custom login, which the anonymous or unregistered user uses, uses SPClaimsUtility.AuthenticateFormUser(uri, username, password).

  • Have you recite the sts app pool? – Waqas Sarwar MVP Nov 17 '16 at 23:18
  • hi @WaqasSarwarMCSE, what do you mean by reciting the sts app pool? – newbie Nov 18 '16 at 1:58
  • I am sorry it was typo as send from mobile....I mean recycle the sts app pool – Waqas Sarwar MVP Nov 18 '16 at 1:59
  • @WaqasSarwarMCSE, based from the setting, sts app pool is not recycled. – newbie Nov 18 '16 at 2:51
  • I mean try to recycle it and see if that fix – Waqas Sarwar MVP Nov 18 '16 at 2:53
0

To do that check Configuring Forms-Based Authentication in SharePoint 2013 – Part 3 – Editing the Web.Config Files

Also check another reasons at Form based authentication FBA - keeps getting "Make sure your user name and password are correct"

  • Thanks for this, @M.Qassas. I have compared the said file and they are the same. I have also used the web.config from pre prod and in my dev environment (both are working) but for this specific environment it did not. Also, upon checking the ULS logs, it seems that it failed to get the account set in Application Pool for user impersonation. – newbie Nov 17 '16 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.