Topic: Error message: "Logon failed due to invalid or expired authentication token."
Error message: "Logon failed due to invalid or expired authentication token."
I followed the steps in "Enabling Forms-Based Authentication" of the Site Development help file. I have configured my MCMS site for anonymous access in both Microsoft Internet Information Server (IIS) and the SCA.
I used the IUSR_<machinename> user and have placed it in a "subscriber" rights group. I have modified the web.config to include "Forms" authentication. Anonymous access is working and logging in works. However, when the cookie expires, I receive this error. If I delete my cookies, I can log back in and everything works fine. Any suggestions?
Answer
When the session expires, you will automatically get the Login page. Because the session has expired, there is no current CmsHttpContext. Trying to access the current context within the login page will generate the expired or invalid authentication token exception.
Don't try to access the current context anywhere on the login page. If you must, put it in a try catch block and handle the error when it occurs.
[Back to Top]
The information contained in this document represents the current view of
Microsoft Corporation on the issues discussed as of the date of publication.
Because Microsoft must respond to changing market conditions, it should not be
interpreted to be a commitment on the part of Microsoft, and Microsoft cannot
guarantee the accuracy of any information presented after the date of
publication.
This White Paper is for informational purposes only. MICROSOFT MAKES NO
WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user.
Without limiting the rights under copyright, no part of this document may be
reproduced, stored in or introduced into a retrieval system, or transmitted in
any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of
Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or
other intellectual property rights covering subject matter in this document.
Except as expressly provided in any written license agreement from Microsoft,
the furnishing of this document does not give you any license to these patents,
trademarks, copyrights, or other intellectual property.
© 2004 Microsoft Corporation. All rights reserved.
Microsoft, ActiveX, Visual Studio, Windows, and Windows Server are either
registered trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries.
The names of actual companies and products mentioned herein may be the
trademarks of their respective owners.