473,396 Members | 1,768 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,396 software developers and data experts.

When does Application_AuthenticateRequest fires?

I am using .net 1.1

In the global.asax.cs file, there is this entry:

protected void Application_AuthenticateRequest(Object sender, EventArgs e)

as far as I know, it is wired with the

FormsAuthentication_OnAuthenticate event.

My question is, when does the event exactly fire? My testing shows, that it
fires with every request on an aspx file.. I thought it does it only, if you
want to access an aspx in a secured folder (secured by the web.config entry:
deny users=? as example.)

But that event fires everywhere, even in folders, that are completely open
(allow users=*).
Dec 22 '05 #1
1 5061
Yes, this is the event in HttpRuntime's sequence of events that fire for
every request into ASP.NET. This step is the one that's supposed to determine
who the user is. If you'rte using Forms Authentication then there is code
that reads the cookie and determines the user and it sets the HttpContext.User
property based upon what's in the cookie. So yeah, this fires for every request
since you'd like to know who the user is upon every request :)

If the user is anonymous then the forms auth code has nothing to do. Now
the event that fire right after AuthenticateRequest is AuthorizeRequest and
this is where the <authorization> settings are enforced. So the prior step
identified the user, this next step see if that user is allowed to hit the
page they're requesting.

This URL talks about the other events that fire:

http://msdn2.microsoft.com/en-us/lib...plication.aspx

-Brock
DevelopMentor
http://staff.develop.com/ballen
I am using .net 1.1

In the global.asax.cs file, there is this entry:

protected void Application_AuthenticateRequest(Object sender,
EventArgs e)

as far as I know, it is wired with the

FormsAuthentication_OnAuthenticate event.

My question is, when does the event exactly fire? My testing shows,
that it fires with every request on an aspx file.. I thought it does
it only, if you want to access an aspx in a secured folder (secured by
the web.config entry: deny users=? as example.)

But that event fires everywhere, even in folders, that are completely
open (allow users=*).

Dec 22 '05 #2

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

Similar topics

1
by: Kim Gijung | last post by:
Hi All, I'm wondering three facts about php, apache and apache module. 1.How can i differentiate the php intepreter if it's running as a apache module or as cgi? 2.When does the php...
3
by: Bren | last post by:
Hi All In the global.asa file, when does the Application_OnStart event trigger? Is it:- 1. When the webserver starts or 2. When the website is first accessed AFTER the webserver has started. ...
1
by: jbaker | last post by:
I am pursuing understanding why I have some very old UOWs holding my logs from archiving. I am pretty sure it is an application issue, but I am trying to nail down how DB2 is behaving. I the...
4
by: ryu | last post by:
I have a aspx page that loads a ascx file ie Web Control. My question is when does the postback of the web control occur? Is it when it is called via LoadControl? Or after the calling page's...
2
by: mswc.net | last post by:
I have put code inside this method (Global.asax) but not even after re-starting my machine or the aspnet_wp.exe service it seems to execute the code inside of it. When does this methods really...
1
by: Divick | last post by:
Hi I want to know when does the storate allocation happens for member static data? For example I have following class declared in a header typedef void (*fptr)(void); class DllMethods {...
1
by: Joachim Klassen | last post by:
Hi all, a couple of questions regarding LOAD COPY YES: when does a LOAD COPY YES start to write its backup image ? After LOAD Phase or after BUILD or DELETE phase? What gets backed up - data...
7
by: ghd | last post by:
In Windows XP when does the JVM start (JRE version 1.4 and higher)? And when does it halt? Does the JVM start when we launch a java application (or by executing java classfile)? And does the JVM...
3
by: ghd | last post by:
In Windows XP when does the JVM start (JRE version 1.4 and higher)? And when does it halt? Does the JVM start when we launch a java application (or by executing on the command prompt - java...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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:
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
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...
0
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,...

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.