Y
Yitzhak
I am having "Permission denied" error while calling
LogEvent method of WScript.Shell component.
Basically, ASP page calls Windows Script Host Shell
component to log events to the OS Application Event log.
My environment:
Windows Server 2003, IIS 6, WSH, Classic ASP, Vbscript
Below is the code and the error:
Code:
**********************************
call LogEvent(0, "some text")
Function LogEvent(intEventType, strEventMessage)
Set objWshShell = Server.CreateObject("WScript.Shell")
call objWshShell.LogEvent(intEventType, strEventMessage)
Set objWshShell = Nothing
End Function
**********************************
Error:
**********************************
Microsoft VBScript runtime error '800a0046'
Permission denied
**********************************
I made the change below based on 301309 KB article to no
avail.
"...Set the following Registry key to 0 instead of 1, and
then restart your computer for the changes to take effect.
HKLM\System\CurrentControlSet\Services\EventLog\Application
Name: RestrictGuestAccess
Type: REG_DWORD"
I guess Windows Server 2003 configuration is a reason for
the error. Everything worked fine on Win2K server with IIS
5.0
LogEvent method of WScript.Shell component.
Basically, ASP page calls Windows Script Host Shell
component to log events to the OS Application Event log.
My environment:
Windows Server 2003, IIS 6, WSH, Classic ASP, Vbscript
Below is the code and the error:
Code:
**********************************
call LogEvent(0, "some text")
Function LogEvent(intEventType, strEventMessage)
Set objWshShell = Server.CreateObject("WScript.Shell")
call objWshShell.LogEvent(intEventType, strEventMessage)
Set objWshShell = Nothing
End Function
**********************************
Error:
**********************************
Microsoft VBScript runtime error '800a0046'
Permission denied
**********************************
I made the change below based on 301309 KB article to no
avail.
"...Set the following Registry key to 0 instead of 1, and
then restart your computer for the changes to take effect.
HKLM\System\CurrentControlSet\Services\EventLog\Application
Name: RestrictGuestAccess
Type: REG_DWORD"
I guess Windows Server 2003 configuration is a reason for
the error. Everything worked fine on Win2K server with IIS
5.0