encyption/decryption of connection string..

S

sacgar

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?
 
G

Gregory A. Beamer

sacgar said:
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! |
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top