Software⏱️ 2 min read📅 2026-05-31

How to Fix: "An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page..."

Azure webrole MVC website publishing issue with custom error handler exception.

Quick Answer: Check if the custom error page is being executed correctly in Azure, and ensure that the error handling mechanism is properly configured to handle exceptions.

The error you're encountering occurs when the custom error page attempts to handle an exception that has already been thrown by the application. This can happen if your custom error page is not properly configured or if it's trying to catch exceptions that are not intended for it.

🛠️ Step-by-Step Verified Fixes

Method 1: Configure Error Handling in Web.config

  1. Step 1: Open your project's Web.config file and add the following configuration to handle exceptions:
<system.web>

Method 2: Use a Try-Catch Block in Your Custom Error Page

  1. Step 1: Create a new C# code-behind file for your custom error page and add the following try-catch block:
using System;
>
>try
>
{
><YourCodeHere>
>}
>catch (Exception ex)
>
{
><YourErrorHandlingCode>
>}

💡 Conclusion

By implementing these steps, you should be able to resolve the error and ensure that your custom error page handles exceptions correctly.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions