Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms authentication

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I need to perform forms authentication from two folders in my application.

My first login is from the homepage located in the root folder. (index.aspx) - for clients

My second login is also from a different page located in the root folder. (sitemanager.aspx) - to login to the CMS

I understand you can only declare one forms authentication in a web.config file?

I have tried putting the sitemanager.aspx into another folder and setting that folder as an application to allow me to have another web.config file but this still isnt working. I get the machine.config error. Can't have .... beyond root level

Any ideas how else I could construct my application


 
why do you need 2 entry points for authentication? either way you are authenticating a user to log into the system. from there you just authorize whether a user has permission to resources.

your other option is to maintain 2 distinct systems. a read-only view for the clients and another web application to for site admins to manage the client views.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
because a user will use their account number as a login.

sitemanager doesnt really have an account number.

and their landing page will be different
 
in the context of authentication it's a username and password. whether the username is an email address, account number or some other identifier it doesn't matter.

you can control the landing page after authentication. it doesn't have to be hard coded into the web.config file.
Code:
if(user is authenticated)
{
  redirect to user landing page
}
or
Code:
if(user is authenticated)
{
  if(user is site admin)
  {
     redirect to cms landing page
  }
  else
  {
     redirect to client landing page
  }
}


Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top