473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error Reading the Security Log

Tom
I am getting this error when I try and read the events in the Security log.

A required privilege is not held by the client!

My web site is set up as Integrated Authentication and in my web.config I
have the following
<identity impersonate="true" />

Since I am an Admin on my box and on the domain, why can't ASP.NET C# code
read my security log?

Here is my code:

EventLog aLog = new EventLog();
aLog.Entries;
string sLogName = DDLEventLog.SelectedItem.Value.ToString();
aLog.Log = sLogName;
aLog.MachineName = Environment.MachineName;
LogGrid.DataSource = aLog.Entries;
* LogGrid.DataBind();

* is where the error occurs when I try and bind the results from the log to
a grid.
Thanks

Tom
Nov 17 '05 #1
3 1884
Tom:

If you are running on Windows 2000, the following KB article may be
relevant.

http://support.microsoft.com/default...b;en-us;810204

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"Tom" <To*@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
I am getting this error when I try and read the events in the Security log.

A required privilege is not held by the client!

My web site is set up as Integrated Authentication and in my web.config I
have the following
<identity impersonate="true" />

Since I am an Admin on my box and on the domain, why can't ASP.NET C# code
read my security log?

Here is my code:

EventLog aLog = new EventLog();
aLog.Entries;
string sLogName = DDLEventLog.SelectedItem.Value.ToString();
aLog.Log = sLogName;
aLog.MachineName = Environment.MachineName;
LogGrid.DataSource = aLog.Entries;
* LogGrid.DataBind();

* is where the error occurs when I try and bind the results from the log to
a grid.
Thanks

Tom
Nov 17 '05 #2

"Tom" <To*@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
I am getting this error when I try and read the events in the Security log.

A required privilege is not held by the client!

My web site is set up as Integrated Authentication and in my web.config I
have the following
<identity impersonate="true" />

Since I am an Admin on my box and on the domain, why can't ASP.NET C# code
read my security log?

Here is my code:

EventLog aLog = new EventLog();
aLog.Entries;
string sLogName = DDLEventLog.SelectedItem.Value.ToString();
aLog.Log = sLogName;
aLog.MachineName = Environment.MachineName;
LogGrid.DataSource = aLog.Entries;
* LogGrid.DataBind();

* is where the error occurs when I try and bind the results from the log
to
a grid.
Thanks

Tom


Make sure you are effectively impersonating an Administrator.

Willy.

Nov 17 '05 #3

"Tom" <To*@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Willy:

Can you elaborate on your comment?

What exactly do you mean when you say "Make sure you are effectively
impersonating an Administrator"?

I'm not sure what to change?

Also, I am running under windows 2000 Server.

"Willy Denoyette [MVP]" wrote:


Did you check the current principal's identity name?

WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
String username = wp.Identity.Name;

What happens if you run your code (part of) as administrator from a console
application?

Willy.


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael | last post by:
Hi Everyone, Please help me on this one. I have the following function: Public Sub SearchFor(ByRef mType As Module1.SearchForType, ByRef mValue As String) On Error GoTo Err_Handler Dim Proc As...
1
by: DBC User | last post by:
Hi, I am using MTOM and WSE 2.0 and trying to upload a file which is almost 70MB (big). I have setup the timeout to a good size and file size limit to 100MB in the server. The uploading is...
2
by: Brent K | last post by:
Ok, I have an internal intranet website created in visual studio 2005, c#. It was running fine for months, and then all of the sudden a few days I started getting these errors emailed to me (I have...
0
by: zoobave | last post by:
Hi, When i give "apt-get update" command, i got the following errors. How can i resolve it? root@dvm-desktop:/home/dvm# apt-get update Get:1 http://security.ubuntu.com feisty-security...
1
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.