Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading values from app.config
Message
From
01/04/2013 12:26:11
 
 
To
01/04/2013 10:51:19
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01569562
Message ID:
01569666
Views:
40
>>:-}
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform