title: Cannot redirect after HTTP headers have been sent MVC3
body: <p>I am getting this error in an MVC3 application when using the RedirectPermanent(url) method on a base controller. Buffering the output, suggested by other StackOverflow answers, has had no effect.</p>
  
  <pre><code>protected void Application_BeginRequest(object sender, EventArgs e)
  {
     Context.Response.BufferOutput = true;
  }
  </code></pre>
  
  <p>The redirect is triggered as the first action result on the default controller on this web site:
  <a href="http://www.autoquoter.com" rel="nofollow">http://www.autoquoter.com</a></p>
  
  <p>I don't have any code that directly adds a header. That being the case, is there any way to determine what is adding a response header?</p>
  
  <p>Here is the network log from webkit's debugger for the first page of the web site.</p>
  
  <pre><code>Request URL:http://www.autoquoter.com/
  Request Method:GET
  Status Code:301 Moved Permanently
  
  Request Headers
  Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
  
  Response Headers
  Cache-Control:no-cache, no-store, must-revalidate
  Content-Length:128
  Content-Type:text/html; charset=utf-8
  Date:Thu, 21 Mar 2013 17:10:38 GMT
  Expires:-1
  Location:/aq/en/Home
  Pragma:no-cache
  Server:Microsoft-IIS/6.0
  X-AspNet-Version:4.0.30319
  X-AspNetMvc-Version:3.0
  X-Powered-By:ASP.NET
  </code></pre>