Ashx force download image
<p>I have an ashx file that display an image.
I would like not to display the image but force the download.</p>

<p>This is my code :</p>

<pre><code>context.Response.AppendHeader("content-disposition", "attachment; filename=" + userId + ".jpg");
context.Response.ContentType = "image/jpeg";
context.Response.OutputStream.Write(msMasterFinal.ToArray(), 0, msMasterFinal.ToArray().Length); 
</code></pre>

<p>When I open my browser with this ashx, the image is
automatically displayed. How to force download please ?</p>

<p>Many thanks</p>
