Form authentication does not work for a specific page

I cannot isolate my forums to set different permissions for them than the rest of the site.

Here is the setup of my site.

<location path=".">
  <system.web>
    <authentication mode="None" />
  </system.web>
</location>

I need to isolate my forums. At the moment, for testing, I have a setting so that all users are denied access.

<location path="~/public/public-forum.aspx">
  <system.web>
    <authentication mode="Forms">
      <forms loginUrl="public/login.aspx" />
    </authentication>
    <authorization>
      <deny users="*" />
    </authorization>
  </system.web>
</location>

What I find is that I can still access the forum page. This tells me that it is not configured correctly.

Should the path attribute be relative? Should it point to the URL the page is accessing, or the rewritten path? ~/public/public-forum.aspx- This is a virtual path that is overwritten, so neither the direct nor the file exists with these names. Why is this currently not working?

, .

+3
1

edit2: :
, . .

:
mmmh , , ~ ?
, , ~. web.config?
: iis 6 ?

~ , :

<location path="public/public-forum.aspx">
  <system.web>
    <authentication mode="Forms">
      <forms loginUrl="public/login.aspx" />
    </authentication>
    <authorization>
      <deny users="*" />
    </authorization>
  </system.web>
</location>
0

All Articles