QUESTION: My ISAPI Filter calls to OnAuthentication function for every
link of every page of the site. But it has to be called once per
session, isn't it?
It happens both in WinNT & 2000 (IIS4,IIS5). Only 'Basic
Authentication' is selected in IIS Directory Security.

What's wrong, please, help!

My code is very simple:

BOOL CIsapiFilter::GetFilterVersion(PHTTP_FILTER_VERSION pVer)
{...
// Set the flags we are interested in
pVer->dwFlags |= SF_NOTIFY_ORDER_LOW //(or HIGH)
| SF_NOTIFY_SECURE_PORT
| SF_NOTIFY_NONSECURE_PORT
| SF_NOTIFY_AUTHENTICATION;
...}

DWORD CIsapiFilter::OnAuthentication(CHttpFilterContext* pCtxt,
PHTTP_FILTER_AUTHENT pAuthent)
{
if ( strcmp(pAuthent->pszUser,"david") == 0 )
{
// We have a match, map to the NT user and password
strcpy( pAuthent->pszUser, "administrator" );
strcpy( pAuthent->pszPassword, "123456" );
return SF_STATUS_REQ_HANDLED_NOTIFICATION;
}
else
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}