InstallationSingle Server Deployment

Single Server Deployment

Configure the 404 and 500 Pages

  • Open the 'web.config' of the Sana Commerce frontend project in any text editor;
  • Locate the 'customErrors' section in the 'system.web' configuration section:
<customErrors mode="RemoteOnly">
    <error statusCode="404" redirect="~/PageNotFound.aspx"/>
    <error statusCode="500" redirect="~/PageError.aspx"/>
  • Configure the 404 & 500 'statusCodes'. Also, set the mode attribute of the 'customErrors' node to 'RemoteOnly' to make sure the customer 404 & 500 pages are shown to external visitors. Local visitors, who visit through the web browser on the server, will be presented the error messages for debugging reasons. 
Now you need to configure the custom errors pages in IIS:
  • Open the IIS Manager ('Start > Administrative Tools');
  • Select your website, click right and choose 'Properties';
  • Click the 'Custom Errors' tab;
  • Search for the 404 error and click the 'Edit' button;
  • Select the 'URL' in the 'Message type' dropdown;
  • Enter '/PageNotFound.aspx' in the 'URL' field;
  • Repeat the steps for error 500;100, but enter '/PageError.aspx' in the 'URL' field instead.

    Configuring Custom Error Pages in IIS 6
If you use IIS 7:
  • Open the IIS Manager ('Start > Administrative Tools');
  • Select your website, locate the 'Error Pages' in the IIS 'Features' list and click it;
  • Double click the '404' page;
  • Select 'Execute a URL on this site' and enter '/PageNotFound.aspx' in the 'URL' field;
  • For a 500,100 page, you need to use the 'Add option in the 'Actions' block;
  • Enter '500.100' in the 'Status code' field and '/PageError.aspx' in the 'URL' field.
  Configuring Custom Error Pages in IIS 7
InstallationSingle Server Deployment