D
D. Shane Fowlkes
I developed and manage an intranet for a small, govt agency. The way it is
set up now is that there is a Function on each and every page that will
capture the NT Log On User ID (b/c they had to log into the Windows network
to even access the intranet) and query against a SQL Server table called
"Staff". Assuming the user is in the table (they should be), it will let
them access the page as normal and it sets a series of session variables
that are used throughout the application such as a "permission score", Full
Name, Active, StaffID, Department and other useful stuff that use throughout
the intranet.
The upside to this is that the user never has to "log in" to the
intranet...they just open up IE. The downside is that it might not be all
that efficient.....pulling and creating a recordset and (re)setting session
variables on each and every page. I've never had any bottlenecking or
strain on the server or IIS but then again, it's a small agency...less than
50 people.
Since I'm overhauling it and moving towards .NET, I've been thinking of a
more efficient way of doing this. I thought about using a global.asax file
and upon the start of the application, pull and create this "Staff"
recordset and store it into an array in an Application Object. That way,
with the request of each and every page, I can just check against that array
to see if they have permission and to see other data I need about the user.
The only downside to this is that the array's recordset would be static and
changes made in the Staff Table wouldn't be shown in the array until the
application is stopped and restarted.
So...to the gurus out there....what would you do? Make the array? Pull
Staff data from SQL Server on each page? Or other?
TIA
--
*********************************
D. Shane Fowlkes - TMM
Saving the world, one web site at a time.
http://www.shanefowlkes.com
*********************************
set up now is that there is a Function on each and every page that will
capture the NT Log On User ID (b/c they had to log into the Windows network
to even access the intranet) and query against a SQL Server table called
"Staff". Assuming the user is in the table (they should be), it will let
them access the page as normal and it sets a series of session variables
that are used throughout the application such as a "permission score", Full
Name, Active, StaffID, Department and other useful stuff that use throughout
the intranet.
The upside to this is that the user never has to "log in" to the
intranet...they just open up IE. The downside is that it might not be all
that efficient.....pulling and creating a recordset and (re)setting session
variables on each and every page. I've never had any bottlenecking or
strain on the server or IIS but then again, it's a small agency...less than
50 people.
Since I'm overhauling it and moving towards .NET, I've been thinking of a
more efficient way of doing this. I thought about using a global.asax file
and upon the start of the application, pull and create this "Staff"
recordset and store it into an array in an Application Object. That way,
with the request of each and every page, I can just check against that array
to see if they have permission and to see other data I need about the user.
The only downside to this is that the array's recordset would be static and
changes made in the Staff Table wouldn't be shown in the array until the
application is stopped and restarted.
So...to the gurus out there....what would you do? Make the array? Pull
Staff data from SQL Server on each page? Or other?
TIA
--
*********************************
D. Shane Fowlkes - TMM
Saving the world, one web site at a time.
http://www.shanefowlkes.com
*********************************