Re: Cannot modify cookies after HTTP headers have been sent
- From: bruce barker <nospam@xxxxxxxxxx>
- Date: Thu, 10 May 2007 08:59:30 -0700
the cookie is a header, so asp.net raises an error if you change it after the headers have been sent (as it will have no effect). you have a page with buffering turned off.
-- bruce (sqlwork.com)
gibble@xxxxxxxxx wrote:
Hi,.
I am going crazy. We get a hundred or so of these errors each day and
while the fix would seem obvious, the error does not include a line
number!
--------------------
Process information:
Process ID: 10084
Process name: w3wp.exe
Exception information:
Exception type: HttpException
Exception message: Server cannot modify cookies after HTTP headers
have been sent.
Request information:
Is authenticated: True
Authentication Type: Forms
Thread information:
Thread ID: 15
Is impersonating: False
Stack trace: at System.Web.HttpCookieCollection.Add(HttpCookie
cookie)
at
System.Web.Security.FormsAuthenticationModule.OnAuthenticate(FormsAuthenticationEventArgs
e)
at System.Web.Security.FormsAuthenticationModule.OnEnter(Object
source, EventArgs eventArgs)
at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
--------------------
According to the logs, it doesn't matter what browser they are using,
we've had errors from FF, IE6 and IE7, (and AOL users with each of
those browsers as well) The only common thing is if I scanned the
errors properly, they all use XP (NT 5.1) ...but that's not too
surprising.
Any ideas would be EXCELLENT as some users are having issues logging
into the site and I believe these errors to be the culprit.
Thankyou.
- Follow-Ups:
- References:
- Prev by Date: Re: saving a value in page_init for use later in postback
- Next by Date: Re: Auto Post Back
- Previous by thread: Cannot modify cookies after HTTP headers have been sent
- Next by thread: Re: Cannot modify cookies after HTTP headers have been sent
- Index(es):
Relevant Pages
|