I've tried unsuccessfully for the past two days to get my web application to write to a custom event log. I can write to the log if I create a console app. and run it as an Administrator, but it doesn't work from inside a web application.
I have impersonation=true, so everything is running under the IUSR_machinename account. I've given this account rights to the registry key, the custom event log's .evt file, etc. Even if I make the IUSR account a member of the Administrators group, I cannot write to the log. I get the error:
I used Regmon and Filemon to see what was going on...
I don't know what the buffer overflow is about, and I don't know why the registry is looking under the Application log when I specify "AspNet" as the log and "Enterprise Library Logging Service" as the source (I created the log and the source as an admin, so I know they exist).
Any ideas? I've done a lot more, but I want to see what suggestions any of you may have... thanks!
anonim
I have impersonation=true, so everything is running under the IUSR_machinename account. I've given this account rights to the registry key, the custom event log's .evt file, etc. Even if I make the IUSR account a member of the Administrators group, I cannot write to the log. I get the error:
Code:
[Win32Exception (0x80004005): Access is denied]
[InvalidOperationException: Cannot open log for source {0}. You may not have write access.]
I used Regmon and Filemon to see what was going on...
Code:
Filemon:
w3wp.exe:4008 OPEN D:\Inetpub\BETA\Survey\test.aspx SUCCESS Options: Open Access: All
w3wp.exe:4008 QUERY SECURITY D:\Inetpub\BETA\Survey\test.aspx BUFFER OVERFLOW
w3wp.exe:4008 QUERY SECURITY D:\Inetpub\BETA\Survey\test.aspx SUCCESS
w3wp.exe:4008 CLOSE D:\Inetpub\BETA\Survey\test.aspx SUCCESS
Regmon:
w3wp.exe:4008 OpenKey HKLM\SYSTEM\ControlSet001\Services\EventLog\Application SUCCESS
w3wp.exe:4008 OpenKey HKLM\SYSTEM\ControlSet001\Services\EventLog\Application\Enterprise Library Logging Service NOT FOUND
w3wp.exe:4008 CloseKey HKLM\SYSTEM\ControlSet001\Services\EventLog\Application SUCCESS
w3wp.exe:4008 OpenKey HKLM\SYSTEM\ControlSet001\Services\EventLog\AspNet SUCCESS
w3wp.exe:4008 OpenKey HKLM\SYSTEM\ControlSet001\Services\EventLog\AspNet\Enterprise Library Logging Service SUCCESS
w3wp.exe:4008 CloseKey HKLM\SYSTEM\ControlSet001\Services\EventLog SUCCESS
w3wp.exe:4008 CloseKey HKLM\SYSTEM\ControlSet001\Services\EventLog\AspNet\Enterprise Library Logging Service SUCCESS
w3wp.exe:4008 CloseKey HKLM\SYSTEM\ControlSet001\Services\EventLog\AspNet SUCCESS
I don't know what the buffer overflow is about, and I don't know why the registry is looking under the Application log when I specify "AspNet" as the log and "Enterprise Library Logging Service" as the source (I created the log and the source as an admin, so I know they exist).
Any ideas? I've done a lot more, but I want to see what suggestions any of you may have... thanks!
anonim