Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
Questionquestion about unaccessable classes Pin
Green Fuze1-Sep-06 2:28
Green Fuze1-Sep-06 2:28 
AnswerRe: question about unaccessable classes Pin
User 66581-Sep-06 2:45
User 66581-Sep-06 2:45 
GeneralRe: question about unaccessable classes Pin
Green Fuze1-Sep-06 3:07
Green Fuze1-Sep-06 3:07 
QuestionHow to capture the data entered by the user from key board in windows service Pin
King Shez1-Sep-06 2:25
King Shez1-Sep-06 2:25 
AnswerRe: How to capture the data entered by the user from key board in windows service Pin
gus_br1-Sep-06 3:00
gus_br1-Sep-06 3:00 
GeneralRe: How to capture the data entered by the user from key board in windows service Pin
King Shez4-Sep-06 2:00
King Shez4-Sep-06 2:00 
AnswerRe: How to capture the data entered by the user from key board in windows service Pin
Jun Du1-Sep-06 3:40
Jun Du1-Sep-06 3:40 
GeneralRe: How to capture the data entered by the user from key board in windows service Pin
King Shez4-Sep-06 1:27
King Shez4-Sep-06 1:27 
GeneralRe: How to capture the data entered by the user from key board in windows service Pin
Colin Angus Mackay4-Sep-06 9:16
Colin Angus Mackay4-Sep-06 9:16 
QuestionDLL Compilation Pin
Brendan Vogt1-Sep-06 1:04
Brendan Vogt1-Sep-06 1:04 
AnswerRe: DLL Compilation Pin
User 66581-Sep-06 1:36
User 66581-Sep-06 1:36 
GeneralRe: DLL Compilation Pin
Brendan Vogt1-Sep-06 1:48
Brendan Vogt1-Sep-06 1:48 
GeneralRe: DLL Compilation Pin
User 66581-Sep-06 2:03
User 66581-Sep-06 2:03 
QuestionDownload From Desktop Application Pin
charbelasmar1-Sep-06 0:57
charbelasmar1-Sep-06 0:57 
AnswerRe: Download From Desktop Application Pin
User 66581-Sep-06 1:31
User 66581-Sep-06 1:31 
AnswerRe: Download From Desktop Application Pin
Green Fuze1-Sep-06 2:17
Green Fuze1-Sep-06 2:17 
JokeRe: Download From Desktop Application Pin
Nader Elshehabi1-Sep-06 4:47
Nader Elshehabi1-Sep-06 4:47 
AnswerRe: Download From Desktop Application Pin
Nader Elshehabi1-Sep-06 5:27
Nader Elshehabi1-Sep-06 5:27 
QuestionNot able to read the value from App.config file Pin
kumar sudhir11-Sep-06 0:53
kumar sudhir11-Sep-06 0:53 
AnswerRe: Not able to read the value from App.config file Pin
Bhupi Bhai1-Sep-06 1:57
Bhupi Bhai1-Sep-06 1:57 
AnswerRe: Not able to read the value from App.config file Pin
Not Active1-Sep-06 2:23
mentorNot Active1-Sep-06 2:23 
QuestionSort DataGridView Column in Numeric Format Pin
Andy Rama1-Sep-06 0:49
Andy Rama1-Sep-06 0:49 
QuestionNot able to read the value from App.config file Pin
kumar sudhir11-Sep-06 0:49
kumar sudhir11-Sep-06 0:49 
I want to read the security key value from App.config file. Below is the procedure which I did :

Create a new config file name as App.config

In the App.config file:



<configuration>

<appsettings>

<add key="SecurityKey" value="MyNewKey">






After that I did the following:

System.Configuration.AppSettingsReader settingsReader
= new AppSettingsReader();

when i am debugging these, i find that the value of dimension is 0 which supposed to 1. since there is one key-value present in the App.config

string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));

Also it's throwing an exception stating

“The key "SecurityKey" does not exist in the appSettings configuration section”.--which already present in the App.config.

Also i tried with the second scenario:

string key =
System.Configuration.ConfigurationManager.AppSettings["SecurityKey"];

which giving me the key value null.

Do i required to do some setting for reading the "SecurityKey" Value?

Needs help!

Thanks

Sudhir Kumar


Sudhir Kumar
QuestionWin32 GetFocus() Alternative? Pin
wbjohnson31-Aug-06 23:50
wbjohnson31-Aug-06 23:50 
QuestionMessageBox close button ? help please ... Pin
cmpeng3431-Aug-06 23:38
cmpeng3431-Aug-06 23:38 

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.