473,394 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 1452
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ekul | last post by:
I have an application that allows users to login and logout. I track how many users are logged in and when each individual is logged in. The application will not allow concurrent logins(let a...
3
by: Anjali Lourda | last post by:
Hi, I have defined a function in global.asax file. Could somebody please tell me how i am supposed to call that function from the other files of the same project. Global.asax public function...
22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
2
by: Nathan Sokalski | last post by:
I would like to access variables and functions that I declare in the Global.asax.vb file. However, I am having trouble doing that. What does the declaration have to look like in the Global.asax.vb...
5
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
2
by: rgparkins | last post by:
Hi Guys Maybe a simple and easy solution to this, but I keep getting exception object not set to instance etc etc. I have a Timer that is initiated in Application_Start in Global.asax. This...
16
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@...
10
by: Nemisis | last post by:
Hi everyone, I am trying to create a custom error page, that the user gets shown when a error has occurred within my website. The code works perfectly, apart from when an invalid URL is typed...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.