System.ComponentModel.Win32Exception: Access is denied
From: DotNetJunkies User (User_at_-NOSPAM-DotNetJunkies.com)
Date: 10/27/04
- Next message: Valery Pryamikov: "Re: TripleDES crypto service provider questions"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: RSA public key exported to X.509 certificate format"
- Next in thread: Nicole Calinoiu: "Re: System.ComponentModel.Win32Exception: Access is denied"
- Reply: Nicole Calinoiu: "Re: System.ComponentModel.Win32Exception: Access is denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 26 Oct 2004 23:51:08 -0700
hi
while trying to execute the following program i am getting "System.ComponentModel.Win32Exception: Access is denied" as errror message.
<% @Page Language="C#" %>
<% @Import Namespace="System.Diagnostics" %>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e)
{
BindGrid();
}
void LogGrid_Change(Object sender, DataGridPageChangedEventArgs e)
{
// Set CurrentPageIndex to the page the user clicked.
LogGrid.CurrentPageIndex = e.NewPageIndex;
// Rebind the data.
BindGrid();
}
void BindGrid()
{
EventLog aLog = new EventLog();
aLog.Log = "System";
aLog.MachineName = ".";
LogGrid.DataSource = aLog.Entries;
LogGrid.DataBind();
}
</script>
<body bgcolor="#ffffff">
<h3>System Event Log</h3>
<form runat="server">
<asp:DataGrid id="LogGrid" runat="server"
AllowPaging="True"
PageSize="10"
PagerStyle-Mode="NumericPages"
PagerStyle-HorizontalAlign="Right"
PagerStyle-NextPageText="Next"
PagerStyle-PrevPageText="Prev"
OnPageIndexChanged="LogGrid_Change"
BorderColor="black"
BorderWidth="1"
GridLines="Both"
CellPadding="3"
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
AutoGenerateColumns="false">
<Columns>
<asp:BoundColumn HeaderText="TOF" DataField="EntryType" />
<asp:BoundColumn HeaderText="Date/Time" DataField="TimeGenerated"/>
<asp:BoundColumn HeaderText="Source" DataField="Source"/>
<asp:BoundColumn HeaderText="Event ID" DataField="EventID"/>
</Columns>
</asp:DataGrid>
</form>
</body>
</html>
--- Posted using Wimdows.net NntpNews Component - Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
- Next message: Valery Pryamikov: "Re: TripleDES crypto service provider questions"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: RSA public key exported to X.509 certificate format"
- Next in thread: Nicole Calinoiu: "Re: System.ComponentModel.Win32Exception: Access is denied"
- Reply: Nicole Calinoiu: "Re: System.ComponentModel.Win32Exception: Access is denied"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|