Application configuration

  • Thread starter Thread starter Stefano Mostarda
  • Start date Start date
S

Stefano Mostarda

Hi there,

I have a question.

I've developed an application and now I'm facing with the problem of how
to make final user configure the parameters.

Now all parameters are stored in web.config file and I have developed a
simple program to edit them.

The problem is that each time the user change a parameter the
application restart. Now, it's acceptable for important params (db
settings for instance) but for others it's not. what should I do:

1. implement another configuration mode(file, registry, etc)
2. leave everything on web.config
3. ?????

Any suggestions?

Thanks in advance,
Stefano Mostarda MCP
Rome Italy
 
Stefano said:
Hi there,

I have a question.

I've developed an application and now I'm facing with the problem of how
to make final user configure the parameters.

Now all parameters are stored in web.config file and I have developed a
simple program to edit them.

The problem is that each time the user change a parameter the
application restart. Now, it's acceptable for important params (db
settings for instance) but for others it's not. what should I do:

1. implement another configuration mode(file, registry, etc)
2. leave everything on web.config
3. ?????

Any suggestions?


It should definitly be outside. Whatever happens, the application always
restart for any change in the .config file.
 
There are a couple ways you could go about this. Using Web.Config is
definitly not the best way though :o)

1.) Use an XML file to store your data. There are a ton of great
libraries in .NET to handle editing and reading XML, just check out
System.XML.

2.) Use a database. If you have a database available to you, use that
to store your information.

3.) Use the application object. .NET web applications have this
object to store user persistent information. What this means, is that
if one user sets Application("Time") = DateTime.Now, then the next
user to visit the page would read that time in the Application("Time")
object. It sounds like this is most similar to what you're doing
right now.
 
Back
Top