Hi,
I've mined Google through and through and dug up a million articles over a few days now. Nothing helped, especially not Microsoft documents.
I'm trying to use WSH objects from ASP code in order to write messages to the application event log. Logging on as administrator does the job, though using the IIS's user (IUSR_Whatever) or any other member of the guests group fails everytime due to lack of permissions.
I'm using plain old ASP (not .NET). And it's installed on IIS-6, Windows 2003.
My code looks as following:
-------------------------------------------------------------------------
<%@ Language=VBScript %>
<HTML>
<BODY>
<%
'Use these Constants to designate the type of Event Log.
const SUCCESS = 0
const ERROR = 1
const WARNING = 2
const INFORMATION = 4
const AUDIT_SUCCESS = 8
const AUDIT_FAILURE = 16
dim sessionID
sessionID = session.sessionID
dim WshShell
set WshShell = Server.CreateObject("WScript.Shell")
wshshell.Logevent AUDIT_SUCCESS, "Event logged successfully for session number "&sessionID
set wshshell=nothing
Response.write "Event logged successfully for session number "&sessionID
Session.Abandon
%>
</BODY>
</HTML>
-----------------------------------------------------------------------
No matter what changes I've made in registry, using SDDL permissions, security policy, permissions to event log file itself, it doesn't work
Seems like no change to CustomSD works in registry.
My CustomSID key looks like this:
O:BAG:SYD

D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0x f0007;;;SY)(A;;0x7;;;BA)(A;;0x7;;;SO)(A;;0x3;;;IU) (A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x2;;; S-1-5-21-1444055606-3596881769-3846073516-1007)
whereas S-1-5-21-1444055606-3596881769-3846073516-1007 is the user I use to run the script.
Is there something I'm missing here ?
Thank you very much to whoever answers my riddle.