Prev: Calling Javascript from Server Side - Error When Passing Data Contains Single Quote
Next: Listing the contents of a network directory - user permissions
From: sacgar on 10 Mar 2010 17:39 I have requirement to encrypt the windows service config file and web.config connection strings, I could able to do that for web.config with aspnet_regiis (C:\Windows\Microsoft.NET\Framework64\v2.0.50727>aspnet_regiis -pe "connectionStrings" -app "/application.ui") But I am still looking similar kind of way for windows service config file to encrypt and decrypt. ..exe.config file snippet as below <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="WorkflowTester.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </sectionGroup> </configSections> <connectionStrings> </connectionStrings> <appSettings> Is there any utility which allows me to achieve that?
From: Gregory A. Beamer on 11 Mar 2010 09:00
"sacgar" <sacgar(a)discussions.microsoft.com> wrote in message news:987AE2CA-ABC1-42DF-97BB-4E7958BA7E1E(a)microsoft.com... > I have requirement to encrypt the windows service config file and > web.config > connection strings, I could able to do that for web.config with > aspnet_regiis > (C:\Windows\Microsoft.NET\Framework64\v2.0.50727>aspnet_regiis -pe > "connectionStrings" -app "/application.ui") > But I am still looking similar kind of way for windows service config file > to encrypt and decrypt. > > .exe.config file snippet as below I don't know of a tool, as I don't spend enough time in Windows UIs, but you can encrypt the connection string, as long as you are the one retrieving it and supplying it to your data layer. If you use the automagic FUD in .NET, you will have to slightly alter things. TableAdapters are the biggest pain, as the connection string property is internal, so you have to expose it in the project with models, not the data access project, but this is minor. After that, you can set the connection string to an unencrypted version (Repository pattern works nicely, with the one caveat). -- Peace and Grace, Greg Twitter: @gbworld Blog: http://gregorybeamer.spaces.live.com ************************************************ | Think outside the box! | ************************************************ |