Encrypting and Decrypting Config Files
Thursday, November 19, 2009, 12:38 PM - Programming, .NET, C#, VB.NET, ASPXI'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");
section.SectionInformation.ForceSave = true;
To decrypt just do the oposite:
| [ 0 trackbacks ] | permalink | ( 3 / 1574 )
Outlook blocked access to the following potentially unsave attachments:
Tuesday, November 17, 2009, 04:39 PM - WindowsIf you're like me, you've likely received an attachment from someone after spending half an hour talking them through attaching it, only to find that Outlook as blocked access to it. Here's all you need to do to make the ugly warning go away:
1. In the registry, under HKCUSoftwareMicrosoftOffice(VERSION)OutlookSecurity, add a string value "Level1Remove" and set the data to the extension of the file you need access to, like "tmp" or "exe;ini".
2. Restart Outlook and you now have access to these files.
Don't forget to remove this key when you are done!
| [ 0 trackbacks ] | permalink | ( 3 / 1298 )
DVD Flick is the BOMB!!
Friday, August 28, 2009, 01:52 PM - WindowsDoes anyone say that anymore? I guess now it rips, shreds, something? Anyway. I just downloaded DVD Flick, an open source dvd rendering and burning program. Take any video you have, and I mean ANYTHING and this app seems to rip them and spit them out in a nice, standard DVD format. I took a bunch of DIVX standard stuff I found somewhere and threw them into the app, said "make me a basic menu and burn the dvd" and it worked. First time. No fuss, no muss. It just works.
| [ 0 trackbacks ] | permalink | ( 3 / 1451 )
log4net comes to Twitter
Tuesday, August 4, 2009, 05:34 PM - .NETSomeone turned me on last week to this cool log4net appender for Twitter. Basically, you configure your app to "log" to twitter for certain events, and it acts just like a normal appender. Very cool.
| [ 0 trackbacks ] | permalink | ( 2.9 / 1381 )
Saturday, August 1, 2009, 12:10 AM - LinuxI ran into an issue where clamd (the clam anti-virus daemon) was using 100% of my CPU time, forcing other programs (like auth!) to fail. After playing with several settings, I finally figured out how to disable clamd:
1. touch /var/qmail/supervise/clamd/down
2. vi /var/qmail/control/simcontrol
3. change :clam=yes to :clam=no
4. save the file and run /var/qmail/bin/simscanmk
5. qmailctl restart
6. qmailctl stat
You should get a message that clamd is down (since we added a file named "down" in the clamd folder for supervise) and it should stay down when we restart qmail.
| [ 0 trackbacks ] | permalink | ( 3 / 166 )