EventLog access through ASP.Net app

EventLog access through ASP.Net app

Post by JimN » Thu, 27 Nov 2003 05:37:23


I have an ASP.Net app for which I want to be able to log
events to the Windows 2000 server event log under a special
log name. I encountered the initial security exceptionwhen
I first tried this in code and then did some research on
the subject. I think I've found two seperate ways to
accomplish what I want to do:
1. Use "sandboxing" by writing a class library in a
strong-named assembly that I install in the GAC which I
then call into from my ASP.Net app.
2. Use wrapped Win32 API calls to perform impersonation,
which, I understand, requires that I grant "Act as Part of
Operating system" priviledge to the ASPNET user.

Which do the users of this group suggest I use for the best
security and portability to other, possibly new, Windows
servers?
 
 
 

EventLog access through ASP.Net app

Post by Jeff » Thu, 27 Nov 2003 13:43:31

The easiest way is to just create the event log application as part of your
installation. You do this by editing the registry and adding a key with the
name of the application to
HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application. You can find
more info about doing this here:

http://www.yqcomputer.com/ ;en-us;329291

Jeff

 
 
 

EventLog access through ASP.Net app

Post by Juri Zenke » Fri, 28 Nov 2003 00:20:22

Im exactly in same situation - trying to get EventLog & RegistryKey to be
working for network computers: "access denied", because the WindowsIdentity
passed to me does not have LOGON32_LOGON_NETWORK_CLEARTEXT flag... And I
can't create my own identity, because at runtime I don't know credentials of
the user, who uses my asp.net application...