views:

1518

answers:

1

Aloha

I'm running a website using ASP.NET 2.0. Every now and then (10+ times per day on 100+ users daily) I receive this error: Forms authentication failed - ticket supplied has expired.

Here's my web.config snippet:

<authentication mode="Forms">
    <forms name=".CLLSAUTH" loginUrl="login.aspx" protection="All" path="/" timeout="60" />
</authentication>

I've looked at several solutions, someone mentioned the session timeout, but it's also 60 minutes in my config. Two more things, I'm not running a webfarm, and the app is not being recycled around the time the error occurs.

Any clues?

-Edoode

+2  A: 

I'm not sure what your question is... In this case, when a user has their browser open for more than an hour, their authentication cookie times out. The next time they send a request to the server BAM.

Try adding slidingExpiration="true" to the forms element. That way the timeout restarts every time a user hits the server.

This could possibly also be because IIS recycled your worker process. You'd have to check your logs to see if this happened before somebody caused this error.

If your application is running on different servers, there might be an issue with the machine key in the forms authentication cookie being rejected because it originated on a different server. But it doesn't sound like you're running on a web farm from your qeustion.

Will
Aaron reminded me about the worker process recycling...
Will
My question is, how to stop this error from occuring. And as clarified I'm not using a webfarm, nor is the IIS worker process recycling. I'll try your slidingExpiration suggestion. Thanks.
edosoft