Cannot write to event log when web application uses forms authentication
- From: "ndrw_cheung@xxxxxxxx" <ndrw_cheung@xxxxxxxx>
- Date: Mon, 3 Dec 2007 08:44:10 -0800 (PST)
Hi. I have created a web application. When using authentication
mode="Windows", writing to the events log (which I created in a
console application that was run as administrator.) works ok.
However, when I use forms authentication, it doesn't write to the
events log anymore. There are no error messages on the page displayed,
nor in the application log or security log. I have tried the following
(individually and separately), but none of it works (For your
information, the newly created event log name is "MyApp", the
eventSource is also "MyApp").
1. For the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\Eventlog\MyApp, I have granted full control for the user "ASPNET".
Then grant the permission on the file C:\windows\system32\config
\MyApp.evt to be full control for ASPNET.
2. For the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyApp, I
have granted full control for the user "NETWORK SERVICE".
Then grant the permission on the file C:\windows\system32\config
\MyApp.evt to be full control for NETWORK SERVICE.
3. Append the value of the CustomSD key in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyApp
with
(A;;0x3;;;NS)
4. Add in <identity impersonate="true"/> in the web.config
and then append the value of the CustomSD key in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyApp
with
(A;;0x3;;;AU).
Any help is appreciated. Thanks.
-Andrew
.
- Follow-Ups:
- Re: Cannot write to event log when web application uses forms authentication
- From: Henning Krause [MVP - Exchange]
- Re: Cannot write to event log when web application uses forms authentication
- Prev by Date: Re: Setting directory permissions (.NET)
- Next by Date: Re: trust relationship between this workstation and the primary domain
- Previous by thread: Setting directory permissions (.NET)
- Next by thread: Re: Cannot write to event log when web application uses forms authentication
- Index(es):