Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
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 
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:
Added this:
<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
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 
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 
AnswerRe: MessageBox close button ? help please ... Pin
User 66581-Sep-06 1:40
User 66581-Sep-06 1:40 
QuestionButton look&feel Pin
JacquesDP31-Aug-06 23:08
JacquesDP31-Aug-06 23:08 
AnswerRe: Button look&feel Pin
Stefan Troschuetz31-Aug-06 23:20
Stefan Troschuetz31-Aug-06 23:20 
AnswerRe: Button look&feel Pin
Andrei Ungureanu1-Sep-06 1:53
Andrei Ungureanu1-Sep-06 1:53 
GeneralRe: Button look&feel Pin
JacquesDP1-Sep-06 2:11
JacquesDP1-Sep-06 2:11 
QuestionThe C5 Generic Collection Library Pin
Kevin McFarlane31-Aug-06 23:05
Kevin McFarlane31-Aug-06 23:05 
AnswerRe: The C5 Generic Collection Library Pin
leppie1-Sep-06 0:56
leppie1-Sep-06 0:56 
QuestionDeclaring control events in XML file Pin
mhadamji31-Aug-06 22:42
mhadamji31-Aug-06 22:42 
AnswerRe: Declaring control events in XML file Pin
WillemM31-Aug-06 23:11
WillemM31-Aug-06 23:11 
GeneralRe: Declaring control events in XML file Pin
mhadamji1-Sep-06 3:12
mhadamji1-Sep-06 3:12 
QuestionHow to capture the data entered by the user Pin
King Shez31-Aug-06 22:11
King Shez31-Aug-06 22:11 

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.