IIS - HTTP Error 500.19-Internal server Error - Asked By Daniel on 24-Jan-12 01:53 PM

Hi!I am getting the following erro:
The request page cannot be accessed because the related configuration data for the page is invalid.
Detail error is:

Module:IIS Web Core
Notification:BeginRequest
Handler:Not yet determined
Error Code:0x800700b7
Config Error
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Config File

\\?\C:\inetpub\wwwroot\EcashWebSite\ECASH_APPS\web.config

and The line 5 in  in Config source is in red:

 4: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

5:<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

 
6:<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

Link and more information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application.

 



kalpana aparnathi replied to Daniel on 24-Jan-12 01:57 PM

Cause of error message 

This problem may occur if there is a duplicate entry for the specified configuration section setting at a higher level in the configuration hierarchy (for example, in a parent site/folder’s web.config or applicationHost.config file). The error message itself points out the location of duplicate entry or entries.

Resolution


Examine the specified configuration file and compare it with its parent applicationHost.config and/or web.config files to check for duplicate entries as suggested by the error message. Either remove the duplicate entry, or make the entry unique.
Daniel replied to kalpana aparnathi on 24-Jan-12 02:35 PM
I dont understand very well what this means.What is ApplicationHost.config?
[)ia6l0 iii replied to Daniel on 24-Jan-12 08:31 PM
Please remove the scriptRessourceHandler section from your local web.config file.

<configSections>
<!--<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>-->
<!--</sectionGroup>-->
</configSections>


If not set the application pool to classic version - that should solve the issue. 
Jitendra Faye replied to Daniel on 25-Jan-12 12:14 AM

This could be due to anything . Most probably your web.config or applicationhost.config is malformed. Check this is a valid xml file. 

Also check your directory security on IIS .. Check IIS_IUSRS has appropriate permission to read your configuration file. 

http://support.microsoft.com/kb/942055

Suchit shah replied to Daniel on 25-Jan-12 05:10 AM

There are usually a few more lines in that error response that points to the exact line in the config file (and hence the locked section) that has the problem. You will either have to unlock that section or not use it in your application’s web.config file.

For e.g., one can lock/unlock handlers/modules sections by either
use appcmd.exe

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

OR

manually change value from "Deny" to "Allow" for below settings in %windir%\system32\inetsrv\config\ applicationHost.config

<section name="handlers" overrideModeDefault="Deny" />

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny"/>

You can also configure the locking via IIS manager UI.

http://blogs.iis.net/webtopics/archive/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7.aspx



Or try this one

Solution:
1. Add IIS_IUSRS with Read permission on files in the folder
2. Change IIS authentication method to BasicAuthentication
3. refresh the website. It will work

Identify the user under which your web site’s application pool is running under.

2. Add this user as a User Account on your local machine and add them to the IIS_IUSRS Group (the names have been obscured to protect the innocent).