ISAPI FILTER ON ISA SERVER
-
Is there anybody who can help me by developping an ISAPI FILTER on a ISA SERVER 2000, please????? :(( :eek:
Thats a lot of help to ask for on a Discussion forum. Still I can try, if you care. Due Regards Mahendra
-
Thats a lot of help to ask for on a Discussion forum. Still I can try, if you care. Due Regards Mahendra
Hi Mahendra, are you ready for my questions? so, let's start: FIRST QUESTION: How can I get the client's browser's session ID? For each browser does an ID exist? SECOND QUESTION I would like to know why the following code for the event OnAuthComplete is not working; I have already declared the method and caught the notification (SF_NOTIFY_AUTH_COMPLETE: dwRet = OnAuthComplete(pfc, (PHTTP_FILTER_AUTH_COMPLETE_INFO))pvNotification); : HANDLE TokenHandle = (HANDLE)1; DWORD dwLen = 0; PTOKEN_USER pTokenUser = NULL; DWORD dwErr; char name[MAX_NAME], domain[MAX_NAME]; // Get user token. if ( pAuthCompInfo->GetUserToken(pfc,&TokenHandle) ) { // Get token information size. if ( !GetTokenInformation(TokenHandle,TokenUser,NULL,dwLen,&dwLen) ) { dwErr = GetLastError(); if ( ERROR_INSUFFICIENT_BUFFER == dwErr ) { // Alocate buffer for token information. pTokenUser = (PTOKEN_USER)GlobalAlloc(GPTR,dwLen); dwErr = S_OK; } } // Now get the actual token information. if ( dwErr != S_OK || !GetTokenInformation(TokenHandle, TokenUser,pTokenUser,dwLen,&dwLen) ) { return WriteIntoFile(pfc, "Evento OnAuthComplete: ERRORE 1"); } else // We have the token information in hand. { // Extract from the token information - the SID. SID *pSid = (SID *)pTokenUser->User.Sid; DWORD dwNLen = MAX_NAME, dwDLen = MAX_NAME; SID_NAME_USE eUse; // Get the user name and the domain from the SID. if (!LookupAccountSid(NULL,pSid,name,&dwNLen,domain,&dwDLen,&eUse) ) { return WriteIntoFile(pfc, "Evento OnAuthComplete: ERRORE 2"); } else { return WriteIntoFile(pfc, "Evento OnAuthComplete: User name:" + *name); // name buffer contains user name. // domain buffer contains user domain. } } } SQLPOINTER sp = name; long userID = GetUserID(sp); return WriteIntoFile(pfc, "Evento OnAuthComplete: "); } WriteIntoFile is a method that write into a file and I have already tested it and it works well. I have other question but I start just with the two first question. Thanks a lot.:)