"HTTP Error 500.19 - Internal Server Error" on IIS 7.5 Windows 7 when rurnning asp.net website
The error message is clearly saying there is a duplicate entry in the web.config file. Check Config Error and Config File under the detailed error.
If you are not sure.. just comment out the entry for system.web.extensions/scripting/webServices/profileService
in the web.config file
Related videos on Youtube
mooki333
Updated on September 17, 2022Comments
-
mooki333 over 1 year
When i try to run my simple ASP.NET website on IIS 7.5 ( Windows 7) I get this error :
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
I searched somehow and I found this webpage which have solution for my problem in "Error Message 3" . I followed "Resolution 3" at that page , but i couldn't found following entry :
<add accessType="Allow" users="*" />
I guess it's different because It's for IIS 7 while mine is IIS 7.5 . I don't know what's wrong . For more information I put a screen shot of Error page:
Edit
Thanks for responses , As Vivek said , I had to comment the following lines my webconfig in order to work
<configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <!--<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 name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <!--<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />--> <!--<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />--> <!--<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />--> <!--<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />--> </sectionGroup> </sectionGroup> </sectionGroup> </configSections>
. But it's a question for me Why should I comment those lines ? It's a hello world project and if I create website through Visual studio and target in IIS That work without any problem ( without commenting those lines )
-
Chris Canal over 13 yearsHave you double checked that all the files in that root folder can be read by the process (I_USR or whatever it is?) I had to give my root website folder
Everyone
read permission to get rid of that error. Of course, this was my localhost development machine .. so I didn't worry about security in this case. -
mooki333 over 13 years@Pure : Yes I did . Please take a look in my question after edit please .
-
MikeT over 13 yearsit can be best explained if you run process monitor and check the how the web.config files are loaded. basically it's loading the root web.config file and since the entry already exists it throws the error. unfortunately i am not able to reproduce the issue else i would have explained you much better.
-