Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How do I give my c# app access to eventlog?

How do I give my c# app access to eventlog?

Scheduled Pinned Locked Moved C#
questioncsharp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Greg Ellis
    wrote on last edited by
    #1

    Hi, I am new to writing windows services with c#. I wrote a windows service that writes to the event log using this code EventLog.WriteEntry(ServiceName + " Service started"); Whenever my service starts it stops stating that it failed due to not having permissions to write to the event log. How can I make sure my windows service has the proper permissions to write the Event Log? Thanks, Greg

    L 1 Reply Last reply
    0
    • G Greg Ellis

      Hi, I am new to writing windows services with c#. I wrote a windows service that writes to the event log using this code EventLog.WriteEntry(ServiceName + " Service started"); Whenever my service starts it stops stating that it failed due to not having permissions to write to the event log. How can I make sure my windows service has the proper permissions to write the Event Log? Thanks, Greg

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      They hide that information in the documentation[^]

      G 1 Reply Last reply
      0
      • L led mike

        They hide that information in the documentation[^]

        G Offline
        G Offline
        Greg Ellis
        wrote on last edited by
        #3

        Well I don't see anything in there that explains why this code works with no problems on my windows vista, windows xp, and windows 2000 machines when run with administrator priviledges, but not on my windows server 2003 box with admin privilges. I guess they left that part out. :\

        L 1 Reply Last reply
        0
        • G Greg Ellis

          Well I don't see anything in there that explains why this code works with no problems on my windows vista, windows xp, and windows 2000 machines when run with administrator priviledges, but not on my windows server 2003 box with admin privilges. I guess they left that part out. :\

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Greg Ellis wrote:

          I guess they left that part out.

          Maybe you write their documentation since you left all that out of your first post. *sigh* See if this helps: http://support.microsoft.com/kb/323076[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups