---
title: "Error code : 0x80070021 and HTTP Error 500.19"  
description: "Error code : 0x80070021 and HTTP Error 500.19"  
author: "Anonymous User"  
published: 2015-10-31  
updated: 2015-10-31  
canonical: https://www.mindstick.com/forum/33552/error-code-0x80070021-and-http-error-500-19  
category: "iis 7"  
tags: ["iis 7", "iis"]  
reading_time: 2 minutes  

---

# Error code : 0x80070021 and HTTP Error 500.19

I have simple webapi build by [Visual studio](https://www.mindstick.com/articles/12378/visual-studio-for-mac-is-out-of-beta-preview-now-officially-available) 2013.it work good when i run it from VS13 but when i copy the project in local IIS it give me following error\

```
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
```

[Detailed](https://yourviews.mindstick.com/view/84608/what-are-hindenburg-s-allegations-against-adani-detailed-explanation) Error Information:\
Module IIS Web Core\
[Notification](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) BeginRequest\
Handler Not yet determined\
Error [Code 0x80070021](https://www.mindstick.com/forum/33527/deploying-issue-iis-error-code-0x80070021)\
Config Error This [configuration section](https://www.mindstick.com/forum/23348/iis-this-configuration-section-cannot-be-used-at-this-path-configuration-locking) cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a [location](https://www.mindstick.com/blog/11636/relocating-business-or-office-to-another-location) tag with overrideMode="Deny" or the legacy allowOverride="false".\
[Config File](https://answers.mindstick.com/qa/93685/what-is-web-config-file-in-dot-net-framework) \?\C:\inetpub\wwwroot\APITeslin\[web.config](https://www.mindstick.com/forum/183/web-config-file)\

```
Config Source:36:   <system.webServer>  37:     <handlers>  38:       <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
```

## Replies

### Reply by Anonymous User

This is what worked for me:\
Windows Server 2012, IIS 8.5. Should work for other versions too.\
1.Go to server manager, click add roles and features2.In the roles section choose: Web Server a. Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them) b. Under Application Development choose .NET Extensibility 4.5, ASP>NET 4.5, both ISAPI entries3. In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.54. In the web server section choose: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows Authentication - if you are using any of it


---

Original Source: https://www.mindstick.com/forum/33552/error-code-0x80070021-and-http-error-500-19

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
