473,390 Members | 1,175 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,390 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 1451
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
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.