472,368 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,368 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 4580
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...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.