Re: Windows App .NET 2.0: Encryption of Connection Strings
From: Henrik Skak Pedersen (someone_at_news.com)
Date: 11/12/05
- Next message: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Previous message: Valery Pryamikov: "Re: Can I use DPAPI to update directory service account invformation"
- In reply to: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Next in thread: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Reply: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 12 Nov 2005 11:32:03 +0100
Hello Dominick,
Thank you very much for your reply, that was just what I needed. I have a
some extra questions.
1) Which rights should the user have on the machine to be able to encrypt?
2) I have tried to run the code for different users on the machine and they
all seems to be able to decrypt the connection string, no matter which user
that have encrypted it. Is the section encrypted on a machine level?
3) I guess that I protect all kinds of configuration sections?
4) Can I use it on configurations save in isolated storage?
5) I guess that I also can use the RSAProtectedConfigurationProvider
provider. Would I ever have to use this provider in a Windows application?
Thanks
Henrik
"Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
wrote in message news:4580be6313561a8c7b5059deae6bf@news.microsoft.com...
> Hello Henrik,
>
> something like this:
>
> static void Main(string[] args)
> {
> Configuration config =
> ConfigurationManager.OpenExeConfiguration(...);
>
> Console.WriteLine(config.FilePath);
> ConnectionStringsSection s = config.ConnectionStrings;
>
> s.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
> s.SectionInformation.ForceSave = true;
>
> config.Save();
> }
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> I have found a lot of articles explaining how to encrypt configuration
>> strings in ASP.NET 2.0, but none explaining how to do it in Windows
>> Applications.
>>
>> I would like to encrypt the connection strings in an application which
>> I am deploying to multiple customers. The customer enter db-connection
>> information themselves and I have to encrypt it afterwards. I have to
>> support both trusted connections and sql authentication.
>>
>> Any ideas?
>>
>> Thanks
>>
>> Henrik Skak Pedersen
>>
>
>
- Next message: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Previous message: Valery Pryamikov: "Re: Can I use DPAPI to update directory service account invformation"
- In reply to: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Next in thread: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Reply: Dominick Baier [DevelopMentor]: "Re: Windows App .NET 2.0: Encryption of Connection Strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|