title: How to use asp.net and phantomjs to take a screen shot of a page and return it to the client
body: <p>I want to be able to read a screen shot of a web site, and am attempting to use phantomjs and ASP.NET.</p>
  
  <p>I have tried using page.render which would save the screen shot to a file.  It works as a console application, but not when I call it from an asp.net handler.  It is probably due to file permissions, since simple applications (like hello.js) work fine.</p>
  
  <p>That is okay, my preference would be not to write to a file, but to deal with the bytes and return an image directly from the handler.</p>
  
  <p>I am a bit lost as to how to do that. I noticed a method called page.renderBase64, but do not know how to use it.</p>
  
  <p>Currently I am using an IHttpHandler.</p>
  
  <p>There is a similar question here, but that person eventualy dropped phantomjs.  I like the look of it and want to continue using it if possible.
  <a href="https://stackoverflow.com/questions/14048895/running-phantomjs-using-c-sharp-to-grab-snapshot-of-webpage">Running Phantomjs using C# to grab snapshot of webpage</a></p>