Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7434411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:50:04+00:00 2026-05-29T09:50:04+00:00

My website is configured to display a custom HTML-page when an error occurs. This

  • 0

My website is configured to display a custom HTML-page when an error occurs. This works fine on both IIS and ASP.NET Development Server. However, as soon as I deploy the application to Windows Azure, I get HTTP 500 instead of 404 for non-ASP.NET-URLs.

This is what the relevant web.config-sections look like:

<httpErrors errorMode="Custom">
  <clear />
  <error statusCode="404" path="/Public/Error404.html" responseMode="ExecuteURL" />
</httpErrors>

<customErrors defaultRedirect="/Public/Error.html" mode="On">
    <error redirect="/Public/Error404.html" statusCode="404" />
</customErrors>

The customErrors section (applied to URLs ending on .aspx) works properly. The httpErrors section doesn’t, however. Even though Azure’s IIS sends a 500 to the browser, it logs a 404:

2012-02-10 13:30:07 W3SVC1273337584 RD00155D3A1439 10.61.70.39 GET
/asdfdsaafds – 80 – 65.52.128.172 HTTP/1.1
Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E) – – 940af2dbd9df4924b87a13878752aee3.cloudapp.net 404 0 2 222 457 218

Locally, I get a HTTP 500.19 with some more detailed information:

The requested page cannot be accessed because the related
configuration data for the page is invalid.

Config Error Lock violation

238: <httpErrors errorMode="Custom" defaultPath="/Public/Error.html" existingResponse="Replace" defaultResponseMode="ExecuteURL">

Googling lock violation didn’t help me too much, as results usually told me about Standalone IIS. There aren’t any errors in the Windows event log.

I’d like to display the Error404.html for any 404 on both Azure and Standalone IIS. Any help would be great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:50:04+00:00Added an answer on May 29, 2026 at 9:50 am

    Well, the obvious question is: have you made sure your custom error page is actually deployed to your Azure Web Role instance?

    Second question: does it work in the Azure emulator?

    Update:
    The error message indicates that the config section is locked on your target IIs.
    Read this Introduction to ApplicationHost.config.
    You probably need to unlock the httpErrors section.

    Also, take a look at this solution for a similar error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET MVC page. I Configured a IIS Website and added the
I have an ASP.NET website configured with <authentication mode=Forms> <forms loginUrl=Login.aspx timeout=10080> </forms> </authentication>
Summary: I have an ASP.NET MVC website in IIS named 'Website' using an AppPool
We have SiteMinder configured in our environment and I've been given an ASP.NET website
Does asp run in the IIS application pool for which the website is configured?
I am currently looking into devloping an ASP.NET website. I have configured IIS7 on
I have a main login for my client facing website configured with ASP.NET membership.
I have a ASP.NET/VB that had a GridView to display a list of users
When an HTML form is posted to a website without specifying the actual page
I have custom errors configured in my web.config, but IIS 6.0 is returning the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.