1

I know this topic is discussed several times here but I read them and I don't believe they apply to my scenario. I added the following to my web.config:

<location path="Admin/default.aspx">
    <system.web>
      <authorization>
        <allow roles="Customer Service Admin" />
        <deny users="*"/>
      </authorization>

And I started getting the error. I looked at the other SO posts on this and I found another web.config higher up in the Account subfolder but I deleted it. There are no other web.config files. I have done the other things like deleting the obj file but I keep getting this error. I am running i IIS Express locally. What else could it be?

user2471435
  • 1,644
  • 7
  • 35
  • 62
  • Have you check [this](http://stackoverflow.com/questions/2355947/error-allowdefinition-machinetoapplication-beyond-application-level) and [this](http://dotnet-magic.blogspot.com/2008/11/it-is-error-to-use-section-registered.html)? – Win Apr 25 '14 at 15:16
  • Yes I have read both of them. I am not using IIS locally. I am using IIS Express. – user2471435 Apr 25 '14 at 15:27
  • I searched all the directories and there is no other web.config. So what now? – user2471435 Apr 25 '14 at 16:01
  • I found the source of this error. There were two declarations in the web.config file. – user2471435 Apr 25 '14 at 19:04

1 Answers1

0

The problem was unlike in any of the other SO Posts on this error. The error was caused by two system.web sections in the web.config

user2471435
  • 1,644
  • 7
  • 35
  • 62