NHibernate 2.x Beginner's Guide
Monday, May 24, 2010, 12:47 PM - Programming, C#, VB.NET, ASPX, CodeSmith, NHibernate
My book is finally out! After over a year of more work than I ever thought it would take, I was finally able to hold a copy in my hand on Friday!

You can pick up the book at the publisher's website, and for $5 more you can have the PDF version also: https://www.packtpub.com/nhibernate-2-x-beginners-guide/book

If you prefer, you can also pick it up at Amazon or Barnes and Noble

If you're interested, you can take a look at a sample chapter here, just click on the "Sample Chapter" button.
  |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 58 )
NHibernate 2.x Beginner's Guide
Monday, May 24, 2010, 12:46 PM - Programming, C#, VB.NET, ASPX, CodeSmith, NHibernate
My book is finally out! After over a year of more work than I ever thought it would take, I was finally able to hold a copy in my hand on Friday!

You can pick up the book at the publisher's website, and for $5 more you can have the PDF version also: https://www.packtpub.com/nhibernate-2-x-beginners-guide/book

If you prefer, you can also pick it up at Amazon or Barnes and Noble

If you're interested, you can take a look at a sample chapter here, just click on the "Sample Chapter" button.
  |  [ 0 trackbacks ]   |  permalink  |   ( 2.9 / 1298 )
SSL Certs and Mono
Wednesday, February 10, 2010, 09:53 PM
I was recently plagued with an error while trying to make a connection to a secure website using Mono. After several hours of searching I came across this site talking about importing trusted roots. Having seen this same issue on windows servers, I knew I was in the right area.

What I ended up doing was running mozroots --import --machine to import all of the mozilla (aka firefox) browser trusted roots, and then certmgr -ssl -m URL to get the actual cert and add it.
  |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 1217 )
Selecting the correct language in Word 2007
Monday, January 25, 2010, 06:09 PM
I know everyone has a favourite language, and so do I. Unfortunately, I don't like to spell it favourite, because in the US we spell it favorite! Word 2007 refused to do this for me on a couple of documents I had, until I found this little trick.

1. Ctrl + a to select all
2. On the ribbon, click on Review then click Set Language
3. Select the language you need

done and done.
  |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 1244 )
Encrypting and Decrypting Config Files
Thursday, November 19, 2009, 12:38 PM - Programming, .NET, C#, VB.NET, ASPX
I've talked for years about how you need to encrypt and decrypt Web.config and App.config files, but it took a spur for me to actually look it up. Here is the command for those of you as lazy as me:

c:windowsMicrosoft.NETFrameworkv2.0.50727aspnet_regiis -pef connectionStrings . -prov DataProtectionConfigurationProvider


Decrypting is just as easy:

c:windowsMicrosoft.NETFrameworkv2.0.50727aspnet_regiis -pdf connectionStrings .

Just a note, this only works on Web.config files. If you want to encrypt an App.config, just rename it Web.config, run the tool, then change the name back.

If you want to get hardcore and write your own tool, it's all available in the API:

Aaron Feng's Blog


Configuration configuration = ConfigurationManager.OpenExeConfiguration(appConfig);
ConfigurationSection section = this.configuration.GetSection("connectionStrings");
if (!section.SectionInformation.IsProtected)
{
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
section.SectionInformation.ForceSave = true;
configuration.Save(ConfigurationSaveMode.Modified);
}


To decrypt just do the oposite:

if (section.SectionInformation.IsProtected)
{
// …
section.SectionInformation.UnprotectSection();
// …
}

  |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 1574 )

Back Next