473,498 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to best manage/store constants in asp.net 2.0 with sql?

I am developing an asp.net 2.0 application and have come across the
dilemma of how to store constant values, which change infrequently. The
website will have tens of thousands of visitors every day.

Obviously there is the application object route.

However, because of the new feature of sql server cache invalidation,
would it not be best just to create a normal data access layer which
can retrieve a datatable containing the constants from a sql table, and
then create a class and associated method for retrieving the data in a
business logic layer.

I would then simply retrieve the contsnt I am after using this object
throughout the pages. If sql invalidation works, the retrieval of data
would only take place if the table has changed.

Does anyone see any inefficiencies or problems with this? Basically I
am suggesting that I don't use the global.asax file at all for storage
of constants throughout an application.

Nov 19 '05 #1
2 1577
You could strore the values as an datatable in the cache object, its
application available can be invalidated using sql server cache
invalidation.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Steve" <ba****@iranmania.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am developing an asp.net 2.0 application and have come across the
dilemma of how to store constant values, which change infrequently. The
website will have tens of thousands of visitors every day.

Obviously there is the application object route.

However, because of the new feature of sql server cache invalidation,
would it not be best just to create a normal data access layer which
can retrieve a datatable containing the constants from a sql table, and
then create a class and associated method for retrieving the data in a
business logic layer.

I would then simply retrieve the contsnt I am after using this object
throughout the pages. If sql invalidation works, the retrieval of data
would only take place if the table has changed.

Does anyone see any inefficiencies or problems with this? Basically I
am suggesting that I don't use the global.asax file at all for storage
of constants throughout an application.

Nov 19 '05 #2
Thank you for this John. I'll look into trying to achieve this.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2500
by: brianobush | last post by:
# # My problem is that I want to create a # class, but the variables aren't known # all at once. So, I use a dictionary to # store the values in temporarily. # Then when I have a complete set, I...
14
2707
by: Howard | last post by:
Hi, I recently had a problem where I decided to store objects in a vector. (Previously, I had always stored pointers in vectors). Well, naturally, when storing an object in a vector, using...
4
51142
by: Amadelle | last post by:
Hi all and thanks again in advance, What is the best way of defining global constants in a C# application? (A windows application with no windows forms - basically a set of classes). Would it be...
5
4182
by: Schoo | last post by:
I have some program constants that I need to set and I thought it would be best to set them all up in a central location so that I can change them quickly when we go from development to production....
4
2579
by: Shayne H | last post by:
What is the best way to enumerate a grouping of strings? The way I have been doing it is: Public Enum PlatformID Unknown Win16 Win32 Win32NT WinCE End Enum
6
9408
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were...
9
2520
by: Jacek Dziedzic | last post by:
Hi! I often find that my programs need to store information on "current mode of something" with two or at most several mutually exclusive "modes" to choose from, e.g. - datafile: is it in a)...
4
1435
by: Paul.Pucciarelli | last post by:
So I have some 'groups' which 'users' can join. There is no enrollment limit on these 'groups'. How should I store the list of users enrolled in the group? I'd like to be able to quickly...
2
2337
by: stephen.diverdi | last post by:
I have a question about what's the best way to handle something in C++ without a lot of redundant code and void*s because I don't seem to be able to avoid them both. I've run into it before and...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4593
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3095
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.