By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,703 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,703 IT Pros & Developers. It's quick & easy.

Security Exception with Enterprise Library Data Block

P: n/a
[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
jc@tgsi.net
===============
Dec 8 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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" <jc@jcrawford.co.uk> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
[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
jc@tgsi.net
===============

Dec 8 '05 #2

P: n/a
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
jc@tgsi.net
===============
"Bruce Barker" <br******************@safeco.com> wrote in message
news:eH*************@TK2MSFTNGP15.phx.gbl...
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" <jc@jcrawford.co.uk> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
[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
jc@tgsi.net
===============


Dec 8 '05 #3

P: n/a
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" <jc@jcrawford.co.uk> wrote in message
news:Oo*************@TK2MSFTNGP14.phx.gbl...
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
jc@tgsi.net
===============
"Bruce Barker" <br******************@safeco.com> wrote in message
news:eH*************@TK2MSFTNGP15.phx.gbl...
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" <jc@jcrawford.co.uk> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
[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
jc@tgsi.net
===============



Dec 8 '05 #4

P: n/a
the data block is built on the logging block. read documentation of the
logging block.

-- bruce (sqlwork.com)
"Jonathan Crawford" <jc@jcrawford.co.uk> wrote in message
news:Oo*************@TK2MSFTNGP14.phx.gbl...
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
jc@tgsi.net
===============
"Bruce Barker" <br******************@safeco.com> wrote in message
news:eH*************@TK2MSFTNGP15.phx.gbl...
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" <jc@jcrawford.co.uk> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
[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
jc@tgsi.net
===============



Dec 9 '05 #5

P: n/a
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
jc@tgsi.net
===============
"Morgan" <ab**@senditon.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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" <jc@jcrawford.co.uk> wrote in message
news:Oo*************@TK2MSFTNGP14.phx.gbl...
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
jc@tgsi.net
===============
"Bruce Barker" <br******************@safeco.com> wrote in message
news:eH*************@TK2MSFTNGP15.phx.gbl...
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" <jc@jcrawford.co.uk> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
[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
jc@tgsi.net
===============



Dec 11 '05 #6

P: n/a
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 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.