473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Intercept IIS 404 errors? Issue with Viewstate and 404

I have been working on this most of the day and cannot find a solution to my
problem.

I have an application where I may not actually have a page. for example a
user may make a request for www.mydomain.com/page_that_does_not_exist.aspx.

In the Application_BeginRequest, I am handling that by remapping the path to
http://www.mydomain.com/index.aspx?p...does_not_exist

The index.aspx page is smart enough to know to load a control named
"page_that_does_not_exist" into a placeholder.

So, everything works great, but then I want to implement a custom 404
handler. I am implementing the custom 404 handler to give to search engine
web bots. The problem that I now face is that my call to
www.mydomain.com/page_that_does_not_exist.aspx now generates the 404 error
.... even when I am doing a post back. Somehow or another the 404 error is
clearing the view state for drop down lists (not for text box controls)
only. The result is that many pieces of my application no longer work
correctly, as long as I am implementing the custom 404 handler. I want to
be able to intercept a 404 before it is generated to determine if it is
truly a 404.

Any ideas about how to intercept and repress 404s that are not truely 404s
for my application?
Nov 19 '05 #1
2 2169
One option that I have thought of is to completely disable 404 handling for
ASPX.

If a request is for ASPX, then I can determnine if there is a page not found
and re-route accordingly. I would still prefer to have an automatic page
not found for any junk file requested.

Again, any ideas.

Jonathan
"Jonathan Folland" <jf*************@earthlink.net> wrote in message
news:e0**************@TK2MSFTNGP09.phx.gbl...
I have been working on this most of the day and cannot find a solution to my problem.

I have an application where I may not actually have a page. for example a
user may make a request for www.mydomain.com/page_that_does_not_exist.aspx.
In the Application_BeginRequest, I am handling that by remapping the path to http://www.mydomain.com/index.aspx?p...does_not_exist

The index.aspx page is smart enough to know to load a control named
"page_that_does_not_exist" into a placeholder.

So, everything works great, but then I want to implement a custom 404
handler. I am implementing the custom 404 handler to give to search engine web bots. The problem that I now face is that my call to
www.mydomain.com/page_that_does_not_exist.aspx now generates the 404 error
... even when I am doing a post back. Somehow or another the 404 error is
clearing the view state for drop down lists (not for text box controls)
only. The result is that many pieces of my application no longer work
correctly, as long as I am implementing the custom 404 handler. I want to
be able to intercept a 404 before it is generated to determine if it is
truly a 404.

Any ideas about how to intercept and repress 404s that are not truely 404s
for my application?

Nov 19 '05 #2
I found the answer.

The 404 was being generated by a missing GIF file. I thought it was
generated by the architecture of the application. All I had to do was place
the missing gif and the problem was resolved.

J
"Jonathan Folland" <jf*************@tcimex.com> wrote in message
news:#V**************@tk2msftngp13.phx.gbl...
One option that I have thought of is to completely disable 404 handling for ASPX.

If a request is for ASPX, then I can determnine if there is a page not found and re-route accordingly. I would still prefer to have an automatic page
not found for any junk file requested.

Again, any ideas.

Jonathan
"Jonathan Folland" <jf*************@earthlink.net> wrote in message
news:e0**************@TK2MSFTNGP09.phx.gbl...
I have been working on this most of the day and cannot find a solution to
my
problem.

I have an application where I may not actually have a page. for example
a user may make a request for

www.mydomain.com/page_that_does_not_exist.aspx.

In the Application_BeginRequest, I am handling that by remapping the path to
http://www.mydomain.com/index.aspx?p...does_not_exist

The index.aspx page is smart enough to know to load a control named
"page_that_does_not_exist" into a placeholder.

So, everything works great, but then I want to implement a custom 404
handler. I am implementing the custom 404 handler to give to search

engine
web bots. The problem that I now face is that my call to
www.mydomain.com/page_that_does_not_exist.aspx now generates the 404

error ... even when I am doing a post back. Somehow or another the 404 error is clearing the view state for drop down lists (not for text box controls)
only. The result is that many pieces of my application no longer work
correctly, as long as I am implementing the custom 404 handler. I want to be able to intercept a 404 before it is generated to determine if it is
truly a 404.

Any ideas about how to intercept and repress 404s that are not truely 404s for my application?


Nov 19 '05 #3

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

Similar topics

0
1023
by: Emrah Gozcu | last post by:
I have a custom control tabstrib and it loads another custom control when clicked a tab. Tabstrib event fires well but the other custom control which is dynamicly loaded after clicking a tab,...
0
292
by: Matt | last post by:
Hello, I'm having a "classic" problem with the viewstate. In my project, i get the "The viewstate is invalid for this page and might be corrupted" error for mac users only. So this is a mac...
2
2803
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
1
1960
by: Mind Dragon | last post by:
I have an ASP application that works fine locally but when it's uploaded occasionally, I get viewstate errors. Another thing is that the viewstate for that page is disabled. There are cases where I...
25
17143
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
2
1976
by: Janaka | last post by:
We have managed to lock down 99% of the application errors occurring in our asp.net sites. The only errors which occur on a regular basis now are viewstate errors. We have disabled viewstate on...
2
5842
by: Steve Pierce | last post by:
I am having some issues with a runtime dropdownlist in a datagrid. The issue is that I cannot get ViewState to fill the selected index of a runtime dropdown properly on postback. I do not want to...
0
824
by: David Lozzi | last post by:
Howdy, I've already read all of the documentation I can bear to read about this issue. No, not in a farm or do I have large files that aren't downloading in time before the next post. However,...
7
4676
by: ADN | last post by:
Hi, I am creating a custom HTTPModule to intercept the request of when the user is attempting to retrieve a session variable. For instance, if I set a session variable in my code like so: ...
0
7319
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
7376
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...
1
7031
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
7485
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...
0
5623
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,...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.