Click here to Skip to main content
15,881,791 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I'm getting error in web.config file, stating as
"Unrecognized configuration section pages."
in the below code:-

XML
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
  <controls>
    <!-- Register the BotDetect tag prefix for easier use in all pages -->
    <add assembly="BotDetect" namespace="BotDetect.Web.UI" tagPrefix="BotDetect"/>
    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </controls>
</pages>


Does anyone know the reason behind it

Thanks

What I have tried:

1) Change the
controlRenderingCompatibilityVersion
value from 3.5 to 4.0
2) Remove the whole tag
3) Remove the
XML
<controls>

inside part i.e
XML
<add assembly="BotDetect" namespace="BotDetect.Web.UI" tagPrefix="BotDetect"/>
      <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Posted
Updated 5-Nov-16 6:13am

1 solution

Refer - pages Element (ASP.NET Settings Schema)[^].

Pages should go inside...
XML
<system.web>
 
Share this answer
 
Comments
binadi007 5-Nov-16 21:34pm    
Pages are already in <system.web>
Here is system.web node:

<system.web>
<compilation debug="true" targetframework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">


<customerrors mode="Off">
<httphandlers>
<add verb="GET" path="BotDetectCaptcha.ashx" type="BotDetect.Web.CaptchaHandler, BotDetect">
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha">

<pages controlrenderingcompatibilityversion="3.5" clientidmode="AutoID">
<controls>
<add assembly="BotDetect" namespace="BotDetect.Web.UI" tagprefix="BotDetect">
<add tagprefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
Then something else is not in the required place. Check that out. You can directly search for those tags in Google and learn about the placement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900