K
Keltex
I want to use ASP.NET 2.0 forms authentication for my new website. I have two
different distinct types of user roles... "member" and "admin" each should
have access to the /member and /admin directories respectively.
I can make all that work, but the main question I have is with forms
authentication it seems that you can only have ONE default login form for the
entire application. (loginUrl="~/member/Login.aspx") What I would like is to
be able to redirect the user to a different login form based on which area
they are trying to access. For example if a user goes here
/member/default.aspx and is not authenticated, they would be sent to
/member/login.aspx. Likewise, if they are not authenticated and try to access
/admin/default.aspx, they are sent to the login form at /member/login.aspx.
I assume I need to handle via the AuthenticateRequest or
PostAuthenticateRequest application events, but I have no idea where to
start...
Any ideas?
- BK
different distinct types of user roles... "member" and "admin" each should
have access to the /member and /admin directories respectively.
I can make all that work, but the main question I have is with forms
authentication it seems that you can only have ONE default login form for the
entire application. (loginUrl="~/member/Login.aspx") What I would like is to
be able to redirect the user to a different login form based on which area
they are trying to access. For example if a user goes here
/member/default.aspx and is not authenticated, they would be sent to
/member/login.aspx. Likewise, if they are not authenticated and try to access
/admin/default.aspx, they are sent to the login form at /member/login.aspx.
I assume I need to handle via the AuthenticateRequest or
PostAuthenticateRequest application events, but I have no idea where to
start...
Any ideas?
- BK