Server cannot append header after HTTP headers have been sent.

Server Error in '/' Application.

Server cannot append header 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 append header after HTTP headers have been sent.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[HttpException (0x80004005): Server cannot append header after HTTP headers have been sent.]
   System.Web.HttpResponse.AppendHeader(String name, String value) +2857733
   DotNetNuke.HttpModules.Compression.CompressingFilter.WriteHeaders() +51
   DotNetNuke.HttpModules.Compression.GZipFilter.Write(Byte[] buffer, Int32 offset, Int32 count) +21
   DotNetNuke.HttpModules.Compression.WhitespaceFilter.Write(Byte[] buf, Int32 offset, Int32 count) +133
   System.Web.HttpWriter.Filter(Boolean finalFiltering) +8758019
   System.Web.HttpResponse.Flush(Boolean finalFlush) +625
   System.Web.HttpResponse.Flush() +20
   System.Web.HttpWriter.Write(String s) +8650663
   System.Web.UI.HtmlTextWriter.Write(String s) +27
   System.Web.UI.WebControls.Literal.Render(HtmlTextWriter writer) +48
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) +43
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer) +75
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

[PageLoadException: Server cannot append header after HTTP headers have been sent.]
   DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(Exception exc, String URL) +325
   DotNetNuke.Framework.PageBase.Page_Error(Object Source, EventArgs e) +380
   System.Web.UI.TemplateControl.OnError(EventArgs e) +8689530
   System.Web.UI.Page.HandleError(Exception e) +84
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6776
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614