|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cannot read application settingsI've defined two application settings in my web.config file. But in the following code : Dim rootWebConfig1 As System.Configuration.Configuration rootWebConfig1 = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Nothing) If (rootWebConfig1.AppSettings.Settings.Count > 0) Then sField1 = rootWebConfig1.AppSettings.Settings("field1") sField2 = rootWebConfig1.AppSettings.Settings("field2") End If rootWebConfig1.AppSettings.Settings.Count always returns 0. What am I doing wrong? Venki
Show quote
Hide quote
"vvenk" <vv***@discussions.microsoft.com> wrote in message posting to a asp group with a asp.net problemnews:5BEE13DE-9821-4AD2-9B20-7CE1A15E796C@microsoft.com... > Hello: > > I've defined two application settings in my web.config file. But in the > following code : > > Dim rootWebConfig1 As System.Configuration.Configuration > rootWebConfig1 = > System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Nothing) > If (rootWebConfig1.AppSettings.Settings.Count > 0) Then > > sField1 = rootWebConfig1.AppSettings.Settings("field1") > sField2 = rootWebConfig1.AppSettings.Settings("field2") > > End If > > rootWebConfig1.AppSettings.Settings.Count always returns 0. > > What am I doing wrong? Show quoteHide quote > > Venki > vvenk wrote:
> For one, you are asking in a classic ASP forum. You might have better luck > rootWebConfig1.AppSettings.Settings.Count always returns 0. > > What am I doing wrong? in [microsoft.public.dotnet.framework.aspnet]. -- Dave Anderson Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms.
retreiving data from html page
Quizz script performance bug -- too many questions? interesting problem... call store procedure for inserting data in asp SMTP how can i detect multiplt VBNewLine's in a row Assign Javascript value to asp session variable XML - load contents onto page. how to run a bat file in remote PC through ASP Running Bat file from ASP on Windows Server x64 problem. |
|||||||||||||||||||||||