Encrypted Connection String Objects – New GDN User Sample

It took a while, but I finally finished a version of my Encrypted Connection String Objects that I could release to the public, and also handles SQL Server Connection Strings.  You can get download it over at GDN.

It is written in C# (sorry no VB.Net yet), and the downloaded version uses VS.Net2K3, but there is nothing in the code that requires .Net 1.1.  The basic premise behind the code was:

  1. Create a generic ConnectionString class that handled encapsulation of the form and format of connection strings.  I stuffed them in config files, so I can use the same ConnectionString class in both Win apps and Web apps.  I then updated the class to handle encryption and decryption of the connection string.
  2. Create specific implementations connection string classes for the different types of connection strings, and expose the different sections as properties.  I also add code to set default values to the ones in the documentation, and added edit checking of the different sections.
  3. Create a WinForm app that would build and edit the connection string sections in config files.

All three parts are included in the downloaded code example.  And to use this code in your data access code, you only need to add one line of code.

The code is all from my forthcoming eXenstible Data Objects (XDO) data access layer, that will get released via GDN as soon as I finish adding SQLServer support to the already existing Oracle support.  XDO is nothing like the other Data Access Application Blocks I’ve seen.

DonXML

2 Comments

  • Isn't decrypting rather slow? Or are you caching it in f.e. the application object in a webapplication? (which requires you to pass it on to your DAL with every action OR you have to make your DAL aware of the application object).

  • Could you possibly update the sample to include a VS.Net2K3 version of the Visio drawing ? I assume you've created it in a beta version ?

Comments have been disabled for this content.