Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

404 redirection fails with HTML in the form submission.

Posted on 2010-11-14
7
Medium Priority
?
689 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
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
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

885 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