Bernie Cook's Blog

Azure, C#, .NET, Architecture & Related Tech News


3 Comments

Dynamically Creating Zipped PDFs in .NET

This post illustrates how you can dynamically create a number of PDFs on the fly, zip them all up, and return the ZIP file via a HTTP response.

I’ve created a sample project which you can download that has a working example of the source code referenced in the post – ZippingPDFs.zip (1.5 MB). For simplicity I went for an ASP.NET web application. The only requirements are that you have Visual Studio 2010 installed. Continue reading


1 Comment

Azure & Chart Controls: Step-By-Step Integration Guide

I recently integrated the ASP.NET 4 Chart Controls into a Windows Azure Web role. Integrating the charts was easy but getting it up and running in Azure required a few extra steps.

If you know much about the chart controls you know they create the chart image on the fly, and you can very easily configure the control to store the chart image to the server’s disk or to memory temporarily. With Azure the image may be generated by a different Web role instance than the one that has to serve it up so what you end up with, if you use the default setup, is a broken image placeholder instead of your fancy looking chart image. To accommodate this you have to create a custom handler for your Web role which stores, retrieves and deletes the chart image as a blob to your Azure storage container.

Below is a step-by-step guide on what you need to do to get the charts up and running in Azure. Continue reading