Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > 404 pages notw orking on portal engine View modes: 
User avatar
Member
Member
DanM - 9/26/2013 9:45:52 AM
   
404 pages notw orking on portal engine
Hi,

When I type in an incorrect URL I get an IIS error page that says:

Server Error in '/' Application.
There is no build provider registered for the extension '.htm'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

I'm sure that this is a pretty generic IIS error. I have set the 'Page not found URL' in Manager > Settings > Content to ~/404.aspx, which exists (tried /404.aspx and stagingurl.com/404.aspx too!). This doesn't seem to make any difference.
I'm sure this is something that I'll have to edit in web.config.

The only issue is that I am now hosting the files on the azure server and can only access them through azure blob storage. I'm tempted to download the zip from the azure blob (cmscustomcode/unmanaged folder), alter some files and then reupload it again.
Is this the best way to alter web.config once on the hosting?
Will this zip be the same as the one that I uploaded to the server when I transferred my site over to hosting? I think some changes may have been made by kentico between me and the azure server....
Does anyone have a suggestion as to what I should change in web.config?

So many questions......

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/26/2013 9:54:00 AM
   
RE:404 pages notw orking on portal engine
Regarding your 404 issue, take a look at this post. In the end, it was a simple change. Here is the section from my web.config
<customErrors defaultRedirect="~/Global/Error/" mode="On">
<error statusCode="404" redirect="~/Global/404/"/>
</customErrors>
And in the Site Manager>Settings>Content (both site and global) I set the page not found URL to ~/Global/404.aspx and everything worked as expected. I should also note I'm using extensionless URLs.

Regarding Azure, I'm unable to help on that one.

User avatar
Member
Member
DanM - 9/26/2013 10:15:31 AM
   
RE:404 pages notw orking on portal engine
Thanks FroggEye, you really know what you're talking about!

User avatar
Member
Member
DanM - 9/26/2013 11:16:52 AM
   
RE:404 pages notw orking on portal engine
Hi, it turned out that I was altering the global setting and not the one for my site, which was trying to redirect to a html file that didn't exist. Doh!