Can't get rid of It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

StackOverflow https://stackoverflow.com/questions/23296134

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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top