Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

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 form 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's originated on a different server. But it doesn't sound like you're running on a web farm from your question.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...