Link to home
Start Free TrialLog in
Avatar of Nugs
Nugs

asked on

Web.Config - Securing folders

Currently my web.config file is set to deny users to everything and then allows them to certain files and folders.

I am trying to do this opposite here but am having trouble. i need to allow all files and deny users to certain folders.

This is what i have currently:
--------------------------------------------------------------------------------------------------------------------------
    <authentication mode="Forms">
      <forms name=".ASPXAUTHSG" loginUrl="~/login.aspx" protection="All" timeout="30"/>
    </authentication>
    <authorization>
      <deny users="?"/>
    </authorization>
...
  <location path="Default.aspx">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
--------------------------------------------------------------------------------------------------------------------------

I only need to secure two folders, the rest the public can view... How do i make this happen?

Nugs
ASKER CERTIFIED SOLUTION
Avatar of Dustin Hopkins
Dustin Hopkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nugs
Nugs

ASKER

Seems to work, new one on me... thought you had to manage it all from on web.config... thanks.

Nugs