Jeff said:
I tried both of your ways, and they both work perfectly.
I prefer Mike's way, simply because I wouldn't have to
change the session("PageWhereAuthFailed") on each page
that is protected.
That technique should work fine unless/until you extend your login to span
multiple applications, technologies, servers or domains.
We built an enterprise-wide session architecture that allows ASP, JSP and
ASP.NET to share sessions (authentication as well as variables). We
authenticate under SSL against an NDS tree[1], and the individual
applications are a mix of SSL and non-SSL, depending on their sensitivity.
As you can imagine, this means the session information is kept in a
database, rather than on the web servers.
The ASP implementation is unsurprisingly the least elegant of the bunch,
as well as the most perturbable. We have distilled it to a
Server.Execute() call for each protected page. If/when you extend your
login and can't figure out how to proceed, post back here and I can
probably offer some suggestions based on lessons learned.
[1] This could just as easily be against AD.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms.