Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Multiple login forms in one web application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sergey Kuleshov - 12 Mar 2008 17:56 GMT
Hello all!

Is there any way I can have two different login areas in one web
application? I have user portal, to which customers can login and I have
admin panel. Using roles doesn’t really help here, cause customers and
admins are entirely different entities. Furthermore design of their login
pages will be different.

I know that forms authentication doesn’t support this natively, but
probably there is a known pattern?

Thank you!
Cowboy (Gregory A. Beamer) - 12 Mar 2008 18:15 GMT
I would separate the logic into two applications, even if the URLs end up looking something like:

http://mysite.com/admin
http://mysite.com/customer

You may also have a top level application, from a logical point of view:

http://mysite.com

Hope this helps

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!                                                            |
*************************************************
 Hello all!

 

 Is there any way I can have two different login areas in one web application? I have user portal, to which customers can login and I have admin panel. Using roles doesn’t really help here, cause customers and admins are entirely different entities. Furthermore design of their login pages will be different.

 

 I know that forms authentication doesn’t support this natively, but probably there is a known pattern?

 

 Thank you!
Sergey Kuleshov - 12 Mar 2008 18:26 GMT
I’d really like to avoid this, as the applications will share a number of
web user controls.

I would separate the logic into two applications, even if the URLs end up
looking something like:

http://mysite.com/admin

http://mysite.com/customer

You may also have a top level application, from a logical point of view:

http://mysite.com

Hope this helps

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Cowboy (Gregory A. Beamer) - 12 Mar 2008 18:54 GMT
Roles are then your best option, even if you have to set up a custom provider to handle the roles. Find common elements of admin and customer and put in a class that both are inherited from. You can then cast as customer or provider, as needed. This may not be an option if they have nothing in common, however.

You can logically separate the branches, using folders, and set up a factor that returns either the parent class or even an object. The farther up the stack you go, the more generic, and the more you will have to test to make sure you are not killing yourself.

If none of these options work, you are going to write a lot of code to handle whether a person is a customer or admin. One option, that might work, is a user object that stores either a customer or admin and can return either object, depending on the user's role.

If none of those work, you are back to writing a lot of code.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!                                                            |
*************************************************
 I’d really like to avoid this, as the applications will share a number of web user controls.

 

 

 I would separate the logic into two applications, even if the URLs end up looking something like:

 

 http://mysite.com/admin

 http://mysite.com/customer

 

 You may also have a top level application, from a logical point of view:

 

 http://mysite.com

 

 Hope this helps

 --
 Gregory A. Beamer
 MVP, MCP: +I, SE, SD, DBA

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.