check if user is the one specified in <location path="...



In an intranet asp.net application I have the following in the web config:

<authentication mode="Windows" />

<location path="AdministrationFolder">
<system.web>
<authorization>
<allow users="John"/>
<allow users="David"/>
<allow users="Eric"/>
<deny users="*"/>
</authorization>
</system.web>
</location>

The "Default.aspx" page is accessible to everybody.
I have a link <a href=Administration.aspx>Administration</a> on this page,
which I need it to be visible only if the user is one of those specified in
"<location path=....>" (If user = in (John, David, Eric) then, display the
link.)



How can I check if the logged user is one of the mentioned users above ?


.



Relevant Pages

  • Blocking Direct URL Access through web config
    ... I also have a web config ... The problem is when I paste the direct URL into the ... the browser, I can gain access to that page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: "Predicting" authorization?
    ... This event is fired immediately after .NET standard ... >>to re-architect our company's intranet in .NET. ... >>authentication and authorization scheme is really ... >>the intranet has the necessary functionality they need. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: authentication mode for specific files?
    ... the web config. ... I have an img tag to an image in ... config file to specify specific files that do not require ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • site redirect?
    ... http://localhost/internet <- private part of same site protected using NT ... Authorization ... Http://internet and http://intranet when someone goes to internet it shows ... when they go to intranet it shows the intranet folder of ...
    (microsoft.public.dotnet.framework.aspnet)
  • Need help with denying access to a folder...
    ... In my web config I have this: ... the forum software that I am using is the old asp so ... Only the Best Freeware at http://www.vbmark.com ...
    (microsoft.public.dotnet.framework.aspnet)