P
Paul Hodgson
Is there any way to log someone in using Forms authentication *without*
using RedirectFromLoginPage()?
My reason for asking is that I'm trying to use Forms Authentication to allow
users to login to a site, but I keep coming up against the problem that all
the MS examples show using a Login page that users are redirected to if they
try to access a protected page. Trouble is - our site doesn't really have
protected pages. Any page is accessible to anyone - but if you're not logged
in then the page will show different information from what it will show if
you are logged in. Also, we don't want a separate login page, instead we
want users to be able to login inline with small forms inside other pages.
What this means I think is that I need to be able to do the following
whenever a page is loaded:
1. Check explicitly if the user has been logged in using Forms
Authentication so the code can decide what to display.
2. If appropriate, explicitly log the user in but without redirecting to
anywhere else (if the user has just posted back to the page by filling in a
Login form).
Any pointers on how to do that appreciated
using RedirectFromLoginPage()?
My reason for asking is that I'm trying to use Forms Authentication to allow
users to login to a site, but I keep coming up against the problem that all
the MS examples show using a Login page that users are redirected to if they
try to access a protected page. Trouble is - our site doesn't really have
protected pages. Any page is accessible to anyone - but if you're not logged
in then the page will show different information from what it will show if
you are logged in. Also, we don't want a separate login page, instead we
want users to be able to login inline with small forms inside other pages.
What this means I think is that I need to be able to do the following
whenever a page is loaded:
1. Check explicitly if the user has been logged in using Forms
Authentication so the code can decide what to display.
2. If appropriate, explicitly log the user in but without redirecting to
anywhere else (if the user has just posted back to the page by filling in a
Login form).
Any pointers on how to do that appreciated