Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Page Not Found View modes: 
User avatar
Member
Member
shelley.ford-celero - 8/27/2012 5:19:46 PM
   
Page Not Found
Hi, I'm trying to get my 404 page working and seem to be having some issues.
I've created a page called "404" in CMS Desk with some editable text.
I've gone into Site Manager > Settings > Content, under Page Not Found I've set Page not found URL to /404/
In my web.config file I've added the following:
<appSettings>
...
<add key="CMSUseExtensionOnPostback" value="false" />
<add key="CMSUseTrailingSlashOnlyForExtensionLess" value="true" />
...
</appSettings>
...
<customErrors defaultRedirect="~/CMSMessages/error.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="~/404/" />
</customErrors>
...
<modules runAllManagedModulesForAllRequests="true">
...
In IIS (7.0) I have .NET Error Pages > Status code = 404; Redirect = ~/404/; Entry Type = Local

When I type in a nonsense URL I get the lovely IIS 404 - File or directory not found server error.

When I navigate right to my 404 page it loads.
Help!

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 8/28/2012 3:50:54 AM
   
RE:Page Not Found
Hi Shelley,

As I see, you were configuring it as the same as is described in the DevGuide in the section - Configuring custom error pages, you're doing well!

But try also to configure the Kentico CMS running on a server with IIS 7 the right way, the procedure is quite simple - it consists only of adding and modifying a few keys in your project's web.config file.

Take a look at following page under Optional configuration (recommended) - add a <httpErrors> element into the system.webServer section of your web.config:
http://devnet.kentico.com/docs/devguide/index.html?custom_url_extensions_iis7.htm

Best regards,
Martin Danko

User avatar
Member
Member
shelley.ford-celero - 8/29/2012 9:33:39 AM
   
RE:Page Not Found
Thanks Martin! The one thing I was missing that got it working was this:
<httpErrors existingResponse="Auto" errorMode="Custom">
<clear/>
<error statusCode="404" responseMode="ExecuteURL" path="~/404" />
</httpErrors>
Thanks so much for your time and assistance! Much appreciated, very much appreciated!