This question has two parts really so even if you can help with just one part that will help me out a bit!
I've got an asp.net 2.0 website with a custom 404 page. When content is not found the site serves the custom 404 page with a query string addition of aspxerrorpath=/mauro.aspx. The 404 page itself is served with an http status of 200. To try to resolve this I've added
protected void Page_Load(object sender, EventArgs e)
{
Response.StatusCode = 404;
}
I added the google widget and have two issues with it. In IE7 it does not display where it should, if I add it to the content I get an "unknown error" on char 79 line 226 or thereabouts; if I add it to the head section the search boxes appear above the content. in Firefox it works fine.
So my issues are:
- How do I make the widget appear inline?
- How do I make the error page render as a 404 with the original name and path of the file being requested so that when I request mauro.aspx I get the content for the 404 page but with the url of mauro.aspx? (I assume that I will have to do some URL Rewriting in the begin_request global.asax file but would like this confirmed before I do anything silly)