Woohoo, my favorite topic!
Find the file "machine.config" somewhere stashed under c:\winnt.
Find the entry in it that looks like
<processModel ... />
Change the userName="machine" attribute to userName="SYSTEM" so it
looks something like:
<processModel userName="SYSTEM" ... />
Boom! Instant aspnet_wp.exe access and huge security vulnerability!
And yes, the VS .NET beta 2 installation had something to do with
aspnet_wp.exe user having admin permissions already.
HTH,
- Chuck
-----Original Message-----
From: agamble@t... [mailto:agamble@t...]
Sent: Wednesday, June 05, 2002 7:14 PM
To: ASPX_Professional
Subject: [aspx_professional] Re: Writing to the Event Log and security
errors
If I were to have to give the aspnet user appropriate admin rights, what
would I need to do. Would I need to apply these rights to the
Iusr_<machinename> account or would it be the ASPNet (worker process
account). What permissions would I need to assign. I can't understand why
on another server this works fine and I have cetainly not configured any
permision settings on that server. (although initially on the other server
I had installed visual studio.net beta 2. plus also installed a lot of the
microsoft samples.)
Thanks
> It's basically saying that the aspnet user does not have *create*
privilages to your event log. The easiest way around this is to manually
create the event log (not within your code, but actually open up the event
viewer and create a new log manually. name it appropriately.) now write
to
it in your code (be sure to specify the log you just created as the
source)
as you tried below and you should not have a problem.
However, this is not a good colution if you have or will have numerous
servers, but it's better, IMO, than giving the aspnet user admin rights so
the log can be created via code.
----Original Message Follows----
From: agamble@t...
Reply-To: "ASPX_Professional" <aspx_professional@p...>
To: "ASPX_Professional" <aspx_professional@p...>
Subject: [aspx_professional] Writing to the Event Log and security errors
Date: Wed, 5 Jun 2002 22:44:37
Hi,
Can anyone help with this. I am trying to write to a custom event log from
an asp.net application but am getting the error message below when trying
to call the CreateEventSource method.
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.
Exception Details: System.Security.SecurityException: Requested registry
access is not allowed.
Source Error:
Line 33: ' Create the source, if it does not already exist.
Line 34: If Not EventLog.SourceExists("MySource") Then
Line 35: EventLog.CreateEventSource("MySource", "MyNewLog")
Line 36: End If
Line 37:
How do I get round this, it works fine on another machine but not on a
newly formatted windows 2000 server machine I am trying to set the
application up on.
Thanks
Tony
_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com