Forms authentication error 4005

A

Adrian Parker

We have an application that's running ok on most of our customers machines,
but on one of them we get an error. They're running on windows 2003 server
with iis6. In the web.config, the authentication is set to forms, and the
form tag contains: timeout="25" slidingExpiration="true"

Event Type: Information
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event code: 4005
Event message: Forms authentication failed for the request. Reason: The
ticket supplied has expired. Event detail code: 50202

Any ideas ?
 
M

Mark Fitzpatrick

Is this a web farm or are you using a web garden? If so, is the machinekey
set in the web.config so it matches the others systems? If not, then it will
be using the wrong key to decrypt the authentication ticket.

Also, check to see if the application is recycling. It may be creating new
sessions and or messing up the ticket if it's recycling too often. I had one
instance similar to this where the application pool was recycling every
minute because the resources available to ASP.Net were set too low and it
was always trying to recycle to release them.
 
A

Adrian Parker

It is just a plain standard single machine website.

How do you change the resources available to a asp.net ?

| Is this a web farm or are you using a web garden? If so, is the machinekey
| set in the web.config so it matches the others systems? If not, then it
will
| be using the wrong key to decrypt the authentication ticket.
|
| Also, check to see if the application is recycling. It may be creating new
| sessions and or messing up the ticket if it's recycling too often. I had
one
| instance similar to this where the application pool was recycling every
| minute because the resources available to ASP.Net were set too low and it
| was always trying to recycle to release them.
|
|
|
| --
|
| Hope this helps,
| Mark Fitzpatrick
| Former Microsoft FrontPage MVP 199?-2006
|
|
|
| | > We have an application that's running ok on most of our customers
| > machines,
| > but on one of them we get an error. They're running on windows 2003
| > server
| > with iis6. In the web.config, the authentication is set to forms, and
| > the
| > form tag contains: timeout="25" slidingExpiration="true"
| >
| > Event Type: Information
| > Event Source: ASP.NET 2.0.50727.0
| > Event Category: Web Event
| > Event code: 4005
| > Event message: Forms authentication failed for the request. Reason: The
| > ticket supplied has expired. Event detail code: 50202
| >
| > Any ideas ?
| > --
| > Adrian Parker
| > Ingenuity At Work Ltd
| >
| >
|
|
 
A

Adrian Parker

All I can find is that on the app pool recycle page:
Recycle worker process (in minutes) : 1740

| Is this a web farm or are you using a web garden? If so, is the machinekey
| set in the web.config so it matches the others systems? If not, then it
will
| be using the wrong key to decrypt the authentication ticket.
|
| Also, check to see if the application is recycling. It may be creating new
| sessions and or messing up the ticket if it's recycling too often. I had
one
| instance similar to this where the application pool was recycling every
| minute because the resources available to ASP.Net were set too low and it
| was always trying to recycle to release them.
|
|
|
| --
|
| Hope this helps,
| Mark Fitzpatrick
| Former Microsoft FrontPage MVP 199?-2006
|
|
|
| | > We have an application that's running ok on most of our customers
| > machines,
| > but on one of them we get an error. They're running on windows 2003
| > server
| > with iis6. In the web.config, the authentication is set to forms, and
| > the
| > form tag contains: timeout="25" slidingExpiration="true"
| >
| > Event Type: Information
| > Event Source: ASP.NET 2.0.50727.0
| > Event Category: Web Event
| > Event code: 4005
| > Event message: Forms authentication failed for the request. Reason: The
| > ticket supplied has expired. Event detail code: 50202
| >
| > Any ideas ?
| > --
| > Adrian Parker
| > Ingenuity At Work Ltd
| >
| >
|
|
 
J

Juan T. Llibre

Does this happen after 25 minutes have elapsed ( the timeout you set ) ?
Or, does it happen before the timeout has occurred ?

Also, note that, to prevent compromised performance, and to avoid multiple browser
warnings for users who have cookie warnings turned on, the cookie should be updated
when more than half of the specified timeout has elapsed.

This might cause a loss of precision...or that feature might be non-functional.
 
A

Adrian Parker

Ah, would this be caused by the session timeout being longer than the cookie
timeout ?



| Does this happen after 25 minutes have elapsed ( the timeout you set ) ?
| Or, does it happen before the timeout has occurred ?
|
| Also, note that, to prevent compromised performance, and to avoid multiple
browser
| warnings for users who have cookie warnings turned on, the cookie should
be updated
| when more than half of the specified timeout has elapsed.
|
| This might cause a loss of precision...or that feature might be
non-functional.
|
|
|
|
| Juan T. Llibre, asp.net MVP
| asp.net faq : http://asp.net.do/faq/
| foros de asp.net, en español : http://asp.net.do/foros/
| ===================================
| | > We have an application that's running ok on most of our customers
machines,
| > but on one of them we get an error. They're running on windows 2003
server
| > with iis6. In the web.config, the authentication is set to forms, and
the
| > form tag contains: timeout="25" slidingExpiration="true"
| >
| > Event Type: Information
| > Event Source: ASP.NET 2.0.50727.0
| > Event Category: Web Event
| > Event code: 4005
| > Event message: Forms authentication failed for the request. Reason: The
| > ticket supplied has expired. Event detail code: 50202
| >
| > Any ideas ?
| > --
| > Adrian Parker
| > Ingenuity At Work Ltd
|
|
 
S

Steven Cheng[MSFT]

Hi Adrian,

Since the web application works well on most machines, I don't think the
problem should be related to your ASP.NET application's code logic or
setting. Also, when you perform the test, are you using the same client
machine to access all those webservers that host your web application? If
so, this can ensure that it is not the client machine which may cause the
error behavior.

Also, you can try comparing the difference between the problem server and
those server that host your application well.

BTW, is the error occuring occasionaly or frequently or does it always
occur under a fixed condition? Based on my experience, there does exists
some similar issue that may occured when the application deployed in
webfarm or webgarden mode. As for the "How do you change the resources
available to a asp.net" , this is the setting of your ASP.NET worker
process, and it depend on whether the server is using IIS5 or IIS6. for
IIS5, ASP.NET worker process use the setting in the machine.config
<processModel> element to control its recycle limitation. While for IIS6,
it use application pool model, so those recycle setting is in IIS's
application pool's performance/health setting. Anyway, you can have a look
at this if the error you met does likely be caused by worker process
recycling.

Please feel free to post here if you have any further questions.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top