473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cannot get Application Setting

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.O penWebConfiguration(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
Oct 10 '06 #1
1 1111
What am I doing wrong?

The code Microsoft provides doesn't work. I had the exact same problem
you did.

You can use AppSettings.Item("YourKeyHere") to get the value.

Oct 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Al | last post by:
Hi, We have pretty simple ASP (not ASP.Net) application, which has been running fine on IIS4 and IIS5. It has now been moved to a sever running in the DMZ and managed by a 3rd party. The server...
0
by: bb | last post by:
Hello In my Session_OnStart in Global.asa, I am setting some cookies. One of them, I set as follows: dim UserID UserID = Request.ServerVariables("LOGON_USER") Response.Cookies("User")("ID")...
0
by: Daryl Zavier | last post by:
Hi Gurus, Please forgive me if my question is dumb cause this is my first web application I've done. Currently in my web application there is a button to click which will fire off a DTS event...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: Roberto Rocco | last post by:
Whenever I try to create a new ASP Web Page I get this message : "Visual Studio cannot create or open the application because the Web server on this computer is not running. Start the Web server...
4
by: Siang Hwee | last post by:
Hi. I am facing some problem in Asp.net. I am developing a payroll application currently. This is a web-based application. User need to click on "Process" button in order to process the payroll...
7
by: Adrian Parker | last post by:
When I try to profile a website in VS2005, I get the following error. Launch Error: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting...
5
by: Masso | last post by:
Hallo to the group, my question is this: where i have to set timeout in a web application? If i set into sessionState with property Timeout="60", after 20 minutes the session is over. Always...
0
by: Tifer | last post by:
Hello, I am building my first .Net Application. The first couple of Publish and Installs I did went fine. But after a couple of builds, I get a modal dialogue box error every time upon trying...
2
by: wesve | last post by:
Hello - I have an Access 2003 application which I emailed to our customer overseas. When she tries to open the database, she receives the following error: "Microsoft Office Access cannot change the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.