I need to render an HTML page server-side and \"extract\" the raw bytes of a canvas element so I can save it to a PNG. Problem is, the canvas element is created from javascr
Basically you are trying to do things, which are not intended to be done in that way.
You generate HTML + Javascript to enable the browser to draw it. You write C# to enable any kind of server side things.
Generating HTML + Javascript on server to load it into a browser on server to be able to save PNG sounds bad.
Did you think about other approaches like generating the image using server side C# component? Basically, why do you really need to save it on server? Maybe somebody can provide better solution?