Web App Accesing eventlogs

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Web App Accesing eventlogs

    Hi All
    I'm badly stick with this issue. My Web App needs to right into the system event log.
    But when ever this attempted the following error shows up
    ++++++++++++++++++stack trace+++++++++++++++++
    Win32Exception (0x80004005): Access is denied]

    [InvalidOperationException: Cannot open log for source {0}. You may not have write access.]
    System.Diagnostics.EventLog.OpenForWrite() +367
    System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category, EventLogEntryType type, String[] strings, Byte[] rawData) +280
    System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +462
    System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +68
    System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category) +21
    System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID) +15
    Xavor.Logger.writeEntry(String source, String className, String[] message, EventLogEntryType entryType, overloadTypeEnum overloadType)
    Xavor.Logger.LogException(Exception ex)
    Virgin.LPS.Administration.Security.GetUserInfo(Str ing AdminGroup, String UserGroup) in F:\BiztalkRTM\Development\Reporting\Virgin.LPS.Adm inistration\Security.cs:96
    Virgin.LPS.Administration.LP_Manager.Page_Load(Obj ect sender, EventArgs e) in F:\BiztalkRTM\Development\Reporting\Virgin.LPS.Adm inistration\LP_Manager.aspx.cs:65
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +750
    +++++++++++++++++++++++++++++++++++++++++++++
    I have tried sandboxing the code but this web app still fails. The refrence for
    sandboxing the code was taken from the following resource
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh09.asp[/url]

    any suggestions wld be great help

    Rabia [Xavor] Guest

  2. Similar Questions and Discussions

    1. [7.4.1] signal 11 while accesing DB
      Hi, Yesterday morning one of our PostgreSQL engines stopped unexpectedly, with the following log: postgres: LOG: server process (PID 26678)...
    2. Accesing XML Attribute in a binding...
      Hi All.. I have a data grid which is populated from a XMLConnector, Part of the schema is <Latitude Dir="N">40.928004637</Latitude> when...
    3. Accesing hash of hashes
      Hello: I am trying to create and access a multidimensional hash. For example the following works ====== $route {$routeDest} = $cost ; print...
    4. Accesing embedded controls
      Hi, I've a DropDownList in the header part of a template column, but I can't learn what value is selected with it. Here is my code: ...
    5. accesing php script in a different port
      hi to all, I want to develop a system that can be access in a different port of the web (such as in Port 11000). But i dont know how to do this...
  3. #2

    Default Re: Web App Accesing eventlogs

    Have you checked that the user your Webapplication is running as has
    priviledges to write to the event log.
    "Rabia [Xavor]" <RabiaXavor@discussions.microsoft.com> wrote in message
    news:0F2FE8EF-D7FF-4AF9-8FEC-3F94387EE712@microsoft.com...
    > Hi All
    > I'm badly stick with this issue. My Web App needs to right into the system
    event log.
    > But when ever this attempted the following error shows up
    > ++++++++++++++++++stack trace+++++++++++++++++
    > Win32Exception (0x80004005): Access is denied]
    >
    > [InvalidOperationException: Cannot open log for source {0}. You may not
    have write access.]
    > System.Diagnostics.EventLog.OpenForWrite() +367
    > System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category,
    EventLogEntryType type, String[] strings, Byte[] rawData) +280
    > System.Diagnostics.EventLog.WriteEntry(String message,
    EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +462
    > System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +68
    > System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID, Int16 category) +21
    > System.Diagnostics.EventLog.WriteEntry(String source, String message,
    EventLogEntryType type, Int32 eventID) +15
    > Xavor.Logger.writeEntry(String source, String className, String[]
    message, EventLogEntryType entryType, overloadTypeEnum overloadType)
    > Xavor.Logger.LogException(Exception ex)
    > Virgin.LPS.Administration.Security.GetUserInfo(Str ing AdminGroup,
    String UserGroup) in
    F:\BiztalkRTM\Development\Reporting\Virgin.LPS.Adm inistration\Security.cs:96
    > Virgin.LPS.Administration.LP_Manager.Page_Load(Obj ect sender, EventArgs
    e) in
    F:\BiztalkRTM\Development\Reporting\Virgin.LPS.Adm inistration\LP_Manager.asp
    x.cs:65
    > System.Web.UI.Control.OnLoad(EventArgs e) +67
    > System.Web.UI.Control.LoadRecursive() +35
    > System.Web.UI.Page.ProcessRequestMain() +750
    > +++++++++++++++++++++++++++++++++++++++++++++
    > I have tried sandboxing the code but this web app still fails. The
    refrence for
    > sandboxing the code was taken from the following resource
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht[/url]
    ml/THCMCh09.asp
    >
    > any suggestions wld be great help
    >

    MattC Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139