Solved

404 redirection fails with HTML in the form submission.

Posted on 2010-11-14
7
682 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 8

Author Comment

by:hpdvs2
ID: 34131453
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
ID: 34131508
That type of error is 500, I believe.

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

Author Comment

by:hpdvs2
ID: 34131518
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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 8

Author Comment

by:hpdvs2
ID: 34131561
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
ID: 34131894
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
ID: 34133544
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
ID: 34133662
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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

739 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