Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading values from app.config
Message
De
01/04/2013 12:26:11
 
 
À
01/04/2013 10:51:19
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
Divers
Thread ID:
01569562
Message ID:
01569666
Vues:
39
>>:-}
>>But since that looks like connection string info I was wondering why you were not using the connectionString section ?
>
>I just used the example I found on-line. Does the app.config have pre-set sections? I didn't know that, I thought I could use anything I wanted.

Usually better to put connection settings in the connectionStrings section - makes it easier to encrypt them (which is usually a good idea :-}). You can also put them in a separate file. This shows examples : http://peterkellner.net/2008/02/23/webconfigbestpractice/

While you are at it it might be worth looking at web.config transformations - useful if you have different settings for development and production servers : http://msdn.microsoft.com/en-gb/library/dd465318(v=vs.100).aspx
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform