Click here to Skip to main content
15,917,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've got an ASP.NET application, and I'm wondering what the best practice is for sitting some data. I've got 3 scenarios, described below along with what I'm currently doing:

-Application settings Currently being stored as an Xml-serialized object that's being read from a file and deserialized on session_start

-User level settings Stored and accessed the same way as the admin settings, except this is modifiable via a form

-The user's username Currently being retrieved via active directory on an authentication page

Each piece of data is being accessed from different sections of the web app issuing in-proc session storage. I'll shortly be making the settings variables serializable to allow out-of-proc storage site scalability.

If anyone could recommend any extra reading on the subject, I'd appreciate that, too. Thanks!
Sergey Alexandrovich Kryukov 31-Aug-14 20:09pm    
I think this is hard or impossible to give a Quick Answer; it all highly depends specifics of your application and requirements.

1 solution


This depends on the amount of information you're going to save, caching requirements, backup requirements and so on. But few considerations you already may have thought:
- In my opinion, the fact that you're using AD for users is good so I wouldn't change that even if you consolidate other storage.
- If you plan to start saving more information at some point in the future, I'd suggest using a database, either SQL or NO-SQL.
- If you think you could need to use several web servers on different servers, in my opinion by using a database it would be easier to handle different kinds of concurrency related issues.
- Regardless of the storage mechanism, remember to include it in your backup strategy in a proper manor.
Share this answer

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