472,146 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Accessing the Global.asax

I have a solution that has 3 projects in it. A web application called
USITracking. A project library holding my business logic classes and a
project library holding my data logic classes. From my business logic
classes how can I assess the global.asax?

Jul 21 '05 #1
3 1401
You would have to add a reference to the web project from your business
logic class, and then access the class (specified by the ClassName
attribute in the global.asax).
But that sounds like a bad idea. Your business logic classes shouldn't
know about or depend on anything in your web application. You might
want to think about other ways to accomplish what you are trying.

BillG wrote:
I have a solution that has 3 projects in it. A web application called
USITracking. A project library holding my business logic classes and a
project library holding my data logic classes. From my business logic
classes how can I assess the global.asax?

Jul 21 '05 #2
I am trying to access my configuration settings in web.config to get my
connection string to the database.

"Joshua Flanagan" wrote:
You would have to add a reference to the web project from your business
logic class, and then access the class (specified by the ClassName
attribute in the global.asax).
But that sounds like a bad idea. Your business logic classes shouldn't
know about or depend on anything in your web application. You might
want to think about other ways to accomplish what you are trying.

BillG wrote:
I have a solution that has 3 projects in it. A web application called
USITracking. A project library holding my business logic classes and a
project library holding my data logic classes. From my business logic
classes how can I assess the global.asax?

Jul 21 '05 #3
You can read the configuration settings in web.config from your business
logic directly. ConfigurationSettings.AppSettings and
ConfigurationSettings.GetConfig can both read the settings from
web.config from any assembly running in the website process - which
includes your business logic library.

BillG wrote:
I am trying to access my configuration settings in web.config to get my
connection string to the database.

"Joshua Flanagan" wrote:

You would have to add a reference to the web project from your business
logic class, and then access the class (specified by the ClassName
attribute in the global.asax).
But that sounds like a bad idea. Your business logic classes shouldn't
know about or depend on anything in your web application. You might
want to think about other ways to accomplish what you are trying.

BillG wrote:
I have a solution that has 3 projects in it. A web application called
USITracking. A project library holding my business logic classes and a
project library holding my data logic classes. From my business logic
classes how can I assess the global.asax?

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Anjali Lourda | last post: by
22 posts views Thread by fd123456 | last post: by
2 posts views Thread by Nathan Sokalski | last post: by
10 posts views Thread by Nemisis | last post: by
8 posts views Thread by Rob T | last post: by
reply views Thread by leo001 | last post: by

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.