Design question

A

Andrew Robinson

I am working on a large (for me) ASP.NET project that contains about 100 SQL
tables on the back end. We built a set of "entity" objects and service
provider objects to access our data with one entity and a corresponding
service provider for each table. Most of these are code generated and the
entire system is working very very well.

Now the customer has asked for some type of data base tracing functionality
to aid them in debugging when they make future updates to the project. This
tracing would write reads, writes and values to either a flat file or SQL
table when turned on.

The issue that I am having is finding a method for communicating to each of
the service provider objects that they need to enable tracing. Tracing needs
to be something that the average user turns on when having an issue and then
an admin or developer can view the trace files. On the web side I seen this
being set with some type of global value but I hate the idea of tying
tracing to a Session variable and then each of my 100s of data calls
checking this Session value. Just seems expensive. The fact that it needs to
be user enabled dynamically seems to exclude a value in a config file. I
don't want to refactor my code to tie all of these independent service
providers together with some type of common constructor value or class as
this would require a sizable modification to all existing pages.

Any ideas?
 
A

Andrew Robinson

One idea that I came up with is to use some type of static class or static
field within a class that will either enable or disable tracing. Tracing
will only be enabled for one session / user at a time so this might work ok.

Thoughts?
 
S

Steven Cheng[MSFT]

Hello Andrew,

As for the data accessing tracing, do you want to make the setting(such as
enable/disable) per user based or there is simply a global setting in
configuration file that control this tracing setting?

If you want to make the setting user based, you'll certainly need to store
the configuration info through some user specific storage. for example, the
session state or the ASP.NET 2.0 profile service for client authenticated
users. Anyway, I think a global setting in configuration file(as most of
the ASP.NET built-in trace and monitoring code used) is more preferred and
more convenient to manage.

Please feel free to post here if you have any particular concerns or
further questions here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hi Andrew,

have you got any further ideas on this issue? If there is any further
questions or anything we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top