Event logging on IIS

Event logging on IIS

am 09.08.2007 18:10:05 von PaulS

I have a CGI application that I need to implement event logging for. I know
the security on IIS 6 has been significantly increased over IIS 5 but I can't
figure out what I need to do to get event logging to work. Here is what I
have discovered so far:

IIS 5 (From a DLL run by the CGI task )
I can register a source and using a message DLL write Events the Application
log.
I can not create a custom log in the registry.
With a small exe, I can create a custom log in the registry.
I can register a source and using a message DLL write Events to the Custom
log.

IIS 6 (same DLL an CGI as above)
Outside of IIS, I can do all the normal event logging stuff.
From the CGI DLL, nothing shows up in the event log. Nothing shows up in
any log (HTTPERR, W3SVC1 or any other log I can find)
My messages not showing up in the event log are one thing, but I'm a little
surprised that no log entry appears stating that someone is attempting to
write to the event log.

In any case, I would guess there is a way to create a custom event log from
IIS and write events to it. If I have to create the custom log outside of
IIS, I can live with that but I definitely need to be able to write to the
event log.

If someone can point me to documentation that describes how to do this, or
better yet tell my how to do it, that would be great.

Thanks,

PaulS

Re: Event logging on IIS

am 12.08.2007 07:09:41 von Steve Schofield

Looks like you can order a book on Amazon.
http://www.microsoft.com/technet/archive/iis4/reskit/iis40rg /iisrkapa.mspx?mfr=true
Maybe the book has the CD.

--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield



"PaulS" wrote in message
news:E63A67BA-47D7-49CC-A0DC-49094D596702@microsoft.com...
>I have a CGI application that I need to implement event logging for. I
>know
> the security on IIS 6 has been significantly increased over IIS 5 but I
> can't
> figure out what I need to do to get event logging to work. Here is what I
> have discovered so far:
>
> IIS 5 (From a DLL run by the CGI task )
> I can register a source and using a message DLL write Events the
> Application
> log.
> I can not create a custom log in the registry.
> With a small exe, I can create a custom log in the registry.
> I can register a source and using a message DLL write Events to the Custom
> log.
>
> IIS 6 (same DLL an CGI as above)
> Outside of IIS, I can do all the normal event logging stuff.
> From the CGI DLL, nothing shows up in the event log. Nothing shows up in
> any log (HTTPERR, W3SVC1 or any other log I can find)
> My messages not showing up in the event log are one thing, but I'm a
> little
> surprised that no log entry appears stating that someone is attempting to
> write to the event log.
>
> In any case, I would guess there is a way to create a custom event log
> from
> IIS and write events to it. If I have to create the custom log outside of
> IIS, I can live with that but I definitely need to be able to write to the
> event log.
>
> If someone can point me to documentation that describes how to do this, or
> better yet tell my how to do it, that would be great.
>
> Thanks,
>
> PaulS

Re: Event logging on IIS

am 12.08.2007 14:48:00 von PaulS

Thanks. I'll check into that. However, I used an MSDN "incident" and was
told that in IIS 6, whatever account the Event Log is being written from must
have administrative privileges. I changed the ACL for IUSR for Event Log and
everything now works.

Paul S.

"Steve Schofield" wrote:

> Looks like you can order a book on Amazon.
> http://www.microsoft.com/technet/archive/iis4/reskit/iis40rg /iisrkapa.mspx?mfr=true
> Maybe the book has the CD.
>
> --
>
> Best regards,
>
> Steve Schofield
> Windows Server MVP - IIS
> http://weblogs.asp.net/steveschofield
>
>
>
> "PaulS" wrote in message
> news:E63A67BA-47D7-49CC-A0DC-49094D596702@microsoft.com...
> >I have a CGI application that I need to implement event logging for. I
> >know
> > the security on IIS 6 has been significantly increased over IIS 5 but I
> > can't
> > figure out what I need to do to get event logging to work. Here is what I
> > have discovered so far:
> >
> > IIS 5 (From a DLL run by the CGI task )
> > I can register a source and using a message DLL write Events the
> > Application
> > log.
> > I can not create a custom log in the registry.
> > With a small exe, I can create a custom log in the registry.
> > I can register a source and using a message DLL write Events to the Custom
> > log.
> >
> > IIS 6 (same DLL an CGI as above)
> > Outside of IIS, I can do all the normal event logging stuff.
> > From the CGI DLL, nothing shows up in the event log. Nothing shows up in
> > any log (HTTPERR, W3SVC1 or any other log I can find)
> > My messages not showing up in the event log are one thing, but I'm a
> > little
> > surprised that no log entry appears stating that someone is attempting to
> > write to the event log.
> >
> > In any case, I would guess there is a way to create a custom event log
> > from
> > IIS and write events to it. If I have to create the custom log outside of
> > IIS, I can live with that but I definitely need to be able to write to the
> > event log.
> >
> > If someone can point me to documentation that describes how to do this, or
> > better yet tell my how to do it, that would be great.
> >
> > Thanks,
> >
> > PaulS
>
>

Re: Event logging on IIS

am 13.08.2007 06:25:02 von Steve Schofield

Hi Paul,

My information was meant for another post. Thank you for posting your
solution. It'll definitely helps someone down the road.

--

Best regards,

Steve Schofield
Windows Server MVP - IIS
http://weblogs.asp.net/steveschofield

http://www.IISLogs.com
Log archival solution.
Install, Configure, Forget

"PaulS" wrote in message
news:20D5005F-5694-4C86-8C22-782A488A9240@microsoft.com...
> Thanks. I'll check into that. However, I used an MSDN "incident" and was
> told that in IIS 6, whatever account the Event Log is being written from
> must
> have administrative privileges. I changed the ACL for IUSR for Event Log
> and
> everything now works.
>
> Paul S.
>
> "Steve Schofield" wrote:
>
>> Looks like you can order a book on Amazon.
>> http://www.microsoft.com/technet/archive/iis4/reskit/iis40rg /iisrkapa.mspx?mfr=true
>> Maybe the book has the CD.
>>
>> --
>>
>> Best regards,
>>
>> Steve Schofield
>> Windows Server MVP - IIS
>> http://weblogs.asp.net/steveschofield
>>
>>
>>
>> "PaulS" wrote in message
>> news:E63A67BA-47D7-49CC-A0DC-49094D596702@microsoft.com...
>> >I have a CGI application that I need to implement event logging for. I
>> >know
>> > the security on IIS 6 has been significantly increased over IIS 5 but I
>> > can't
>> > figure out what I need to do to get event logging to work. Here is
>> > what I
>> > have discovered so far:
>> >
>> > IIS 5 (From a DLL run by the CGI task )
>> > I can register a source and using a message DLL write Events the
>> > Application
>> > log.
>> > I can not create a custom log in the registry.
>> > With a small exe, I can create a custom log in the registry.
>> > I can register a source and using a message DLL write Events to the
>> > Custom
>> > log.
>> >
>> > IIS 6 (same DLL an CGI as above)
>> > Outside of IIS, I can do all the normal event logging stuff.
>> > From the CGI DLL, nothing shows up in the event log. Nothing shows up
>> > in
>> > any log (HTTPERR, W3SVC1 or any other log I can find)
>> > My messages not showing up in the event log are one thing, but I'm a
>> > little
>> > surprised that no log entry appears stating that someone is attempting
>> > to
>> > write to the event log.
>> >
>> > In any case, I would guess there is a way to create a custom event log
>> > from
>> > IIS and write events to it. If I have to create the custom log outside
>> > of
>> > IIS, I can live with that but I definitely need to be able to write to
>> > the
>> > event log.
>> >
>> > If someone can point me to documentation that describes how to do this,
>> > or
>> > better yet tell my how to do it, that would be great.
>> >
>> > Thanks,
>> >
>> > PaulS
>>
>>