Search:
Namespaces
Discussions
.NET v1.1
Feedback
IhttpModule and 404 Not found
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspnghttphandlers' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Aurelian POPA
How could I catch 404-Not Found error in asp.net=20
within a IHttpModule?
Aurelian POPA
Reply to this message...
Mitch Denny (VIP)
Aurelian,
I saw your thread on the [DOTNET] list re: what you are
trying to do here. Unfortunately my understanding of the
ASP.NET infrastructure leads me to believe that this
isn't possible from within an IHttpModile implementor.
The reason I say this is because I think a status like
404 is evaluated prior to the HTTP pipeline starting
up, so the events attached to the
HttpApplication
never fire - well thats the only way I can explain it.
I can appreciate why you want to do it, but I think
that it can only be done using the <customErrors />
element in the Web.config file.
----------------------------------------
- Mitch Denny
-
Click here to reveal e-mail address
- +61 (414) 610-141
-
-----Original Message-----
From: Aurelian POPA [mailto:
Click here to reveal e-mail address
]
Sent: Monday, 18 February 2002 19:40
To: aspnghttphandlers
Subject: [aspnghttphandlers] IhttpModule and 404 Not found
How could I catch 404-Not Found error in asp.net
within a IHttpModule?
Aurelian POPA
| [aspnghttphandlers] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspnghttphandlers.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Gary Pupurs
[Original message clipped]
On Tue, 19 Feb 2002 08:16:00 +1100, Mitch Denny wrote:
[Original message clipped]
The 404 response is dependent on the ISAPI program handling the
extension. I haven't examines the execution pipeline, but I have=
it
working, so anecdotally, the 404 status isn't determined by=
ASP.NET
automatically until after HttpModules have been processed (and=
the
HttpApplication_OnBeginRequest event).
If your want to handle 404s for .aspx or any other ASP.NET=
extension,
you can do this in HttpModules. (This is how you can support=
virtual
URLs in ASP.NET without any physical files they correspond with.)=
There's an example I wrote earlier today, look for the message=
"RE:
Return an aspx page in an HttpHandler?".
-g
Gary Pupurs <
Click here to reveal e-mail address
> on 19/02/2002
Reply to this message...
System.Web.HttpApplication
System.Web.IHttpModule
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com