473,395 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ISA Server Log plugin

Hi,

I want to write a plugin for the MS ISA 2004 Server, so that I can add logs
to the local ISA Server log (in any language). How can I achieve such a
thing? Are there any samples?

Thanks
Peter
Jul 21 '05 #1
2 1608
Hi Peter,

yes this is possible.
Write a filter and register for the SF_NOTIFY_LOG event.
If the event occur you can change the pointer in the PHTTP_FILTER_LOG pLog
structure.

DWORD CLogNotifyFilter::OnLog(CHttpFilterContext *pCtxt, PHTTP_FILTER_LOG
pLog)
{
DebugMsg("Log notification: %s\n", pLog->pszTarget);
// check if this request is for the file name and includes a gif or GIF
extension
if ( strstr (pLog->pszTarget, ".gif") || strstr (pLog->pszTarget,
".GIF") )
{
DebugMsg("Request for the GIF (or gif)\n");
// This is one way of copying empty strings to the corresponding
// log entry. Depending on the log format, empty values will be
// represented as "-" or ,,
strcpy ( (char*)pLog->pszClientHostName, "");
// another way is to just set pointers to NULL
*(char *)pLog->pszClientUserName = NULL;
*(char *)pLog->pszServerName = NULL;
*(char *)pLog->pszOperation = NULL;
*(char *)pLog->pszTarget = NULL;
*(char *)pLog->pszParameters = NULL;
}
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}

Daniel
"Peter Schmitz" <Pe**********@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Hi,

I want to write a plugin for the MS ISA 2004 Server, so that I can add logs to the local ISA Server log (in any language). How can I achieve such a
thing? Are there any samples?

Thanks
Peter

Jul 21 '05 #2
Thanks for answering! Perhaps I put it wrong, but what I actually wanted is
(should be) even more easier: I don't want to edit new logs, but to create my
own and pass it to the ISA Server. Is this also possible?

thanks
Peter
"Daniel Schade (remove NOSPAM.PLEASE for" wrote:
Hi Peter,

yes this is possible.
Write a filter and register for the SF_NOTIFY_LOG event.
If the event occur you can change the pointer in the PHTTP_FILTER_LOG pLog
structure.

DWORD CLogNotifyFilter::OnLog(CHttpFilterContext *pCtxt, PHTTP_FILTER_LOG
pLog)
{
DebugMsg("Log notification: %s\n", pLog->pszTarget);
// check if this request is for the file name and includes a gif or GIF
extension
if ( strstr (pLog->pszTarget, ".gif") || strstr (pLog->pszTarget,
".GIF") )
{
DebugMsg("Request for the GIF (or gif)\n");
// This is one way of copying empty strings to the corresponding
// log entry. Depending on the log format, empty values will be
// represented as "-" or ,,
strcpy ( (char*)pLog->pszClientHostName, "");
// another way is to just set pointers to NULL
*(char *)pLog->pszClientUserName = NULL;
*(char *)pLog->pszServerName = NULL;
*(char *)pLog->pszOperation = NULL;
*(char *)pLog->pszTarget = NULL;
*(char *)pLog->pszParameters = NULL;
}
return SF_STATUS_REQ_NEXT_NOTIFICATION;
}

Daniel
"Peter Schmitz" <Pe**********@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Hi,

I want to write a plugin for the MS ISA 2004 Server, so that I can add

logs
to the local ISA Server log (in any language). How can I achieve such a
thing? Are there any samples?

Thanks
Peter


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Edvard Majakari | last post by:
Hi, My idea is to create a system working as follows: each module knows path to plugin directory, and that directory contains modules which may add hooks to some points in the code. Inspired...
0
by: Edvard Majakari | last post by:
Hi, My idea is to create a system working as follows: each module knows path to plugin directory, and that directory contains modules which may add hooks to some points in the code. Inspired...
2
by: Ron | last post by:
Hello, I'm attempting to develop a plugin framework for an application that I'm working on. I wish to develop something in which all plugins exist in a directory tree. The framework need only...
9
by: jazzslider | last post by:
I have a headache. I've done a LOT of research lately into XForms, and I am thoroughly convinced that a good implementation of this technology would help me immensely in converting my...
7
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.