473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Writing to EventLog

I've created a new EventLog for mail services in my web application. Each
time a mail is sent, it is recorded in the eventlog for later review. This
works fine when I am on my development machine (Windows XP Pro), but when I
try to do this on my test server (Windows 2003) I get the security error
message that I don't have the permissions to write to the log.

The EventLog is my own, not one of the base 3 that is in Windows. I saw how
to change the permissions in the registry to allow ASPNET permission to
access the logs, but I don't want that, thus the reason for creating my own
EventLog.

Is there a way to provide permission to ASPNET for specific EventLogs?

Thanks in advance.
Aug 29 '08 #1
2 1287
you need to add your custom eventlog node to the registery and set
permission. as asp.net is not an admin on the test box, you must do this for
it.

-- bruce (sqlwork.com)
"DJ" wrote:
I've created a new EventLog for mail services in my web application. Each
time a mail is sent, it is recorded in the eventlog for later review. This
works fine when I am on my development machine (Windows XP Pro), but when I
try to do this on my test server (Windows 2003) I get the security error
message that I don't have the permissions to write to the log.

The EventLog is my own, not one of the base 3 that is in Windows. I saw how
to change the permissions in the registry to allow ASPNET permission to
access the logs, but I don't want that, thus the reason for creating my own
EventLog.

Is there a way to provide permission to ASPNET for specific EventLogs?

Thanks in advance.
Aug 29 '08 #2
What you could do is create a Class and have that write to your EventLog.
I've done that and its used by an web app and web service and I didn't have
to setup any special permission for it to work.

"DJ" <DJ@discussions.microsoft.comwrote in message
news:1D**********************************@microsof t.com...
I've created a new EventLog for mail services in my web application. Each
time a mail is sent, it is recorded in the eventlog for later review. This
works fine when I am on my development machine (Windows XP Pro), but when
I
try to do this on my test server (Windows 2003) I get the security error
message that I don't have the permissions to write to the log.

The EventLog is my own, not one of the base 3 that is in Windows. I saw
how
to change the permissions in the registry to allow ASPNET permission to
access the logs, but I don't want that, thus the reason for creating my
own
EventLog.

Is there a way to provide permission to ASPNET for specific EventLogs?

Thanks in advance.

Aug 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jacob Colding | last post by:
Hello, I have created a a logging mechanism, that writes mesages to a custom event log. On each check it verifies whether the requested source is registered to the "IPS" log. If not, it changes...
2
by: Scott Vercuski | last post by:
Everyone, I'm having trouble writing an event to the event log. Here is the chunk of code I currently have. ----------------------------------------------------------------------- Private...
5
by: David Conorozzo | last post by:
I am able to create new sources using CreateEventSource. I can call GetEventLogs, I can delete sources, I can see if sources exist BUT, as soon as I try a "WriteEntry", I get an exception: ...
2
by: Marauderz | last post by:
OK this just seems to be a common question being asked around here, I've tried Google Grouping the question but I still haven't came up with a solution yet. So here goes... I'm getting the...
6
by: MattC | last post by:
I have some code that correctly writes to the eventlog on my local machine. I have installed the application on the Live server and all is not well, no event log entries. My development box...
2
by: MattB | last post by:
I'm writing some code to log errors in a web app (vb/asp.net). I found a straightforward-looking example here: http://www.c-sharpcorner.com/Code/2002/May/CustomErrorHandlingASPNEt.asp But mine...
0
by: Karthik Srinivasan | last post by:
Hi, My web application which runs on Windows 2003 server writes to EventLog during application startup but I get the following exception Requested registry access is not allowed. at...
9
by: Jerry C | last post by:
I am trying to write to the errorlog and I am getting the error Cannot open log for source 'Application'. You may not have write access. This is the code: Dim Logevent As New...
10
by: David Thielen | last post by:
Hi; I am trying to write to the event log using: public const string EVENT_LOG_NAME = "Windward Portal"; if (!EventLog.SourceExists(EVENT_LOG_NAME)) EventLog.CreateEventSource(EVENT_LOG_NAME,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.