Re: Use login control to limit access to certain pages
- From: "Hillbilly" <nobody@xxxxxxxxxxx>
- Date: Fri, 13 Mar 2009 16:15:53 -0500
// web.config
// To allow or deny access to the application to certain users or roles
// use <allow> or <deny> child tags.
<authorization>
<allow roles="Administrators, RegisteredUsers" />
<deny users="*" />
</authorization>
// The following is how its done at the folder level
// Allows unrestricted access to the folder named anonymousAccess
// where login.aspx is located
<location path="anonymousAccess">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="securedAccess">
<system.web>
<authorization>
<allow roles="Administrators, RegisteredUsers" />
<deny users="*" />
</authorization>
</system.web>
</location>
// Will you test yourself and let us know if we can do the following?
<location path="someFolder/someFile.aspx">
<system.web>
<authorization>
<allow roles="Administrators, RegisteredUsers" />
<deny users="*" />
</authorization>
</system.web>
</location>
Otherwise, the HTML in each page has to be modified in each page.
"c676228" <betty@xxxxxxxxxxxxxxxx> wrote in message news:22A07D9A-5176-43AE-88A3-D394B91B8AF6@xxxxxxxxxxxxxxxx
Hi all,
Recently I got a project specify that part of our web site(it was developed
and in production) will be only available to our
authorized users, not to all public site visitors.
I plan to use Membership database in asp.net 2.0. But the question is the
files(pages) are scattered among different directories and they are put in
some directores containing files which don't need protection at all. And
even worse,
some of those files are in the site's root directory which has some files
don't need to protect at all.
So I don't know what I should do with this scenario. Do you have a
suggestion for me?
Thanks,
--
Betty
.
- Follow-Ups:
- Re: Use login control to limit access to certain pages
- From: c676228
- Re: Use login control to limit access to certain pages
- References:
- Use login control to limit access to certain pages
- From: c676228
- Use login control to limit access to certain pages
- Prev by Date: Re: Vista Setup Project - Rights Issue
- Next by Date: Re: Use login control to limit access to certain pages
- Previous by thread: Use login control to limit access to certain pages
- Next by thread: Re: Use login control to limit access to certain pages
- Index(es):
Relevant Pages
|