CatalogRouteHelper respons 404 with blank page

Vote:
 

I'm running an application on EpiServer Commerce 7.7.2 and I'm trying to configure 404 error page in web.config.

But when I test a page that doesn't exists then it just returns a blank page and does not redirect to my 404 page.

I suspect that its the CatalogRouteHelper which is causing this.

We are using the CatalogRouteHelper for the routing for the products in EpiServer Commerce.

http://world.episerver.com/documentation/Class-library/?documentId=commerce/8/ACBC5726

Anyone with a workaround or a solution to this?

Thanks in advance.

/M

#114439
Dec 11, 2014 15:49
Vote:
 

Is 404 a static HTML Page or an EPiServer page?

/K

#114447
Dec 11, 2014 17:48
Vote:
 

Hi,

Basically CatalogRouteHelper only register the HierarchicalCatalogPartialRouter. It should not affect 404 handling.

Just tested on our sample site, when I try to access non-existed product, it throws 404 error as expected. What is your registration for the route and for the custom error page?

Regards.

/Q

#114457
Dec 12, 2014 3:51
Vote:
 

@K Khan: We are using an EpiServer page.

@Quan Mai:

We have only set this in our InitializationModule 

public void Initialize(InitializationEngine context)
{
MapRoutes(RouteTable.Routes);
}

private static void MapRoutes(RouteCollection routes)
{
CatalogRouteHelper.MapDefaultHierarchialRouter(routes, true);
}

public void Uninitialize(InitializationEngine context) { /*uninitialize*/}

public void Preload(string[] parameters) { }


I've set up the customerror in web.config as follows:

<customErrors mode="On" >
<error redirect="/404" statusCode="404"/>
</customErrors>



#114463
Dec 12, 2014 9:31
Vote:
 

Hi,

I'm not sure if you show simplified configuration, but shouldn't the redirect value be "/404.html" instead?

Do you have any thing on Global.asax?

/Q

#114465
Dec 12, 2014 9:39
Vote:
 

Actually that is the only configuration we got.

I've tried to set a static file as well in web.config customerrors but its the same issue.

Is there something else we have forgot to configure?

/M

#114467
Dec 12, 2014 9:52
Vote:
 

I found what I did wrong.

I actually forgot to set the correct configuration in web.config.

<httpErrors errorMode="Custom" existingResponse="Replace">
<clear/>
<error statusCode="404" path="/404/" responseMode="ExecuteURL" />
</httpErrors>
#114469
Dec 12, 2014 10:09
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.