473,396 Members | 1,886 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,396 software developers and data experts.

EventLog Access using impersonation in Windows Server 2003

cjk
Issue
Our web application requires access to write to a custom event log, yet access is denied. This access is denied because we are using impersonation, and our end-users do not (should not) have permissions to write to a custom event log. We would like to know if someone out there has resolved this problem without incorporating registry hacks, elevating end-user account permissions to admin OR calling native code to logon as the account running our Application Pool

Ideally, we would like to use our Application Pool account identity to create the event log entries and we do not mind providing the necessary permissions to this accoun

Details
-Web App hosted on Windows 2003 serve
-Web App is using a custom application pool, running under a specified identity
-Web App uses its own (custom) event lo
-Web App uses impersonation, thus we loose the application pool identity when trying to create an event log entr


Nov 18 '05 #1
3 2647
Hopefully this link will provide your answer:
http://support.microsoft.com/?id=329291

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"cjk" <an*******@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Issue:
Our web application requires access to write to a custom event log, yet access is denied. This access is denied because we are using impersonation,
and our end-users do not (should not) have permissions to write to a custom
event log. We would like to know if someone out there has resolved this
problem without incorporating registry hacks, elevating end-user account
permissions to admin OR calling native code to logon as the account running
our Application Pool.
Ideally, we would like to use our Application Pool account identity to create the event log entries and we do not mind providing the necessary
permissions to this account
Details:
-Web App hosted on Windows 2003 server
-Web App is using a custom application pool, running under a specified identity -Web App uses its own (custom) event log
-Web App uses impersonation, thus we loose the application pool identity when trying to create an event log entry

Nov 18 '05 #2
try:

[DllImport("advapi32")] private extern static bool RevertToSelf();

WindowsIdentity id = WindowsIdentity.GetCurrent();
RevertToSelf();

// do your work here

id.Impersonate();
-- bruce (sqlwork.com)
"cjk" <an*******@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Issue:
Our web application requires access to write to a custom event log, yet access is denied. This access is denied because we are using impersonation,
and our end-users do not (should not) have permissions to write to a custom
event log. We would like to know if someone out there has resolved this
problem without incorporating registry hacks, elevating end-user account
permissions to admin OR calling native code to logon as the account running
our Application Pool.
Ideally, we would like to use our Application Pool account identity to create the event log entries and we do not mind providing the necessary
permissions to this account
Details:
-Web App hosted on Windows 2003 server
-Web App is using a custom application pool, running under a specified identity -Web App uses its own (custom) event log
-Web App uses impersonation, thus we loose the application pool identity when trying to create an event log entry

Nov 18 '05 #3

I'm having the same problem. Unfortunately the link provided does not
apply to my situation because I create the EventLog source in my
ASP.NET app installer. The problem is that even after the EventLog
source is created, my ASP.NET app can not log to the custom event
source when running under Windows Server 2003. It works fine under
Windows 2000.

Details:

ASP.NET app
impersonation=true in web.config
can not elevate user accounts to admin group just for logging

Any ideas? I've found several people asking for help with this
situation but no solutions offered.

Scott
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> writes:
Hopefully this link will provide your answer:
http://support.microsoft.com/?id=329291 --
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"cjk" <an*******@discussions.microsoft.com> wrote in message
news:2A**********************************@microso ft.com...
Issue:
Our web application requires access to write to a custom event log, yet

access is denied. This access is denied because we are using impersonation,
and our end-users do not (should not) have permissions to write to a custom
event log. We would like to know if someone out there has resolved this
problem without incorporating registry hacks, elevating end-user account
permissions to admin OR calling native code to logon as the account running
our Application Pool.

Ideally, we would like to use our Application Pool account identity to

create the event log entries and we do not mind providing the necessary
permissions to this account

Details:
-Web App hosted on Windows 2003 server
-Web App is using a custom application pool, running under a specified

identity
-Web App uses its own (custom) event log
-Web App uses impersonation, thus we loose the application pool identity

when trying to create an event log entry


Nov 18 '05 #4

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

Similar topics

1
by: Joe | last post by:
I am trying to read the EventLog of different servers on the network. If I run the script in a command line, it works well. But when I try to put the script into the Web server (IIS in Windows...
2
by: mal hit | last post by:
We developed an ASP.NET application on Windows 2000/SQL Server 2000/IIS 5.0. Recently, we moved the SQL Server 2000 database to Windows 2003. Now, we are unable to connect to the database (on...
5
by: David Conorozzo | last post by:
I am able to create new sources using CreateEventSource. I can call GetEventLogs, I can delete sources, I can see if sources exist BUT, as soon as I try a "WriteEntry", I get an exception: ...
3
by: cjk | last post by:
Issue Our web application requires access to write to a custom event log, yet access is denied. This access is denied because we are using impersonation, and our end-users do not (should not) have...
0
by: Scott Zabolotzky | last post by:
I have an app that writes to a custom event log (which is created at install time with a custom installer DLL). My app writes just fine to this custom log when running on Windows 2000 Server but...
6
by: MattC | last post by:
I have some code that correctly writes to the eventlog on my local machine. I have installed the application on the Live server and all is not well, no event log entries. My development box...
7
by: Rob R. Ainscough | last post by:
I'm having difficulty writing anything to the web servers event log from my web app located on that server. Putting this in my web apps web.config did NOT help - immediate causes and error in my...
3
by: sammyloo | last post by:
Hi all, I'm experiencing a problem using ASP.NET web services to access a different server with SQL Server 2000 database. And I get the error of the following Exception Details:...
2
by: =?Utf-8?B?RWRkaWU=?= | last post by:
Here is my scenario for a problem I can't solve. I am hosting a 3.5 WCF service in IIS on Windows Server 2003. The service works fine with the WCF test client in Visual Studio 2008 and from an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.