Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   Web App Accesing eventlogs (http://www.velocityreviews.com/forums/t766383-web-app-accesing-eventlogs.html)

Rabia [Xavor] 08-04-2004 08:01 AM

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
http://msdn.microsoft.com/library/de...l/THCMCh09.asp

any suggestions wld be great help


MattC 08-09-2004 02:41 PM

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
>

http://msdn.microsoft.com/library/de...us/dnnetsec/ht
ml/THCMCh09.asp
>
> any suggestions wld be great help
>





All times are GMT. The time now is 08:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.