Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading the Correct Config File
Message
De
09/06/2003 17:45:32
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Reading the Correct Config File
Divers
Thread ID:
00798124
Message ID:
00798124
Vues:
41
My application is a Class Library. In my test scenario, I have created an ASP.NET application that calls my application's lone method.

The contents of my application's App.config appear below:
<xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="Rulebase" value="msq:IDS" />
  </appSettings>
</configuration>
In my code, I request my application setting's value thusly:
colAppSettings = System.Configuration.ConfigurationSettings.AppSettings
sName = colAppSettings("Rulebase")
However, it reads the Web.config of the ASP.NET application (so sName, of course, remains Nothing).

How can I ensure that my application examines its own App.config file rather than the Web.config (or the App.config) of the applications calling it?
M.K. Paquette
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform