After you set a custom 404 error page in the Cloud Web Hosting console, the page may not take effect. This issue can occur if the web.config file of your website application also defines a 404 error page. The settings in the web.config file have a higher priority than the settings in the console. This topic describes the cause of this issue and provides a solution.
Symptoms
After you set up a website on a Windows-based Cloud Web Hosting instance and configure a custom 404 error page in the console, the custom page does not take effect when you access the site.
Cause
The web.config file of your website application contains 404 error page settings. These settings have a higher priority than the custom 404 page settings in the Cloud Web Hosting console. As a result, the custom 404 page that you configured does not take effect.
Solution
Connect to the Windows Cloud Web Hosting instance.
This example uses FileZilla to connect to the Cloud Web Hosting instance. For more information, see Manage website application files using FileZilla.
Download the web.config file to your local host.
This step assumes that the web.config file is in the site's root directory (/). In the root directory (/), select the web.config file and download it to your local host by double-clicking or dragging it.
ImportantThe location of the web.config file can vary based on developer preferences. If you cannot find the web.config file in the site's root directory (/), contact your website developer to locate the file.
On your local host, open the web.config file with a text editor, such as EditPlus.
Search for configuration to find the 404 error page settings in the web.config file.
NoteThe following code is an example. The actual code in your web.config file may differ.
The following is an example:
<configuration> <system.webServer> <httpError errorMode="Detailed" /> </system.webServer> </configuration>Delete the 404 error page configuration from the web.config file. Then, save the file and close the text editor.
Upload the modified web.config file to the Windows Cloud Web Hosting instance.
On your local host, select the saved web.config file. Double-click or drag the file to the root directory (/) of your Cloud Web Hosting instance.
Access the 404 error page again.
If the page is the custom 404 error page that you configured in the Host Management Console, no further action is required.
If the issue persists, submit a ticket.