Jump to content

Custom HTTP 404 Problem w/ASP to ASP.NET


kwilliams

Recommended Posts

Our old site used ASP, and our new site uses ASP.NET to display XML data using an XSLT transformation. I've just set up a custom 404 page for the new site. If I enter a test URL to test the redirect, this is how it works:1) If I enter http://www.mysite.com/http404.aspx, the custom 404 page loads properly.2) If I enter http://www.mysite.com/yadayada.aspx, which doesn't exist, I get redirected to the custom 404 page.3) If I enter http://www.mysite.com/yadayada.asp, which doesn't exist, I do not get redirected to the custom 404 page. Instead, I get an error message:XML Parsing Error: not well-formedLocation: http://www.mysite.com/yadayada.aspLine Number 1, Column 2:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" EnableSessionState="false" EnableViewState="false" title="HTTP 404" %>-^I checked to make sure that all of the documents are well-formed, so I'm not sure why this is happening. If anyone could let me know what is causing this, I'd really appreciate it. Thanks.

Link to comment
Share on other sites

Our old site used ASP, and our new site uses ASP.NET to display XML data using an XSLT transformation. I've just set up a custom 404 page for the new site. If I enter a test URL to test the redirect, this is how it works:1) If I enter http://www.mysite.com/http404.aspx, the custom 404 page loads properly.2) If I enter http://www.mysite.com/yadayada.aspx, which doesn't exist, I get redirected to the custom 404 page.3) If I enter http://www.mysite.com/yadayada.asp, which doesn't exist, I do not get redirected to the custom 404 page. Instead, I get an error message:XML Parsing Error: not well-formedLocation: http://www.mysite.com/yadayada.aspLine Number 1, Column 2:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" EnableSessionState="false" EnableViewState="false" title="HTTP 404" %>-^I checked to make sure that all of the documents are well-formed, so I'm not sure why this is happening. If anyone could let me know what is causing this, I'd really appreciate it. Thanks.
I don't have the full explanation, would need to research it, but can you live with a plain htm page as your custom error page? That's what you tend to see in the examples. See if it makes the difference anyway.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...