0

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:

enter image description here

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 )

Pierre.Vriens
  • 1,159
  • 34
  • 15
  • 19
Mostafa
  • 145
  • 3
  • 3
  • 8
  • Have 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. – Pure.Krome Oct 21 '10 at 06:52
  • @Pure : Yes I did . Please take a look in my question after edit please . – Mostafa Oct 21 '10 at 19:07
  • it 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. – Vivek Kumbhar Oct 22 '10 at 04:53

1 Answers1

1

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

Vivek Kumbhar
  • 3,073
  • 1
  • 18
  • 13