PDA

Click to See Complete Forum and Search --> : Storing server settings


MagellanTX
Jan 16th, 2003, 10:36 AM
Very new to asp.net so please excuse the newbie question.

How do I store settings for an ASP.NET page? For instance, I want to store configuration information such as SQL server, username, password…things like that. The ASP.NET page will use those settings to login into a local SQL server.

I don’t want to hardcode those settings in the application so I am looking for a way to store those in a file, but I want to make sure I do it right and the file is relatively secure.

Thanks!!

bontyboy
Jan 16th, 2003, 01:17 PM
When you created the ASP.NET project did it include a file in your project called web.config?

Thats where you can put all your settings under the configuration tag.

you can create your own tags and put them there.


Then you can call them anywhere in your project by referencing the Configuration class

Imports System.Configuration


I hope this helps...

MagellanTX
Jan 16th, 2003, 04:07 PM
That worked. Thanks!