HTTP Error 500.22 - Internal Server Error. An ASP.NET Setting Has Been Detected
This issue is mainly caused by the pipeline mode of your websites' application pool.
Pipeline mode can be of two types.
Classic pipeline mode and Integrated pipeline mode.
Integrated pipeline mode is the advanced one with latest features.
This error says, the website has settings suitable for Classic Pipeline mode.
These website Settings are not suitable for Integrated Pipeline mode.
Lets consider how to resolve this issue.
Simple Solution (Bad Practice).
On IIS, change the Application Pools' pipeline mode to Classic instead of Integrated.
Second Solution (Good Practice).
Remove the httpHandlers and httpModules elements from system.web.
If still your issue exist, do the following.
Add the following validations on your web.config file.
By doing this much of steps, we can definitely resolve this issue.