Click here to Skip to main content
15,887,485 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: TreeView Data binding Pin
Pete O'Hanlon16-Apr-10 2:46
mvePete O'Hanlon16-Apr-10 2:46 
GeneralRe: TreeView Data binding Pin
silverlightnewbee4-Jan-11 18:34
silverlightnewbee4-Jan-11 18:34 
AnswerRe: TreeView Data binding Pin
Leung Yat Chun26-Apr-10 10:19
Leung Yat Chun26-Apr-10 10:19 
QuestionUriMapper (and stuff) [SOLVED (sorta)] Pin
#realJSOP15-Apr-10 6:23
mve#realJSOP15-Apr-10 6:23 
AnswerRe: UriMapper (and stuff) Pin
Abhinav S16-Apr-10 1:50
Abhinav S16-Apr-10 1:50 
GeneralRe: UriMapper (and stuff) Pin
#realJSOP16-Apr-10 6:10
mve#realJSOP16-Apr-10 6:10 
GeneralRe: UriMapper (and stuff) [SOLVED (sorta)] Pin
Abhinav S16-Apr-10 20:19
Abhinav S16-Apr-10 20:19 
QuestionEncrypting app.config through code [modified] Pin
dashingsidds15-Apr-10 0:21
dashingsidds15-Apr-10 0:21 
Hi,

I am trying to encrypt my appSettings section through code but i am facing some problem.

This is what is am doing
-- app.config
<? xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="Encrypt" value="Encrpyted"/>
  </appSettings>
</configuration>

--Code
string s = System.IO.Directory.GetCurrentDirectory();

s = s + "\\Test_Encrypt_1_WPF.exe.config"; // "Test_Encrypt_1_WPF" is my exe name

Configuration config = ConfigurationManager.OpenExeConfiguration(s);

AppSettingsSection section = (AppSettingsSection)config.GetSection("AppSettings");

if (!section.SectionInformation.IsProtected)
{
     section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
}
config.Save(ConfigurationSaveMode.Modified);


In the above code the "section" object is showing null i.e. i am not able to find the "AppSettings" section.
I even tried configuration/appSettings but the same result.
Can anyone please help!

Thanks in advance,

Samar
modified on Thursday, April 15, 2010 6:57 AM

AnswerRe: Encrypting app.config through code Pin
dashingsidds15-Apr-10 0:57
dashingsidds15-Apr-10 0:57 
AnswerRe: Encrypting app.config through code Pin
Not Active15-Apr-10 2:08
mentorNot Active15-Apr-10 2:08 
GeneralRe: Encrypting app.config through code Pin
dashingsidds15-Apr-10 2:59
dashingsidds15-Apr-10 2:59 
GeneralRe: Encrypting app.config through code Pin
Not Active15-Apr-10 3:31
mentorNot Active15-Apr-10 3:31 
GeneralRe: Encrypting app.config through code Pin
dashingsidds15-Apr-10 18:40
dashingsidds15-Apr-10 18:40 
QuestionWPF Toolkit Datagrid Performance issue in rendering Pin
Ankush12314-Apr-10 20:47
Ankush12314-Apr-10 20:47 
AnswerRe: WPF Toolkit Datagrid Performance issue in rendering Pin
Leung Yat Chun26-Apr-10 10:27
Leung Yat Chun26-Apr-10 10:27 
QuestionHow to create a random button appear in parent button Pin
yuripon14-Apr-10 18:52
yuripon14-Apr-10 18:52 
AnswerRe: How to create a random button appear in parent button Pin
Abhinav S14-Apr-10 19:02
Abhinav S14-Apr-10 19:02 
GeneralRe: How to create a random button appear in parent button Pin
yuripon14-Apr-10 19:12
yuripon14-Apr-10 19:12 
GeneralRe: How to create a random button appear in parent button Pin
Abhinav S14-Apr-10 19:22
Abhinav S14-Apr-10 19:22 
GeneralRe: How to create a random button appear in parent button Pin
yuripon15-Apr-10 17:23
yuripon15-Apr-10 17:23 
AnswerRe: How to create a random button appear in parent button Pin
Kunal Chowdhury «IN»27-Apr-10 8:58
professionalKunal Chowdhury «IN»27-Apr-10 8:58 
GeneralRe: How to create a random button appear in parent button Pin
yuripon28-Apr-10 1:53
yuripon28-Apr-10 1:53 
QuestionMake game Missionaries and Cannibals by WPF Pin
aknguyen1190614-Apr-10 6:55
aknguyen1190614-Apr-10 6:55 
AnswerRe: Make game Missionaries and Cannibals by WPF Pin
Keith Barrow15-Apr-10 0:39
professionalKeith Barrow15-Apr-10 0:39 
AnswerRe: Make game Missionaries and Cannibals by WPF Pin
Shane555516-Apr-10 2:39
Shane555516-Apr-10 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.