views:

91

answers:

1

I am ristrcting access to the Account folder using below:

<location path="Account">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>

and access to the Default.aspx using

<location path="Default.aspx">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>

but how do i restrict access to a specific file in the Account folder rather than the entire folder?

I tried the following but did not work

<location path="Account\ChangePassword.aspx">
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow users="*"/>
    </authorization>
  </system.web>
</location>
+2  A: 

Try this

<location path="Account/ChangePassword.aspx">
  <system.web>
    <authorization> 
      <deny users="?"/>
    </authorization> 
  </system.web> 
</location>
Branislav Abadjimarinov
haha... them backslaskes in asp.net kill methanks branislav
Dave
I'm glad I could help. Also you don't need to use <deny users="?"/> <allow users="*"/> Only the first one will do the job.
Branislav Abadjimarinov
cool thanks for the information
Dave