473,287 Members | 3,286 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,287 software developers and data experts.

How to implement multiple login forms?

Is there a way to implement multiple login forms for ASP.NET applications?
With our application we want to implement simple login form
for normal resources (downloadable files), but more rigorous login forms
for tasks like administration and configuration. The current ASP.NET seems
only to
allow to a single login form via the authentication element in web.config
in the root directory.

One work-around for our problem is implementing a directory dependent
login forms which displays different content depending on the ReturnUrl
query parameter. This solution will become really messy if the application
become for complex. It there a more elegant alternative to this work-around?
Thanks in advance

James X. Li

Nov 18 '05 #1
2 4640
Hi James:

Well, it depends on how you organize your application(s). To IIS and
ASP.NET, each virtual directory can be treated as its own application, with
its own web.config file, so if your application design requires multiple
levels of authentication, you might consider using multiple virtual
directories. One major downside to this approach is that, by design, you
can't include .ascx files from other applications (e.g., a common header or
footer, for example), but it's an option nonetheless.

If that doesn't work for you, you'll have to implement some kind of
permission-checking model of your own, on top of the one provided with
ASP.NET. I've done this by storing a cookie called "memberID", for example,
and with each page request, after checking the corresponding memberType
value in my database, determining whether the requesting user has permission
to access each individual page or page object. It's a little more involved,
of course, but it's not really that complicated.

I'm almost positive these are your only two options. Perhaps others will be
able to shed more light.

Hope it helps,
Chris

"James X. Li" <do*********@abc.net> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Is there a way to implement multiple login forms for ASP.NET applications?
With our application we want to implement simple login form
for normal resources (downloadable files), but more rigorous login forms
for tasks like administration and configuration. The current ASP.NET seems only to
allow to a single login form via the authentication element in web.config
in the root directory.

One work-around for our problem is implementing a directory dependent
login forms which displays different content depending on the ReturnUrl
query parameter. This solution will become really messy if the application
become for complex. It there a more elegant alternative to this work-around?

Thanks in advance

James X. Li

Nov 18 '05 #2
It just occurred to me I answered a question you didn't ask! Sorry about
that. I'll read more carefully next time.

I don't believe there is more than one destination for the login-form
setting in web.config; I believe there is only one location, and you're
probably correct in approaching the solution in the way you're doing so now.
Aside from that, the multiple-virtual-directory approach I mentioned in my
previous post is probably your only other option.

Cheers,
Chris

"James X. Li" <do*********@abc.net> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Is there a way to implement multiple login forms for ASP.NET applications?
With our application we want to implement simple login form
for normal resources (downloadable files), but more rigorous login forms
for tasks like administration and configuration. The current ASP.NET seems only to
allow to a single login form via the authentication element in web.config
in the root directory.

One work-around for our problem is implementing a directory dependent
login forms which displays different content depending on the ReturnUrl
query parameter. This solution will become really messy if the application
become for complex. It there a more elegant alternative to this work-around?

Thanks in advance

James X. Li

Nov 18 '05 #3

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

Similar topics

6
by: R. Rajesh Jeba Anbiah | last post by:
Q: How to implement a login system? A: Use sessions. When the user logins, store the session id in the database and then compare the current session id with the one stored in the database on every...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
1
by: JC | last post by:
I have several applications that use forms authentication and they are currently setup to use a single login page. Everything works fine under v1.0 of the framework and everything works fine if I...
1
by: Harley | last post by:
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,...
1
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...
8
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
1
by: Maziar Aflatoun | last post by:
Hi everyone, I have a website that requires 2 separate sections to be password protected (/admin and /admin2) so that for ex. once the user in /admin2 is authenticated he/she can then view...
1
by: cab0san | last post by:
I have several applications all on the same server. I would like them to all use the same login page. Example: http://server1/customers/app1.aspx http://server1/suppliers/byregion/app2.aspx ...
2
by: Steve | last post by:
I'm looking for feedback on an authentication solution we are considering for an ASP.NET 2.0 project. The site will be accessed by both internal users who are logged into the Windows domain, and...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.