469,160 Members | 1,848 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,160 developers. It's quick & easy.

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 1338
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.