473,396 Members | 1,724 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,396 software developers and data experts.

Forms Authentication and Login Pages

Hi,

I am creating a web application which have two different login areas. One
for members and one for administrators. Currently, I am using forms
authentication to validate the login for administrators as shown below. This
works perfectly fine but I now need to add another login authentication for
members which redirects them to a different login page if they are not
authenticated. Does anyone know how I would add this to the web.config file?
<configuration>
<system.web>
<authentication mode="Forms">
<forms name="..admin" path="/" loginUrl="/admin/login.aspx"
protection="All" timeout="30"/>
</authentication>
</system.web>
<location path="admin/documents">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
Thanks,
Dave
Nov 17 '05 #1
1 1764
Could use more info.... but

If you have a separate web application, you can place the security
information inside THAT applications Web.Config file, instead of trying to
do double duty on a single app.

If you are trying to class users as "admin" and "Normal", you can store that
information in the encrypted cookie as the security value, and extract that
value on page-load to verify authorization.
"Dave" <ly*@cambridgemedia.com.au.nospam> wrote in message
news:bY****************@nnrp1.ozemail.com.au...
Hi,

I am creating a web application which have two different login areas. One
for members and one for administrators. Currently, I am using forms
authentication to validate the login for administrators as shown below. This works perfectly fine but I now need to add another login authentication for members which redirects them to a different login page if they are not
authenticated. Does anyone know how I would add this to the web.config file?

<configuration>
<system.web>
<authentication mode="Forms">
<forms name="..admin" path="/" loginUrl="/admin/login.aspx"
protection="All" timeout="30"/>
</authentication>
</system.web>
<location path="admin/documents">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
Thanks,
Dave

Nov 17 '05 #2

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
1
by: MJ | last post by:
I'm building an application that has a file structure similar to the following: /myapp/user_login.aspx /myapp/user_page_1.aspx /myapp/user_page_2.aspx /myapp/user_page_3.aspx...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
2
by: Eric | last post by:
I am trying to build an app where the stuff in the root directory is open to all, but anything under the Restricted directory requires you to login and I want to use Forms to do it. I'm having...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
5
by: Gavin Stevens | last post by:
I'm trying to figure out the ASP.NET Forms Auth I have 3 or 4 pages i want to allow anonymous access to.. Then I have 5 or 6 pages I placed in another directory in the webproject. These I want...
6
by: Manny Chohan | last post by:
I am using forms authetication in the web config. i can validate a user against a database and click on images which makes hidden panels visible.However when i click on the link inside a panel...
1
by: The Eeediot | last post by:
Hello, ASP.NET gurus! I have read many pages on setting up a login screen to access a number of web pages using Forms Authentication and I am still trying to wrap my brain around the whole thing. ...
5
by: Samba | last post by:
Hi, I've a web application and I'm using Forms authentication. My app contains some pages that can be viewed by everyone and it doesn't require any authentication or authoization and these pages...
5
by: Nalaka | last post by:
Hi, I have a asp.net application with forms authentication enabled. Users create private (database driven) messages (pages; like a message board) that is only viewed by logged in users. Now I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.