/CMSPages/PortalTemplate.aspx throws 404 errors but site still works fine - kentico

I have a situation here, on iis logs I see the /CMSPages/PortalTemplate.aspx causing 404 errors but the requests are still fulfilled.
The question that I have is how do I stop these 404 errors from being logged since the website still works. I only want to see the real 404 erros which occur when the request URL is invalid
I am using the Portal Engine approach

In the IIS log, find out what the parameters after the /CMSPages/PortalTemplate.aspx causing the 404. You may be able to see these 404 errors in the Kentico Event Log as well. The majority of the requests to deliver page content goes through the /CMSPages/PortalTemplate.aspx page which is why you're seeing it in the IIS logs.
Once you find the record which has the 404 info, you should be able to find the path to the file and resolve it.

Check your network tab in your favorite browser. Usually there is a favicon or woff font not being served.

Related

IIS error 403 not logged and showing unknown error page

When I try to access a page on my IIS web I get an error 403. The error is not logged to the log file and the error page shown is not the one that's defined in the config.
That's the content of the error page:
<html><head><title>403 Forbidden</title></head><body>Access denied</body>
Can anyone help me to find this error page and get the error logged?
The 403 Forbidden error is an HTTP status code that means that accessing the page or directory you were trying to reach is absolutely forbidden for some reason.
To resolve this issue, you need to enable directory browsing for your application. To enable directory browsing on IIS, check out the steps from this Microsoft document.
If you still can’t solve the problem, you can use failed request tracking to view detailed error information.

Understanding a 404 error in IIS

I have a classic asp web application in which I've created a custom friendly 404 page. Also within that page, I have logic to email me the 404 info so I can check it out as to why it happened.
One of the pieces of info I email to myself is
Request.ServerVariables("HTTP_REFERER")
As I understand it, it should tell me the origin of the 404, ie. the page which is making the request to the file that doesn't exist.
However, I get notifications where the Referer is referencing a page in my site that doesn't exist in the first place. How can this be? Am I pulling the wrong ServerVariable? Is someone trying to do some cross site scripting?

Umbraco throwing 404

I have an umbraco 4 site that I have put a google sitemap onto. This all works fine locally but on the live server I am getting an IIS 404 error (not the umbraco 404 error) - see this link.
However if I preview the node it works fine
I have googled why I would get a 404 and so far I have come up with the following causes which I have checked and can rule out as the cause:
the template is not assigned
there are multiple nodes with the same url
Would anyone know what is causing this problem or how I could fix it?
Update
I have deleted the preview node now as I recreated the node in a different place and it worked. Would still like any thoughts on why I would get a 404 though, just in case a similar thing happens in future
Unfortunately both your links are going to the IIS error page as well as all the other errors on the site so we cant tell what you sitemap should be, see this link for tips on how to set up the 404 page http://www.simonantony.net/knowledge-base/articles/how-to-setup-a-404-error-page-on-your-umbraco-site/ .
Make sure that's working across the whole site then with you Google site map is it an XML sitemap or HTML sitemap and how have you implemented it did you use a package or made it you self.

where can i find the default 404 error page for windows sharepoint service 2.0

Where can i find the default htm file, mapped to show the 404 error in Sharepoint service 2.0. Currently whenever the request for a site hits the 404 error, it goes to the default page, but the point to note here is, which is not the one we set in IIS custom error option.
My requirement here is to make few modification in the 404 error page. I tried mapping the request to a custom error page with <customErros> tag in web.config. But unfortunately, its still showing the default 404 error page. When i checked the viewsource of the error page i can see some comments like, res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
Any idea about this? Thanks in advance
I haven't had to do this but this entry looks quite reasonable: http://blogs.msdn.com/b/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx
Basically when you install WSS it hi-jacks IIS. You can still do most of the things you would expect but you need to go through the Central Administration pages and the XML files that control many aspects of SharePoint.

IIS 404 Custom Error: URL return response code 200 instead

I'm trying to return a custom 404 page using IIS6. (I have a site that is mostly .shtml pages built using movable type). I have tried it 2 ways:
1) set the 404 error handler in IIS to be type "file" with the path \404.html. This works, but it also means that I can't import the header and footer of my site (hence the .shtml) Trying to point the 404 error handler to 404.shtml results in the default 404 page...i guess IIS can't process shtml files in the 404.
2) set the type to "URL". This works great, except that the response code is no longer 404! Its a 200.
How can I get IIS to respond with a 404 response code with the content of my 404.shtml file?
Given that it's IIS, adding
<% Response.Status = "404 Not Found" %>
to the top of 404.shtml should change the response code to 404.
I am not on a windows machine so I am unable to test it at the moment to verify.
Update:
I was finally able to run a few tests on a IIS 6. As you mentioned in a comment to my post, an .shtml file does not allow script commands to run. So there are at least two ways to work around this:
Instead of naming your custom 404 handling page 404.shtml, name it 404.asp. The user should never see the actual name of the page so it shouldn't cause any issues. Note that "Active Server Pages" must be set to 'Allowed' in the Web Service Extensions folder of IIS.
Modify the page extension mapping for .shtml to use asp.dll instead of ssinc.dll. You can do this from IIS by selecting the website and viewing Properties -> Home Directory tab -> Configuration -> Mappings tab. Note that this is far from an ideal solution because now all your .shtml files will be processed by asp.dll. This could cause your pages to render more slowly (assuming asp.dll processes files more slowly than ssinc.dll due to greater complexity) and violates the principle of least privilege.
If neither of the options fit your situation, then it may still be possible but the solution isn't immediately obvious to me.
In IIS Manager, open the Properties of your Web site (or virtual dir) and go to the Custom Errors tab. There you can set which file is sent in case of each error code, including 404.

Resources