Error 4005 Forms Authentication Failed - Ticket Supplied Has Expired

  • Updated

In your Event Viewer, you've begun to see a number of errors with the message "Forms authentication failed - Ticket supplied has expired" appear.

Side effects may also include:

1. Slower site performance.
2. Issues with Login function and retrieving user information for that particular session.

As it turns out, this issue isn't related to Episerver or Ektron. 

The error can stem from auto-generated keys in your server's machine.config file. Each time the application starts, new machine keys are generated also invalidating any existing encrypted viewstate or forms authentication tickets.

So how can you fix this?

If you have access to IIS on the server, the easiest thing to do is to set up a machine key. 

1. Start the management console and then select the web site. Open the machine key configuration.
2. When the control panel opens, confirm the following options:

        a. Uncheck Automatically generate at runtime for both the validation key and the decryption key.

        b. Click Generate Keys under Actions on the right side of the panel.

3. Click Apply.

For additional information, please see Microsoft's IIS7 Machine Key Guide.