System.Security.SecurityException: Requested registry access is no

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default System.Security.SecurityException: Requested registry access is no

    Using Web Service to raise Event, for Enterpise Instrumentation (EIF) to
    write to Application Log (in event viewer). I just reimaged my pC - so trying
    to get it set up - I had it setup before using Win 2000 and don't remember
    hitting this error. Now I'm on XP Pro, and seeing:
    Error loading an Event Sink of type
    'Microsoft.ApplicationBlocks.Logging.EventSinks.Lo gEventSink,
    Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0,
    Culture=neutral, PublicKeyToken=da59d79eb5fd8f1a'. The Event Source of name
    'Application' will not write events out to this Event Sink. The following
    exception was returned during the load:

    System.Reflection.TargetInvocationException: Exception has been thrown by
    the target of an invocation. ---> System.Security.SecurityException:
    Requested registry access is not allowed.
    at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    at System.Diagnostics.EventLog.FindSourceRegistration (String source,
    String machineName, Boolean readOnly)
    at System.Diagnostics.EventLog.SourceExists(String source, String
    machineName)
    at System.Diagnostics.EventLog.SourceExists(String source)
    at
    Microsoft.ApplicationBlocks.Logging.EventSinks.Log EventSink.CreateEventSource()
    at
    Microsoft.ApplicationBlocks.Logging.EventSinks.Log EventSink..ctor(IDictionary
    parameters, EventSource eventSource)
    --- End of inner exception stack trace ---


    Please assists - Thanks.
    I've heard I shouldn't make ASPNET ID administrator for security reasons, so
    I don't want to go that route.

    WHat can I do?

    Thanks,
    Tim
    Verizon

    Tim Guest

  2. Similar Questions and Discussions

    1. System.Security.SecurityException Error
      Hello All, I have built and deployed a .NET web service to a web server . Then, I created a C# console application wrapper around this web...
    2. System.Security.SecurityException: Security error
      Dear All, The problem or error which I am getting while running my web application is as given below: Security Exception Description: The...
    3. System.Security.SecurityException: Request failed
      Hello, I want to run an existing .Net 1.0 project on .Net 1.1. The exception description is as follows: Description: The application attempted to...
    4. System.Security.SecurityException: Request failed.
      Could you paste the code that's in Page_load? -- Abdellah Elamiri ..net Developer Efficacy through simplicity "Luke Sanderlin"...
    5. 'Requested registry access is not allowed.' error
      Hi, i am trying to write to event log from my aspx application that is using windows authentication. All my users would be 'Domain Users'. I am...
  3. #2

    Default RE: System.Security.SecurityException: Requested registry access is no

    Other symptom is getting 2035 when trying to read MQ under this web service.
    Both issues I didn't have before. ....

    "Tim Reynolds" wrote:
     
    Tim Guest

  4. #3

    Default Re: System.Security.SecurityException: Requested registry access is no

    You need to ensure that the event source is registered under an admin
    account before you attempt to write to it from a low-privilege account. If
    this is your development machine, just run a little console app under an
    admin account to create the event log source. This requires only one line
    of code: System.Diagnostics.EventLog.CreateEventSource("Sou rceName",
    "LogName"). Registration of the event source should also be added to your
    application's installer, which would presumably be run under an admin
    account.



    "Tim Reynolds" <microsoft.com> wrote in message
    news:com... 


    Nicole Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139