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

How to Fix 0x80070021 Error – HTTP Error 500.19 and error code : 0x80070021

Quick Answer: Check the .NET Framework version and ensure it matches between Visual Studio 2013 and IIS. Try setting the 'Load Configuration' option to 'Always' in IIS.

HTTP Error 500.19 and error code 0x8007 0x80070021 are commonly caused by a mismatch between the .NET CLR version used in the web API project and the one installed on the local IIS server.

🛑 Root Causes of the Error

  • Using .NET Framework 4.0 in Visual Studio 2013, but IIS is running .NET Framework 4.5 or later.

🛠️ Step-by-Step Verified Fixes

Method 1: CLR Fix

  1. Step 1: Open the project properties in Visual Studio and change the .NET Framework version to match the IIS version.

Method 2: Web.config Rewrite

  1. Step 1: Open the web.config file and add the following configuration to match the IIS version:
<system.webServer>

💡 Conclusion

By following these steps, you should be able to resolve the HTTP Error 500.19 and error code 0x8007 0x80070021 issue.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions