3

I am using SimpleMembership Provider in my ASP.NET MVC 4 project. Why the following code in web.config doesn't protect the content of the folder for unauthorized users?

<location path="Content/documents">
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
    </system.web>
</location>
tereško
  • 58,060
  • 25
  • 98
  • 150
arlen
  • 1,065
  • 1
  • 16
  • 31

1 Answers1

0

It should work, check if the path is set correctly, maybe you have other web configs and the path is not correct for the most inner one.

What you should also try is to use the asp.net configuration. Click on the project and then from the > menu -> project -> asp.net configuration -> security ->create access rules

. From here you can handle it yourself.

Community
  • 1
  • 1
Demian Flavius
  • 785
  • 1
  • 10
  • 17