Click here to Skip to main content
15,908,444 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Question about deleting multiple items at once ... Pin
_AK_1-Sep-06 2:02
_AK_1-Sep-06 2:02 
GeneralRe: Question about deleting multiple items at once ... Pin
devboycpp1-Sep-06 2:43
devboycpp1-Sep-06 2:43 
GeneralRe: Question about deleting multiple items at once ... Pin
_AK_1-Sep-06 2:47
_AK_1-Sep-06 2:47 
Questionhow to add .DWT template file in asp.net 1.0 Pin
nabeelkhan1-Sep-06 1:14
nabeelkhan1-Sep-06 1:14 
QuestionNot able to read the value from App.config file Pin
kumar sudhir11-Sep-06 0:54
kumar sudhir11-Sep-06 0:54 
AnswerRe: Not able to read the value from App.config file Pin
_AK_1-Sep-06 0:57
_AK_1-Sep-06 0:57 
AnswerRe: Not able to read the value from App.config file Pin
Not Active1-Sep-06 2:21
mentorNot Active1-Sep-06 2:21 
QuestionNot able to read the value from App.config file Pin
kumar sudhir11-Sep-06 0:51
kumar sudhir11-Sep-06 0:51 
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
AnswerRe: Not able to read the value from App.config file Pin
Leon Segal3-Sep-06 15:51
Leon Segal3-Sep-06 15:51 
QuestionHide Datagrid row.............. Pin
Nagraj Naik1-Sep-06 0:46
Nagraj Naik1-Sep-06 0:46 
AnswerRe: Hide Datagrid row.............. Pin
_AK_1-Sep-06 1:33
_AK_1-Sep-06 1:33 
GeneralRe: Hide Datagrid row.............. Pin
Nagraj Naik1-Sep-06 21:01
Nagraj Naik1-Sep-06 21:01 
GeneralRe: Hide Datagrid row.............. Pin
_AK_3-Sep-06 17:54
_AK_3-Sep-06 17:54 
AnswerRe: Hide Datagrid row.............. Pin
postmaster@programmingknowledge.com1-Sep-06 4:39
postmaster@programmingknowledge.com1-Sep-06 4:39 
GeneralRe: Hide Datagrid row.............. Pin
Nagraj Naik1-Sep-06 21:00
Nagraj Naik1-Sep-06 21:00 
Questionerror: Automation server can't create object Pin
24891281-Sep-06 0:40
24891281-Sep-06 0:40 
QuestionHow to navigate records from database Pin
Kissy161-Sep-06 0:36
Kissy161-Sep-06 0:36 
AnswerRe: How to navigate records from database Pin
_AK_1-Sep-06 0:59
_AK_1-Sep-06 0:59 
QuestionListing the file names of an ftp server using asp.net c# Pin
Malayil alex1-Sep-06 0:03
Malayil alex1-Sep-06 0:03 
Questionusing javascript in asp.net Pin
anujose31-Aug-06 23:47
anujose31-Aug-06 23:47 
AnswerRe: using javascript in asp.net Pin
_AK_1-Sep-06 0:33
_AK_1-Sep-06 0:33 
QuestionHI all Pin
Arun Kumar Babu31-Aug-06 23:20
Arun Kumar Babu31-Aug-06 23:20 
QuestionHI all Pin
Arun Kumar Babu31-Aug-06 23:17
Arun Kumar Babu31-Aug-06 23:17 
AnswerRe: HI all Pin
_AK_1-Sep-06 1:54
_AK_1-Sep-06 1:54 
QuestionError :- Exception Details: System.Runtime.InteropServices.COMException: Server execution failed Pin
Avanika Gupta31-Aug-06 23:11
Avanika Gupta31-Aug-06 23: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.