Solved

404 redirection fails with HTML in the form submission.

Posted on 2010-11-14
7
677 Views
Last Modified: 2012-05-10
I am using my 404 error page to dynamically display content.  
 - (the 404 is an ASPX page that is looking up content in the database from the original URL.)

This part has been working fine for form submission, so long as I don't include any HTML content in the form submission.

IF I include html code in a form submission, I get a generic html 404 error page.  In this circumstance, it is ignoring my error redirection.

From my Web Config:
<system.web >
   
     <pages validateRequest="false"  />
    <customErrors mode="On" redirectMode="ResponseRewrite" >
     
<error statusCode="403" redirect="dynamic.aspx" />
      <error statusCode="404" redirect="dynamic.aspx" />
0
Comment
Question by:hpdvs2
  • 4
  • 3
7 Comments
 
LVL 8

Author Comment

by:hpdvs2
Comment Utility
Please note:  The form content is sent to the fake none existant page, which works, unless I posted an <hr /> or some other html tag.  (fails with a generic 404 error)
0
 
LVL 16

Expert Comment

by:BurnieP
Comment Utility
That type of error is 500, I believe.

<error statusCode="500" redirect="dynamic.aspx" />
0
 
LVL 8

Author Comment

by:hpdvs2
Comment Utility
An interesting guess, but I'm positive it is the generic 404 error, not a 500 error.  here is the content I receive back.

Server Error in '/LbpSite2' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /LbpSite2/Content Editor.aspx
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 8

Author Comment

by:hpdvs2
Comment Utility
Also, to clarify, I tried the 500 error at your suggestion, but it did not have any affect.  
0
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
Comment Utility
I am really trying to help you :)

I tried everything in your two thread combined.

One last thing.. do you have a ErrorPage directive defined in your @Page directives?  Maybe it is trying to open that page and it doesn't find it.
0
 
LVL 8

Author Comment

by:hpdvs2
Comment Utility
WOW!!!  I don't understand it, but that was the cause... This was one weird error.  

apply the answer to the previous one, and I'll mark you down for it as well.  this has been huge pain.

Thanks.

I set the ErrorPage to point to itself and that worked.  
0
 
LVL 16

Expert Comment

by:BurnieP
Comment Utility
I am glad we found it! :)

I must admit I really spent time on this one, I really wanted to know the cause!

Good luck in your programming!
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now