I am trying to access the various sections of the web.config file. I can
access the appSettings section using

String dsn = ConfigurationSettings.AppSettings["dsn"];

The MSDN Library states that

  bool nocookies = Session.Cookieless;

would allow me to read the cookieless attribute of the sessionState and I
understand that in the same way

  compilation.defaultLanguage;

should return "c#".
I understand from the "Accessing ASP.NET Configuration Settings" article in
the MSDN Library that by entering the section name and the attribute I
should be able to retrieve data from the web.config file. However entering
such code returns the error:

  does not contain a definition for "attribute name"

Does anyone have advice on how to access configuration data in the
web.config file that is not in the AppSettings section.

Thankyou in advance,

Kerry

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to