RE: Event Log & Security
From: Michael Green (mikegreonline@microsoft.com)
Date: 10/05/02
- Next message: Willy Denoyette [MVP]: "Re: Impersonate in ASP.NET and Server Timer - FileSystemWatcher"
- Previous message: jdn: "Re: Impersonate in ASP.NET and Server Timer - FileSystemWatcher"
- In reply to: Craig Wagner: "Event Log & Security"
- Next in thread: Michael Green: "RE: Event Log & Security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: mikegreonline@microsoft.com (Michael Green) Date: Sat, 05 Oct 2002 00:31:16 GMT
Craig,
I'm looking into this issue and will get back to you asap.
Thanks,
Michael Green
Microsoft Developer Support
--------------------
| From: "Craig Wagner" <craig_d_wagner@yahoo.com>
| Subject: Event Log & Security
| Date: Wed, 2 Oct 2002 09:00:27 -0700
| Lines: 26
| Organization: Communi(k), Inc.
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <#rTPryiaCHA.1308@tkmsftngp12>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| NNTP-Posting-Host: 198.36.173.1
| Path: cpmsftngxa09!cpmsftngxa08!tkmsftngp01!tkmsftngp12
| Xref: cpmsftngxa09 microsoft.public.dotnet.framework.aspnet.security:2431
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| I've read several threads talking about the EventLog.SourceExists method
and
| having to give permissions to the account under which the ASP.NET helper
| process is running.
|
| I thought I'd try a different approach, but after reading all the docs I
| don't understand why this isn't working:
|
| RegistryPermission permit = new RegistryPermission(
| RegistryPermissionAccess.AllAccess,
| @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog" );
| permit.Assert();
| if (isAppEventLogEnabled && EventLog.SourceExists(appEventSource,
| appEventLogServerName))
| EventLog.WriteEntry(appEventSource, asMsg, aEntryType, (int)aeEvent);
| RegistryPermission.RevertAssert();
|
| The first two lines execute without throwing any error, but I continue to
| get a SecurityException when it executes the EventLog.SourceExists.
|
| As I said, I've read the threads and I know the suggested solution(s), so
I
| don't need assistance on how to get this to work, I need to understand why
| it doesn't.
|
| Thanks.
|
|
|
- Next message: Willy Denoyette [MVP]: "Re: Impersonate in ASP.NET and Server Timer - FileSystemWatcher"
- Previous message: jdn: "Re: Impersonate in ASP.NET and Server Timer - FileSystemWatcher"
- In reply to: Craig Wagner: "Event Log & Security"
- Next in thread: Michael Green: "RE: Event Log & Security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|