Server cannot modify cookies after HTTP headers have been se

Posted by Community Admin on 04-Aug-2018 03:25

Server cannot modify cookies after HTTP headers have been sent

All Replies

Posted by Community Admin on 16-Aug-2011 00:00

Do you know what might be causing this error?  We have a page which calls a PokeIn script by using an ASP page to render a javascript include.

<script src="Handler.aspx?ms=connect">

On viewing

Handler.aspx?ms=connect


We get the following error:

The page works fine as a standalone outside of Sitefinity.  What might we be doing wrong?

Server Error in '/' Application.

Server cannot modify cookies after HTTP headers have been sent.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: Server cannot modify cookies after HTTP headers have been sent.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[HttpException (0x80004005): Server cannot modify cookies after HTTP headers have been sent.]
   System.Web.HttpResponse.BeforeCookieCollectionChange() +8981612
   System.Web.HttpCookieCollection.Remove(String name) +24
   Telerik.Sitefinity.Security.SecurityManager.DeleteCookie(String cookieName, String path, String domain, Boolean requireSsl) +415
   Telerik.Sitefinity.Security.SecurityManager.UpdateCookies(HttpContextBase context) +390
   Telerik.Sitefinity.Web.SitefinityHttpModule.Context_EndRequest(Object sender, EventArgs e) +82
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

This thread is closed