The configuration section cannot contain a CDATA or text element error in web.config file

user2409235 picture user2409235 · Aug 21, 2013 · Viewed 51.9k times · Source

I am getting an error while executing the application on server "The configuration section cannot contain a CDATA or text element(web.confing line 149) the error lines are as follows,

<location path="admin">
   <system.web>
    <authorization>             
        <allow roles="Admin"/>
        <deny users="*"/>;
    </authorization>
   </system.web>
</location>

Pleae help me in this error.

Answer

ProgrammingNinja picture ProgrammingNinja · Jan 7, 2014

You have a semicolon in front of

<deny users="*"/>

This semicolon is not allowed and is the reason you are getting that error.