-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Vichu
Message 1 in Discussion
Hi all, I want to clear the Eventlog (windows2000) through asp.net using the
following code
strErrorLog="Testing"
Dim log As New EventLog(strErrorLog)
log.Clear()
But the problem is access denied error is coming. How to solve the problem
with thanks in advance
Viswanath
Server Error in '/rnd' Application. Access is denied Description: An unhandled
exception occurred during the execution of the current web request. Please review the
stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: Access is denied
Source Error:
Line 119: Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnClear.Click Line 120: Dim log As New
EventLog(strErrorLog) Line 121: log.Clear() Line 122: End Sub Line 123:End
Class
Source File: C:\Inetpub\wwwroot\rnd\ErrorlogEvent.aspx.vb Line: 121
Stack Trace:
[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.EventLog.Clear() rnd.ErrorlogEvent.btnClear_Click(Object sender,
EventArgs e) in C:\Inetpub\wwwroot\rnd\ErrorlogEvent.aspx.vb:121
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET
Version:1.0.3705.0
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]