Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello

Do change the webconfig file frequent run-time, create a problem?

1-If the webconfig file with a large number of key / value be long,do put the key / value in two webconfig files is better or in a file?
2-do put the key is the short amount in webconfig file or in database.
I appreciate tips Here
Thank you in advance
Posted
Updated 11-Jul-15 7:24am
v2
Comments
Afzaal Ahmad Zeeshan 10-Jul-15 5:28am    
Why do you want to do this in the first place, I suggest that you don't do this!
Suvendu Shekhar Giri 10-Jul-15 8:33am    
Based on your application, you may keep key/values in a separate table with simple design or you can keep a separate config file for this. Don't update web.config frequently.
Dave Kreskowiak 11-Jul-15 14:42pm    

1 solution

Data that changes frequently should never be put in web.config.

By default, changing web.config causes IIS to restart your web application. Depending on what your app does and whatever libraries you're using, if any, this will cause the next request to be delayed, possibly taking for longer than a client is willing to wait.

If you've got a lot of key/value pairs in your web.config, you made a rather bone-headed move. That kind of data should have been put in some kind of separate database/datastore without even questioning it.
 
Share this answer
 
Comments
[no name] 11-Jul-15 14:30pm    
Countered
Dave Kreskowiak 11-Jul-15 14:43pm    
*sigh* - you can lead them to the fountain of knowledge but you cannot make them think.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900