Security Exception with Enterprise Library Data Block

Discussion in 'ASP .Net' started by Jonathan Crawford, Dec 8, 2005.

  1. [SecurityException: Requested registry access is not allowed.]
    Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    +473


    Hi

    I have installed the enterprise library on a development machine and created
    a project
    on our webserver. When I run a simple data access page I get an error
    message. Apparently
    this is well documented and to do with the permissions on the server as
    asp.net tries to do something
    to the event log. This is dotnet 2003

    The ms fix is a registry hack. However there is no way i can ever persuade
    an ISP to do that,
    so it is out of the question. I have googled myself blind without finding
    out much more.

    The question is, has anyone ever solved this without fixing the server
    security or should
    I dump the whole enterprise library.

    I would be grateful for any help

    thanks

    jonathan








    ===============
    Jonathan Crawford

    ===============
     
    Jonathan Crawford, Dec 8, 2005
    #1
    1. Advertising

  2. Jonathan Crawford

    Bruce Barker Guest

    for any application to log to the eventlog, it needs a registery key created
    (.../EventLog/Application/yourAppName), and access to that key. if the key
    doesn't exist, it attempts to create it, but usually it will not have write
    access to the parent key.

    if your isp allows access to the eventlog, then they should create the key,
    and give you an appname. if not, then you should not log errors to the
    eventlog (disable the eventlog sink).


    -- bruce (sqlwork.com)

    "Jonathan Crawford" <> wrote in message
    news:%23MvwhxB$...
    > [SecurityException: Requested registry access is not allowed.]
    > Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    > +473
    >
    >
    > Hi
    >
    > I have installed the enterprise library on a development machine and
    > created a project
    > on our webserver. When I run a simple data access page I get an error
    > message. Apparently
    > this is well documented and to do with the permissions on the server as
    > asp.net tries to do something
    > to the event log. This is dotnet 2003
    >
    > The ms fix is a registry hack. However there is no way i can ever persuade
    > an ISP to do that,
    > so it is out of the question. I have googled myself blind without finding
    > out much more.
    >
    > The question is, has anyone ever solved this without fixing the server
    > security or should
    > I dump the whole enterprise library.
    >
    > I would be grateful for any help
    >
    > thanks
    >
    > jonathan
    >
    >
    >
    >
    >
    >
    >
    >
    > ===============
    > Jonathan Crawford
    >
    > ===============
    >
     
    Bruce Barker, Dec 8, 2005
    #2
    1. Advertising

  3. Thanks Bruce

    trouble is I have no idea what the event log sink is
    nor how to disable it.

    As far as I know the only code I am using
    accesses the data block, I have no wish for it to do
    anything with the event log. These enterprise blocks
    seem to be doing it by themsleves.


    thanks

    jonathan

    --
    ===============
    Jonathan Crawford

    ===============
    "Bruce Barker" <> wrote in message
    news:eHv615B$...
    > for any application to log to the eventlog, it needs a registery key
    > created (.../EventLog/Application/yourAppName), and access to that key. if
    > the key doesn't exist, it attempts to create it, but usually it will not
    > have write access to the parent key.
    >
    > if your isp allows access to the eventlog, then they should create the
    > key, and give you an appname. if not, then you should not log errors to
    > the eventlog (disable the eventlog sink).
    >
    >
    > -- bruce (sqlwork.com)
    >
    > "Jonathan Crawford" <> wrote in message
    > news:%23MvwhxB$...
    >> [SecurityException: Requested registry access is not allowed.]
    >> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    >> +473
    >>
    >>
    >> Hi
    >>
    >> I have installed the enterprise library on a development machine and
    >> created a project
    >> on our webserver. When I run a simple data access page I get an error
    >> message. Apparently
    >> this is well documented and to do with the permissions on the server as
    >> asp.net tries to do something
    >> to the event log. This is dotnet 2003
    >>
    >> The ms fix is a registry hack. However there is no way i can ever
    >> persuade an ISP to do that,
    >> so it is out of the question. I have googled myself blind without finding
    >> out much more.
    >>
    >> The question is, has anyone ever solved this without fixing the server
    >> security or should
    >> I dump the whole enterprise library.
    >>
    >> I would be grateful for any help
    >>
    >> thanks
    >>
    >> jonathan
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> ===============
    >> Jonathan Crawford
    >>
    >> ===============
    >>

    >
    >
     
    Jonathan Crawford, Dec 8, 2005
    #3
  4. Jonathan Crawford

    Morgan Guest

    You'll need to go into the configuration block and remove some of the
    compiler directives, one of which is "WMI" or similar.


    "Jonathan Crawford" <> wrote in message
    news:OoNzRQC$...
    > Thanks Bruce
    >
    > trouble is I have no idea what the event log sink is
    > nor how to disable it.
    >
    > As far as I know the only code I am using
    > accesses the data block, I have no wish for it to do
    > anything with the event log. These enterprise blocks
    > seem to be doing it by themsleves.
    >
    >
    > thanks
    >
    > jonathan
    >
    > --
    > ===============
    > Jonathan Crawford
    >
    > ===============
    > "Bruce Barker" <> wrote in message
    > news:eHv615B$...
    >> for any application to log to the eventlog, it needs a registery key
    >> created (.../EventLog/Application/yourAppName), and access to that key.
    >> if the key doesn't exist, it attempts to create it, but usually it will
    >> not have write access to the parent key.
    >>
    >> if your isp allows access to the eventlog, then they should create the
    >> key, and give you an appname. if not, then you should not log errors to
    >> the eventlog (disable the eventlog sink).
    >>
    >>
    >> -- bruce (sqlwork.com)
    >>
    >> "Jonathan Crawford" <> wrote in message
    >> news:%23MvwhxB$...
    >>> [SecurityException: Requested registry access is not allowed.]
    >>> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    >>> +473
    >>>
    >>>
    >>> Hi
    >>>
    >>> I have installed the enterprise library on a development machine and
    >>> created a project
    >>> on our webserver. When I run a simple data access page I get an error
    >>> message. Apparently
    >>> this is well documented and to do with the permissions on the server as
    >>> asp.net tries to do something
    >>> to the event log. This is dotnet 2003
    >>>
    >>> The ms fix is a registry hack. However there is no way i can ever
    >>> persuade an ISP to do that,
    >>> so it is out of the question. I have googled myself blind without
    >>> finding out much more.
    >>>
    >>> The question is, has anyone ever solved this without fixing the server
    >>> security or should
    >>> I dump the whole enterprise library.
    >>>
    >>> I would be grateful for any help
    >>>
    >>> thanks
    >>>
    >>> jonathan
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> ===============
    >>> Jonathan Crawford
    >>>
    >>> ===============
    >>>

    >>
    >>

    >
    >
     
    Morgan, Dec 8, 2005
    #4
  5. Jonathan Crawford

    Bruce Barker Guest

    the data block is built on the logging block. read documentation of the
    logging block.

    -- bruce (sqlwork.com)


    "Jonathan Crawford" <> wrote in message
    news:OoNzRQC$...
    > Thanks Bruce
    >
    > trouble is I have no idea what the event log sink is
    > nor how to disable it.
    >
    > As far as I know the only code I am using
    > accesses the data block, I have no wish for it to do
    > anything with the event log. These enterprise blocks
    > seem to be doing it by themsleves.
    >
    >
    > thanks
    >
    > jonathan
    >
    > --
    > ===============
    > Jonathan Crawford
    >
    > ===============
    > "Bruce Barker" <> wrote in message
    > news:eHv615B$...
    >> for any application to log to the eventlog, it needs a registery key
    >> created (.../EventLog/Application/yourAppName), and access to that key.
    >> if the key doesn't exist, it attempts to create it, but usually it will
    >> not have write access to the parent key.
    >>
    >> if your isp allows access to the eventlog, then they should create the
    >> key, and give you an appname. if not, then you should not log errors to
    >> the eventlog (disable the eventlog sink).
    >>
    >>
    >> -- bruce (sqlwork.com)
    >>
    >> "Jonathan Crawford" <> wrote in message
    >> news:%23MvwhxB$...
    >>> [SecurityException: Requested registry access is not allowed.]
    >>> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    >>> +473
    >>>
    >>>
    >>> Hi
    >>>
    >>> I have installed the enterprise library on a development machine and
    >>> created a project
    >>> on our webserver. When I run a simple data access page I get an error
    >>> message. Apparently
    >>> this is well documented and to do with the permissions on the server as
    >>> asp.net tries to do something
    >>> to the event log. This is dotnet 2003
    >>>
    >>> The ms fix is a registry hack. However there is no way i can ever
    >>> persuade an ISP to do that,
    >>> so it is out of the question. I have googled myself blind without
    >>> finding out much more.
    >>>
    >>> The question is, has anyone ever solved this without fixing the server
    >>> security or should
    >>> I dump the whole enterprise library.
    >>>
    >>> I would be grateful for any help
    >>>
    >>> thanks
    >>>
    >>> jonathan
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> ===============
    >>> Jonathan Crawford
    >>>
    >>> ===============
    >>>

    >>
    >>

    >
    >
     
    Bruce Barker, Dec 9, 2005
    #5
  6. Hi

    Thanks for your help.

    I am sorry to say I have abandoned the application block.
    I can't make head nor tail of the documentation, there is a levvel
    of complexity which is way beyond my requirements.

    The enterprise block was supposed to make things easier, however I have
    spent 2 days not getting it to work, which is much more time then
    it would have saved me if it worked in the first place.

    thanks

    jonathan






    ===============
    Jonathan Crawford

    ===============
    "Morgan" <> wrote in message
    news:%23NxE91C$...
    > You'll need to go into the configuration block and remove some of the
    > compiler directives, one of which is "WMI" or similar.
    >
    >
    > "Jonathan Crawford" <> wrote in message
    > news:OoNzRQC$...
    >> Thanks Bruce
    >>
    >> trouble is I have no idea what the event log sink is
    >> nor how to disable it.
    >>
    >> As far as I know the only code I am using
    >> accesses the data block, I have no wish for it to do
    >> anything with the event log. These enterprise blocks
    >> seem to be doing it by themsleves.
    >>
    >>
    >> thanks
    >>
    >> jonathan
    >>
    >> --
    >> ===============
    >> Jonathan Crawford
    >>
    >> ===============
    >> "Bruce Barker" <> wrote in message
    >> news:eHv615B$...
    >>> for any application to log to the eventlog, it needs a registery key
    >>> created (.../EventLog/Application/yourAppName), and access to that key.
    >>> if the key doesn't exist, it attempts to create it, but usually it will
    >>> not have write access to the parent key.
    >>>
    >>> if your isp allows access to the eventlog, then they should create the
    >>> key, and give you an appname. if not, then you should not log errors to
    >>> the eventlog (disable the eventlog sink).
    >>>
    >>>
    >>> -- bruce (sqlwork.com)
    >>>
    >>> "Jonathan Crawford" <> wrote in message
    >>> news:%23MvwhxB$...
    >>>> [SecurityException: Requested registry access is not allowed.]
    >>>> Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
    >>>> +473
    >>>>
    >>>>
    >>>> Hi
    >>>>
    >>>> I have installed the enterprise library on a development machine and
    >>>> created a project
    >>>> on our webserver. When I run a simple data access page I get an error
    >>>> message. Apparently
    >>>> this is well documented and to do with the permissions on the server as
    >>>> asp.net tries to do something
    >>>> to the event log. This is dotnet 2003
    >>>>
    >>>> The ms fix is a registry hack. However there is no way i can ever
    >>>> persuade an ISP to do that,
    >>>> so it is out of the question. I have googled myself blind without
    >>>> finding out much more.
    >>>>
    >>>> The question is, has anyone ever solved this without fixing the server
    >>>> security or should
    >>>> I dump the whole enterprise library.
    >>>>
    >>>> I would be grateful for any help
    >>>>
    >>>> thanks
    >>>>
    >>>> jonathan
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> ===============
    >>>> Jonathan Crawford
    >>>>
    >>>> ===============
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Jonathan Crawford, Dec 11, 2005
    #6
  7. Jonathan Crawford

    Guest

    I hope, developers at Microsoft read these articles and think of these
    kinds of problem for all their future development :)
    They always say "We listen to community" but not sure, how true that
    statement is
     
    , Dec 11, 2005
    #7
    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. Showjumper
    Replies:
    1
    Views:
    722
    Showjumper
    Mar 19, 2005
  2. =?Utf-8?B?QWhzYW4=?=
    Replies:
    0
    Views:
    1,385
    =?Utf-8?B?QWhzYW4=?=
    Mar 31, 2005
  3. lac
    Replies:
    1
    Views:
    530
  4. Replies:
    0
    Views:
    416
  5. levon
    Replies:
    0
    Views:
    668
    levon
    Sep 28, 2005
Loading...

Share This Page