Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

404 redirection fails with HTML in the form submission.

Posted on 2010-11-14
7
Medium Priority
?
686 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

704 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