Wednesday 28 January 2009

Asp.Net to PDF export

Interesting article on exporting a GridView to PDF:

 

http://csharpdotnetfreak.blogspot.com/2008/12/export-gridview-to-pdf-using-itextsharp.html

 

Uses open-source project iTextSharp

Friday 16 January 2009

Asp.Net encrypt connection string in web config

Quick note on how to encrypt the Connection string in the web.config for future reference
Encrypt the Connection string :
aspnet_regiis -pef "ConnectionString" "c:\path\to\website"

Grant Access to IIS to the key
aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT Authority\Network Service"

note aspnet_regiis is in the .net framework directory for the version of .net that you are using