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>
1
  • did you ever figure out how to do this?
    – JustMaier
    Mar 11, 2013 at 16:39

1 Answer 1

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.

1
  • I want to use SimpleMembership Provider, not the ASP.NET Membership system.
    – arlen
    Nov 27, 2012 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.