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