473,795 Members | 3,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

REPOST: Forms authentication in multiple folders

i have an application that uses forms security to restrict access to a
specific folder. now i need to secure another folder, in the same root, but
redirect those users to another login. imagine, one folder for managers,
another for assistants. no shared options between them, so dont try to
suggest profiles =)

the current configuration uses a web.config file on the root folder with
this structure:

<configuratio n>
<system.web>
..
..
..
<authenticati on mode="Forms">
<forms name="InterMedi a.PaymentsMerch antLogin"
path="/"
loginUrl="manag er/login.aspx"
protection="All "
timeout="10">
</forms>
</authentication>
<identity impersonate = "true"/>
<authorizatio n>
<allow users="*" />
</authorization>
..
..
..
</system.web>
<location path="manager">
<system.web>
<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>
..
..
..
</configuration>

this redirects users to manager/login.aspx to all users trying to conect to
the /mananger folder.

now i need to secure another directory. i want to redirect users conecting
to /affiliates to affiliates/login.aspx.

if i use a different <location> section i get an
error.

what should i do?
Nov 18 '05 #1
1 1843
"Harley" <harleyobrien%4 0hotmail.com> wrote in message
news:uJ******** ******@tk2msftn gp13.phx.gbl...
i have an application that uses forms security to restrict access to a
specific folder. now i need to secure another folder, in the same root, but redirect those users to another login. imagine, one folder for managers,
another for assistants. no shared options between them, so dont try to
suggest profiles =)

the current configuration uses a web.config file on the root folder with
this structure:

<configuratio n>
<system.web>
.
.
.
<authenticati on mode="Forms">
<forms name="InterMedi a.PaymentsMerch antLogin"
path="/"
loginUrl="manag er/login.aspx"
protection="All "
timeout="10">
</forms>
</authentication>
<identity impersonate = "true"/>
<authorizatio n>
<allow users="*" />
</authorization>
.
.
.
</system.web>
<location path="manager">
<system.web>
<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>
.
.
.
</configuration>

this redirects users to manager/login.aspx to all users trying to conect to the /mananger folder.

now i need to secure another directory. i want to redirect users conecting
to /affiliates to affiliates/login.aspx.

if i use a different <location> section i get an
error.

what should i do?


You should either use two separate web applications, or you should use the
same login page for both kinds of users.
--
John Saunders
John.Saunders at SurfControl.com
Nov 18 '05 #2

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

Similar topics

6
4842
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 Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
1
3511
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The web.config file is configured as such: <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" name="myApplication"/> </authentication>
4
2656
by: MR. UNDERHILL | last post by:
I want to use forms authentication on my website. Looking at the documentation, I create a sample site for testing. One of my requirements is to ensure that SOME pages required an authenticated user and some others, like the home page is not required. I specified the <deny users="?" /> on the web.config, but this is causing ALL pages require the authentication. How can I mix both, without loosing the web.config setup? I know that I can...
2
1426
by: Thomas Scheiderich | last post by:
I am trying to set up forms authentication in my IIS pages. I have a folder inside of my root folder I am trying to protect and I am getting an error when a page in the folder is accessed. The error is: **************************************************************************** **** Server Error in '/' Application. ----------------------------------------------------------------------------
6
1423
by: dhnriverside | last post by:
Hi there I'm using Windows Authentication to automatically recognise users in my web app. However, I want directory to be password protected, so if they try to visit the page in there, they MUST enter their password in a Windows Login style popup (FOrms AUthentication). I think I need to out another web.config in the directory with authentication set to Forms? But how do I query the info received by forms in AD? OR do I even need to,...
2
2416
by: Joe Rigley | last post by:
Help Please! I've been tasked with converting a portion of the corporate web site that currently utilizes local user accounts and NTFS via Basic Authentication to access certain files on the web site to an ASP .NET Forms Authentication approach with SQL Server. I'm just getting comfortable with ASP .Net, but strong in Classic ASP.
4
2577
by: sunniyeow | last post by:
Hi, My question is regarding password protecting 2 different folders inside a single virtual directory using forms authentication method. Easier if I illustrate things out... - <authentication mode="Forms"> - Virtual Directory aka Top Level Root = /mysite - Inside /mysite I have 2 sub-folders which I want to password protect = /adminonly and /memberonly - /adminonly is assigned to a single Admin user with a hard-coded pair of username...
1
2052
by: lecnac | last post by:
Sorry for the repost. I must have done something wrong when I tried to post my reply (I can't seem to find it). Anyway, I'd really appreciate any help that anyone could provide. My issue is quickly becoming more and more urgent. Thanks for the thoughts Bruce. However, we can't do #1 (we must use Integrated Windows Authentication). And, can't do #2 (the server will be,
3
7220
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a web application that I started building. I created a master page with some javascript in the head: <script src="<%# Request.ApplicationPath%>/Scripts/Main.js" type="text/javascript"></script> I am also using themes and set my default theme in webconfig: <pages theme="Default"> <controls>
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.