title: Server cannot set content type after HTTP headers have been sent -- tracking this down
body: <p>One of our users is getting an error in our web application.  We couldnt duplicate this problem, and I suspected it was network related.  I had the user try the application using their notebook at their office and their home, and confirmed the problem only happens at their office.</p>
  <p>I logged into the server and looked at the event viewer right after they tried at their office and the following warning was in the log.</p>
  <p>I'm at a loss on how to even start tracking this down.  Any suggestions?</p>
  <blockquote>
  <p>Event Viewer Log below:</p>
  <p>Event code: 3005  Event message: An unhandled exception has occurred.
  Event time: 6/20/2012 6:32:45 PM  Event time (UTC): 6/20/2012 10:32:45
  PM  Event ID: ebf8f628a9b3457cbea117c8c2da2186  Event sequence: 2970
  Event occurrence: 26  Event detail code: 0    Application information:</p>
  
  <pre><code>Application domain: /LM/W3SVC/50/ROOT-1-129847041933281152 
  Trust level: Full 
  Application Virtual Path: / 
  Application Path: c:\websites\foobar.acme.com\ 
  Machine name: MyServer    Process information: 
  Process ID: 15152 
  Process name: w3wp.exe 
  Account name: NT AUTHORITY\NETWORK SERVICE    Exception information: 
  Exception type: HttpException 
  Exception message: Server cannot set content type after HTTP headers have been sent.    Request information: 
  Request URL: http://foobar.acme.com/Project/Evaluate/ResultsXML.aspx?step=89&amp;uid=4397&amp;rnd=hhf8oe
  
  Request path: /Project/Evaluate/ResultsXML.aspx 
  User host address: 192.168.102.1 
  User:  
  Is authenticated: False 
  Authentication Type:  
  Thread account name: NT AUTHORITY\NETWORK SERVICE    Thread information: 
  Thread ID: 12 
  Thread account name: NT AUTHORITY\NETWORK SERVICE 
  Is impersonating: False 
  Stack trace:    at System.Web.HttpResponse.set_ContentType(String value)    at System.Web.UI.Page.SetIntrinsics(HttpContext context,
  Boolean allowAsync)    at
  System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)   
  at System.Web.UI.Page.ProcessRequest(HttpContext context)    at
  ASP.error_aspx.ProcessRequest(HttpContext context)    at
  System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler,
  TextWriter writer, Boolean preserveForm, Boolean setPreviousPage,
  VirtualPath path, VirtualPath filePath, String physPath, Exception
  error, String queryStringOverride)
  Custom event details:
  </code></pre>
  </blockquote>