Access to registery

Discussion in 'ASP .Net Security' started by A.M, Jan 16, 2004.

  1. A.M

    A.M Guest

    Hi,
    When i call :

    System.Diagnostics.EventLog.WriteEntry(string);

    ASP.NET says :

    System.Security.SecurityException: Requested registry access is not allowed.

    What kind of permission should i give to ASPNET user?

    Thanks,
    Ali
     
    A.M, Jan 16, 2004
    #1
    1. Advertising

  2. Hi Ali,

    Thank you for using MSDN Newsgroup! My name is Steven, and I'll be
    assisting you on this issue.
    From your description, you encountered the
    "System.Security.SecurityException: Requested registry access is not
    allowed."
    exception when try to add eventlog via
    "System.Diagnostics.EventLog.WriteEntry(string);" in ASP.NET application.
    If there is anything I misunderstood, please feel free to let me know.

    Based on my research, this seem to be a common issue which is due to :
    By default, the user token of the ASP.NET worker process is ASPNET (or
    NetworkService for applications that run on Internet Information Services
    [IIS] 6.0). The problem in the "Symptoms" section occurs because your
    account does not have the correct user rights to create an event source.

    Also, there is a KB article which has provided the solution on this issue,
    you may check it out to see whether it helps:
    #PRB: "Requested Registry Access Is Not Allowed" Error Message When ASP.NET
    Application Tries to Write New EventSource in the EventLog

    http://support.microsoft.com/?id=329291

    If you have need any further assistance, please feel free to let me know.


    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Jan 17, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. luican
    Replies:
    3
    Views:
    12,282
    Aaron W. West
    Jun 4, 2004
  2. david
    Replies:
    2
    Views:
    1,630
    Ken Cox [Microsoft MVP]
    Nov 24, 2003
  3. Guest
    Replies:
    2
    Views:
    544
    Guest
    Feb 2, 2004
  4. Amar More
    Replies:
    1
    Views:
    392
    EdUarDo
    Jan 14, 2005
  5. SaqibKhan

    Error accessing the system registery

    SaqibKhan, Aug 23, 2008, in forum: Python
    Replies:
    1
    Views:
    303
    Steven D'Aprano
    Aug 23, 2008
Loading...

Share This Page