title: How to set Content-Length when object is passed as response
body: <p>I have JSON object in my ASP.Net app which I pass to response using code </p>
  
  <pre><code>context.Response.Write(jsonObject) 
  </code></pre>
  
  <p>The problem is that I need to set the Content-Length header to indicate response size and I do not know how to count it. How do I get filesize of Object?</p>