Home All Groups Group Topic Archive Search About

ASP.NET writing to EventLog in Server 2003

Author
16 Mar 2006 3:20 PM
mwieder
Hi - we've got an ASP.NET 2.0 application that needs to write to the
event log (an already created source).  The code works fine on XP but
on 2003 throws an access denied exception on EventLog.WriteEntry.  I've
played around with the CustomSD string as suggested by several other
posts, but I can't get by the error.  The only thing which works for me
(and is not a solution for us due to our relationship with security) is
to run the website as Integrated Windows Authentication instead of the
default Anonymous access.  Our web.config is set to <identity
impersonate="true"/>.  How can I get the ASP.NET application to run
with anonymous access and still be abel to write to the eventlog?  Is
there some other addition to the CustomSD string?  (I've tried
A;;0x0002;;;AU and even A;;0x0002;;;WD)
thanks!

Author
16 Mar 2006 2:35 PM
Dominick Baier [DevelopMentor]
Hi,

why do you need to impersonate the anonymous user??


---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Hi - we've got an ASP.NET 2.0 application that needs to write to the
> event log (an already created source).  The code works fine on XP but
> on 2003 throws an access denied exception on EventLog.WriteEntry.
> I've
> played around with the CustomSD string as suggested by several other
> posts, but I can't get by the error.  The only thing which works for
> me
> (and is not a solution for us due to our relationship with security)
> is
> to run the website as Integrated Windows Authentication instead of the
> default Anonymous access.  Our web.config is set to <identity
> impersonate="true"/>.  How can I get the ASP.NET application to run
> with anonymous access and still be abel to write to the eventlog?  Is
> there some other addition to the CustomSD string?  (I've tried
> A;;0x0002;;;AU and even A;;0x0002;;;WD)
> thanks!