Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Trouble writing to EventLog

Thread Tools

Trouble writing to EventLog

Eric Johannsen
Posts: n/a
My aspx page can not write to the EventLog "Requested registry access is not
allowed". I have read the posts about ASPNET not having access to create
new event sources, so I created a little installer that pre-creates the
event sources. That installer writes a test entry to the event log for my
source so I can see that it has been created.

Still, the aspx page fails to write to the event log.

Any ideas?




btnWriteEventLog_Click(object sender, System.EventArgs e)
EventLog log = new EventLog();
log.Log = "MyLog";
log.Source = "MySource";
log.WriteEntry("Test", EventLogEntryType.Information);
catch (Exception E)
string s;
s = E.Message; // E.Message contains: "Requested registry access is
not allowed"

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to the EventLog MattC ASP .Net 6 11-02-2004 10:47 PM
Writing to Windows EventLog omoore Perl 0 08-20-2004 01:56 PM
Q : Error While Writing to CUSTOM EventLog Marauderz ASP .Net 2 07-28-2004 06:34 AM
Writing to eventlog from Anders Both ASP .Net 3 02-23-2004 10:35 PM
Writing Events using System.Diagnostics.EventLog... David Conorozzo ASP .Net 5 12-15-2003 04:43 PM