title: Using asp.net HTTPHandler to implement my own code and then calling its default implementation?
body: <p>I am running into some problem, I created a type that I am using as a HTTPHandler for aspx in my web.config file, the code..</p>
  
  <pre><code>&lt;add path="*.aspx" verb="*" type="myHandler"&gt;&lt;/add&gt;
  </code></pre>
  
  <p>The cs page is</p>
  
  <pre><code>public class myHandler :  IHttpHandler
  {
      public void ProcessRequest(System.Web.HttpContext context) 
      {
          // check if client browser can accept gzip encoding
          string AcceptEncoding = context.Request.Headers["Accept-Encoding"];
          if (!string.IsNullOrEmpty(AcceptEncoding) &amp;&amp; AcceptEncoding.Contains("gzip"))
          {
              // if yes, apply it
              context.Response.Filter = new GZipStream(context.Response.Filter, CompressionMode.Compress);
              context.Response.AddHeader("Content-Encoding", "gzip");
          }
          // don't do anything else, just let the default page handling work
      }
  
      public bool IsReusable
      {
          get { return false; }
      }
  
  }
  </code></pre>
  
  <p>As you can see, I am checking if the client accepts a gzip encoding, if yes, add it, and let the default process handle...
  <strong>BUT</strong> the response I am getting is..</p>
  
  <pre><code>XML Parsing Error: no element found
  Location: http://localhost:49903/Masters/Default.aspx
  Line Number 1, Column 1:
  ^
  </code></pre>
  
  <p>every single page is returning this error? I am guessing that after I handled the request in my handler, it is somehow clearing everything else or something related.</p>
  
  <p>Firebug shows the following..</p>
  
  <pre><code>Response Headers
  
  Cache-Control   private
  Connection  Close
  Content-Encoding    gzip
  Content-Length  0
  Date    Sat, 06 Oct 2012 13:14:50 GMT
  Server  ASP.NET Development Server/10.0.0.0
  X-AspNet-Version    4.0.30319
  
  
  Request Headers
  
  Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding gzip, deflate
  Accept-Language en-us,en;q=0.5
  Connection  keep-alive
  Cookie  ASP.NET_SessionId=1wfoaqta3mosntii1c3ual1i; .ASPXAUTH=D41BBDC2CCF15048BB5A345EBBFBC63EAE35FD37E2F1F170C1D68495477889A989353D4EB30F2B9A723F83C21293A47478B654A1BD2453BCF032DC539427EA0E519D2FEE70DB7660F00AA90E159633C4
  Host    localhost:49903
  Referer http://localhost:49903/Masters/Default.aspx
  User-Agent  Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1
  
  
  Request Headers From Upload Stream
  
  Content-Length  8241
  Content-Type    multipart/form-data; boundary=---------------------------2995119424827
  </code></pre>
  
  <p>So, from what I am guessing, I would like to know is there a way that after I have handled the page my way, I can do something like <code>base.ProcessRequest()</code>. I know its not possible, because I am implementing a interface and not deriving from a class, but I wanna know, how can I let the asp.net engine process the page after am I done with mine?</p>
  
  <p><strong>NB</strong> This question is not about implementing gzib encoding, I know I can set it in web config, at each page, in IIS, make a static function in a utility class and call it, and many other things. But again, please don't answer that I could use a different way to implement this gzip encoding, <em>I know I can</em>, what I am concerned is how can I let asp.net do its default handling (or whatever that may mean) after I am done with my custom handling?</p>