Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / June 2005

Tip: Looking for answers? Try searching our database.

custom event log

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dl - 23 Jun 2005 13:40 GMT
Hi
Has anyone successfully created a custom event log from asp.net / simply
editing the Reg?!  Can you share how, please?!

TIA
Dominick Baier [DevelopMentor] - 23 Jun 2005 14:20 GMT
Hello dl,

there is a EventLog.CreateEventSource() method. But you need administrative
privs to create an Event Source - so it will likely not work from asp.net
directly.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi
> Has anyone successfully created a custom event log from asp.net /
> simply
> editing the Reg?!  Can you share how, please?!
> TIA
dl - 23 Jun 2005 14:37 GMT
Hi Dominick
I am still on 1.1, and will not be using 2.0 in the near future though!

> Hello dl,
>
[quoted text clipped - 11 lines]
> > editing the Reg?!  Can you share how, please?!
> > TIA
Joe Kaplan \(MVP - ADSI\) - 23 Jun 2005 15:33 GMT
What he said applies to both.

Generally with ASP.NET apps, you create your event source as part of the
deployment process and then just write to the event source from the app.  If
the app attempts to create the event source itself, it will generally fail
unless you have configured ASP.NET to run as a local admin which is
generally regarded as a really bad idea.

Joe K.

> Hi Dominick
> I am still on 1.1, and will not be using 2.0 in the near future though!
[quoted text clipped - 15 lines]
>> > editing the Reg?!  Can you share how, please?!
>> > TIA
dl - 23 Jun 2005 16:35 GMT
Hi
But do I get CreateEventSource in 1.1, I can't find it in the SDK doc?  I
can only find the related documentation online and it said supported in .NET
2.0?!

"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> What he said applies to both.
>
[quoted text clipped - 25 lines]
> >> > editing the Reg?!  Can you share how, please?!
> >> > TIA
Dominick Baier [DevelopMentor] - 23 Jun 2005 16:22 GMT
Hello dl,

where did i mention 2.0 ??

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

> Hi Dominick
> I am still on 1.1, and will not be using 2.0 in the near future
[quoted text clipped - 17 lines]
>>> editing the Reg?!  Can you share how, please?!
>>> TIA
dl - 23 Jun 2005 16:51 GMT
Hi Joe / Dominick
Sorry, I found it under 1.1.  I just need to know how to do it in the
deployment process?!  This is my first .NET application!

> Hello dl,
>
[quoted text clipped - 25 lines]
> >>> editing the Reg?!  Can you share how, please?!
> >>> TIA
Joe Kaplan \(MVP - ADSI\) - 23 Jun 2005 20:00 GMT
There are a variety of ways, depending on how you want to do your
deployment.  You might write a simple console app that does this that the
admin runs when they install your app.  You can also be more fancy and
integrate this into a Windows installer package.  Lots of options.

Joe K.

> Hi Joe / Dominick
> Sorry, I found it under 1.1.  I just need to know how to do it in the
[quoted text clipped - 29 lines]
>> >>> editing the Reg?!  Can you share how, please?!
>> >>> TIA
dl - 24 Jun 2005 01:40 GMT
Is there any good reference in showing how to make my own message file
(category / eventID)?
TIA

"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> There are a variety of ways, depending on how you want to do your
> deployment.  You might write a simple console app that does this that the
[quoted text clipped - 36 lines]
> >> >>> editing the Reg?!  Can you share how, please?!
> >> >>> TIA
Joe Kaplan \(MVP - ADSI\) - 24 Jun 2005 01:59 GMT
The only thing I'm aware of is the MSDN platform SDK documentation.  As I
understand it, you need to use the message compiler to do it, but I've never
done it and have no experience with it.

As I understand it, when you create an event source with .NET, you'll get
the standard .NET framework message file associated with it.

Joe K.

> Is there any good reference in showing how to make my own message file
> (category / eventID)?
[quoted text clipped - 41 lines]
>> >> >>> editing the Reg?!  Can you share how, please?!
>> >> >>> TIA
dl - 24 Jun 2005 03:59 GMT
How can we use the standard message file or specifically the Category /
eventID?  Can we customize this standard message file?
TIA
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> The only thing I'm aware of is the MSDN platform SDK documentation.  As I
> understand it, you need to use the message compiler to do it, but I've never
[quoted text clipped - 50 lines]
> >> >> >>> editing the Reg?!  Can you share how, please?!
> >> >> >>> TIA
Joe Kaplan \(MVP - ADSI\) - 24 Jun 2005 05:13 GMT
You are asking the wrong guy (and probably the wrong newsgroup).  I've never
gotten that deep into event log stuff.  The most I've ever done is just
write strings and numbers for eventIDs and that has been all I've needed.

Maybe one of the platform sdk groups?

Joe K.

> How can we use the standard message file or specifically the Category /
> eventID?  Can we customize this standard message file?
[quoted text clipped - 63 lines]
>> >> >> >>> editing the Reg?!  Can you share how, please?!
>> >> >> >>> TIA
dl - 24 Jun 2005 08:21 GMT
I'll try, meanwhile, can you tell me what have you don't?  may be that's all
I need?! what do you mean by "write strings and numbers for eventIDs"?
TIA

"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> You are asking the wrong guy (and probably the wrong newsgroup).  I've never
> gotten that deep into event log stuff.  The most I've ever done is just
[quoted text clipped - 71 lines]
> >> >> >> >>> editing the Reg?!  Can you share how, please?!
> >> >> >> >>> TIA
Joe Kaplan \(MVP - ADSI\) - 24 Jun 2005 14:51 GMT
Generally, what I do is this:

In a separate application run by the admin, do something that calls
EventLog.CreateEventSource like Dominick suggested.  Sometimes this is a
simple app.  Another easy way to do it is to have an EventLogInstaller class
in your assembly and have the admin run InstallUtil.exe on your assembly.
This will run the installer class and create the event source.

Then, from my code, I would have something that simply calls
EventLog.WriteEntry, passing in the source you created in the step above,
the message string, log type and eventID if I wanted to use event IDs.

That is generally enough to get this working.  There are a variety of other
deployment options including MSI and creating your own message files, but
this will give you basic event log functionality.

HTH,

Joe K.
> I'll try, meanwhile, can you tell me what have you don't?  may be that's
> all
[quoted text clipped - 90 lines]
>> >> >> >> >>> editing the Reg?!  Can you share how, please?!
>> >> >> >> >>> TIA

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.