473,804 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="tr ue" />

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.Sel ectedItem.Value .ToString();
aLog.Log = sLogName;
aLog.MachineNam e = Environment.Mac hineName;
LogGrid.DataSou rce = aLog.Entries;
* LogGrid.DataBin d();

* 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 1895
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*@discussion s.microsoft.com > wrote in message
news:A4******** *************** ***********@mic rosoft.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="tr ue" />

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.Sel ectedItem.Value .ToString();
aLog.Log = sLogName;
aLog.MachineNam e = Environment.Mac hineName;
LogGrid.DataSou rce = aLog.Entries;
* LogGrid.DataBin d();

* 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*@discussion s.microsoft.com > wrote in message
news:A4******** *************** ***********@mic rosoft.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="tr ue" />

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.Sel ectedItem.Value .ToString();
aLog.Log = sLogName;
aLog.MachineNam e = Environment.Mac hineName;
LogGrid.DataSou rce = aLog.Entries;
* LogGrid.DataBin d();

* 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*@discussion s.microsoft.com > wrote in message
news:49******** *************** ***********@mic rosoft.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?

WindowsPrincipa l wp = new WindowsPrincipa l(WindowsIdenti ty.GetCurrent() );
String username = wp.Identity.Nam e;

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
1395
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 String Dim conStr as string = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Inventory;Data Source=SQLSERVER;" Dim con as SqlConnection = new SqlConnection(conStr) Dim cmd as SqlCommand
1
9307
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 coming through T3 pipe. Even with all the changes, I get a 'out of memory' error. Can someone help? In my code, I am reading the file into a byte array. I don't think reading the byte array has any problem.
2
6166
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 it set up to email me exceptions). Here is the error. I have gotten this error probably 100 times in the last 2 days. I have googled this error to no avail. My program is not doing any decrypting, I am not on a web farm, I have reset the web...
0
1871
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 Release.gpg Ign http://security.ubuntu.com feisty-security/main Translation-en_IN Get:2 http://in.archive.ubuntu.com feisty Release.gpg Ign http://in.archive.ubuntu.com feisty/main Translation-en_IN Ign http://security.ubuntu.com...
1
7118
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 someone who bothers to read all of it have some pointers. Note, I have posted the stack trace and the code exhibiting the problem further down so if you want to start by reading that, search for +++ Also note that I am unable to reproduce...
0
10599
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10347
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6863
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.