My goal is to read a screenshot of a website using phantomjs and ASP.NET.
Initially, I attempted to save the screenshot to a file using page.render. This method worked smoothly in a console application but faced issues when called from an ASP.NET handler, most likely due to file permissions. Simpler applications like hello.js work without any trouble.
Instead of writing to a file, I'd prefer to manipulate the bytes and return an image directly from the handler.
I'm unsure about how to achieve this. I came across a method called page.renderBase64, but I'm not familiar with its usage.
Currently, my approach involves using an IHttpHandler.
Although there are similar questions on this topic, others seemed to abandon phantomjs eventually. Despite that, I find it appealing and would like to continue using it if possible. Running Phantomjs using C# to grab snapshot of webpage