473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Let login page protect all but one page.

Right now I have my login.aspx protects all the pages in
my web application. This is done through the following
configuration:
<authentication mode="Forms">
<forms name="MyWeb" path="/" loginUrl="Login.aspx"
protection="All" timeout="30">
</forms>
</authentication>

But now what I need is to exclude one page from this
protection. In another word, if a use try to open this
page without login, he/she will be allowed. For all the
other pages, however, it still act the same way before --
he/she get redirected to the login page.

How do I do this one page exclution?

Thanks
Nov 18 '05 #1
2 2497
This was asked not too long ago, here is the discussion

http://groups.google.com/groups?hl=e...gbl%26rnum%3D1

"feng" <an*******@discussions.microsoft.com> wrote in message
news:a4****************************@phx.gbl...
Right now I have my login.aspx protects all the pages in
my web application. This is done through the following
configuration:
<authentication mode="Forms">
<forms name="MyWeb" path="/" loginUrl="Login.aspx"
protection="All" timeout="30">
</forms>
</authentication>

But now what I need is to exclude one page from this
protection. In another word, if a use try to open this
page without login, he/she will be allowed. For all the
other pages, however, it still act the same way before --
he/she get redirected to the login page.

How do I do this one page exclution?

Thanks

Nov 18 '05 #2
the <location> tag in the Web.config will do this for you.
Simply put something like this after the </system.web> tag.

<location path="somepage.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"feng" <an*******@discussions.microsoft.com> wrote in message
news:a4****************************@phx.gbl...
Right now I have my login.aspx protects all the pages in
my web application. This is done through the following
configuration:
<authentication mode="Forms">
<forms name="MyWeb" path="/" loginUrl="Login.aspx"
protection="All" timeout="30">
</forms>
</authentication>

But now what I need is to exclude one page from this
protection. In another word, if a use try to open this
page without login, he/she will be allowed. For all the
other pages, however, it still act the same way before --
he/she get redirected to the login page.

How do I do this one page exclution?

Thanks

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
0
by: denis | last post by:
Hello I've to password protect some sections of my site; I'm going to use forms authentication mode Following is my website map root -> Artists (folder) -> login.aspx
1
by: Philippe Meunier | last post by:
My web.config looks like this concerning login : <authentication mode="Forms"> <forms loginUrl="frmLogin.aspx" timeout="20" /> </authentication> <authorization>
3
by: Kenneth Keeley | last post by:
Hi, If I setup part of my web site to require users to login can I keep some pages that are related only to that section of the site availble to all users. Example, I have a different section...
1
by: sharp2037 | last post by:
Hi Everyone, I am working on an ASP.net application and I have a homepage to which everyone visits of course and on that front page I have a user ID and password box and a login button. What...
9
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a...
7
by: Alan Silver | last post by:
Hello, Sorry this is a bit wordy, but it's a pretty simple question... I have a web site, http://domain/ which is a public site, part of which (http://domain/a/) is protected by forms...
7
by: Samuel Shulman | last post by:
Is there a method that will indicate the person who logged successfully is Logged and therefore allowed to browse freely other then using the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.