Hi macwinux-ga,
Unfortunately, it is not possible to directly access ASP
session variables from an ISAPI filter. This is because the ISAPI dll
and the ASP application run in different application contexts.
However, the following article from a backissue of MIND
magazine, describes how you can create a DLL that contains both an
ISAPI interface and a COM object. Within the DLL it is possible to
share variables and values between ISAPI and ASP, and there are
several ways to synchronize the ASP Session object with the ISAPI
interface. You will have to protect the shared variables with
synchronization objects such as mutexes or critical sections. You can
view the article and download the relevant source code from :
- Tips and Tricks for ISAPI Programming
by Christian Gross
[ Microsoft Internet Developer, July 1997]
( http://www.microsoft.com/mind/0797/ISAPItips.asp )
If the above approach doesn't work for you, then you might have to
rethink your strategy for the authentication mechanism. Perhaps the
following articles will help :
- MSDN : Authentication in ASP.NET: .NET Security Guidance
( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/authaspdotnet.asp
)
- MSDN : Fitch & Mather Stocks 2000: Security
( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfmstock/html/fm2ksecurity.asp
)
- DevGuru Tutorials : Web-user Authentication for IIS
( www.devguru.com/features/tutorials/authentication/authentication.html
)
Hope this helps.
If you need any clarifications, just ask!
:)
===========================================
Some Google Groups postings on this issue :
- Subject: HELP!!!! with ISAPI and ASP Session Variables
Newsgroup: microsoft.public.inetserver.iis
( groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=80hu0j%249ro%241%40nnrp1.deja.com
)
- Subject: Integration of ASP and ISAPI-filters, plz. help
Newsgroup: microsoft.public.inetserver.iis
( http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=35d729bf.1612375%40msnews.microsoft.com
)
=======
Google Search Terms Used :
Access ASP-Session variables from an ISAPI filter
Isapi filter asp session authentication mechanism for file
"ISAPI filter" Access ASP "Session variables"
isapi filter to monitor access to website
Google Search terms Used :
Access ASP-Session variables from an ISAPI filter |