473,614 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

@ Application directive in global.asax

Hi,

Global.asax can be configured to use code-behind class. In order to do that
"Implements " attribute has to be declared within @Application directive. I
have read that the base class (derived form HttpApplication ) to inherit from
must be precomiled and stored in the \bin folder of the application. That
works fine. I have noticed, however, that @Application accepts also "Src"
attribute as the regular @Page directive does. In this case "Src" attribute
points to the source file of the base class. This also works fine.
My question is if "Src" attribute can be legally used or it is just an
undocumented feature of the @Application directive.

Marek.
Nov 18 '05 #1
2 1402
Hi,

Src attribute is part of the mechanism that ASP.NET uses to dynamically
create classes from ASPX declarations. src point to the class that the
programmer implemented. You can read my article on Code project:
www.codeproject.com/aspnet/ASPXFILES.asp

The same apply to Global.asax.

From MSDN : "RAD designers, such as Visual Studio .NET, do not use this
attribute. Instead, they precompiled code-behind classes and then use
the Inherits attribute."
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Thank you, Natty

"Natty Gur" <na***@dao2com. com> wrote in message
news:OH******** *******@TK2MSFT NGP11.phx.gbl.. .
Hi,

Src attribute is part of the mechanism that ASP.NET uses to dynamically
create classes from ASPX declarations. src point to the class that the
programmer implemented. You can read my article on Code project:
www.codeproject.com/aspnet/ASPXFILES.asp

The same apply to Global.asax.

From MSDN : "RAD designers, such as Visual Studio .NET, do not use this
attribute. Instead, they precompiled code-behind classes and then use
the Inherits attribute."
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
512
by: Mike Owen | last post by:
Hi, I have just used the import Wizard to import a VS 2003 app to VS 2005. I have a lot of work to do to enable it to compile successfully with all the errors and warnings it gave me, but as a starting point the compiler can no longer find the function as at the bottom of this posting, that was in the Global.asax.vb file. All the function does is give an easy / quick way of getting the application
5
1406
by: John Christensen | last post by:
I'm currently having an issue while trying to deploy a new ASP.NET application from my personal machine to our development web server. After I copy the folder over and create an IIS application in that directory, I go to the site and get the following error: Could not load type 'GeneseeSurvey.Reporting.ActionPlanning.Global'. The dll for the web project, ActionPlanningWeb.dll, is located within the bin directory, which gives Full...
5
2061
by: Leon | last post by:
Is there a way I can create a thread at application level that running all the time along with application exists? I have tried to do the above thing, and I found for some reason, the thread only can be excuted once after it is created. Thanks very much for your help.
6
2630
by: jim | last post by:
Hi All, I like to know the life cycle of an ASP .NET Application( incudieng server application, such as .NET Web Service). That means from initialization to fully running and how to reboot it or shut it down. Including how to establish the running environment( current working folder, ...etc) for each ASP .NET application. Because in my ASP .NET application, there are a lot of modules. Some were developed by using VC#, others using...
16
3144
by: Fernando Arámburu | last post by:
Hi , it´s me again. I will take another way because yesterday I make a question and, probably I didn´t make myself clear so you didn´t understand my question. I want to know if there is any way to register a method to the Application Start event. I know there is one way, in Global.asax writing code in Application_Start
8
4858
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical differences in the way both the objects are handled by IIS. Are both objects stored in different memory spaces? I can access both the objects in my web page. I will be grateful if some one can help me understand the difference.
6
1482
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain things with it, like creating and configuring WSS sites. My application runs fine for approximately 25 minutes, then I get the 'Page cannot be displayed' error. It seems like my browser times out before the application can finish what its doing.
5
1812
by: WT | last post by:
Hello, In my Global.asax file, I have only an @ Application directive like <%@ Application Language="C#" Inherits="WT.Global" CodeFile="Global.asax.cs" %> Visual studio complains saying that CodeFile is no valid for Application but the documentation says to use it for Codebehind ?
4
7490
by: WT | last post by:
Hello, Using VS2005, when I open the global.asax file, the editor underlines in blue all the line with a tooltip saying 'Syntaxe error '. <%@ Application Language="C#" Inherits="MyApp.Core.Global" Codefile="Global.asax.cs" %> But everything is running OK, the site is under a web application project.
0
8198
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8142
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8444
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5549
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.