Security Exception with Enterprise Library Data Block

  • Thread starter Jonathan Crawford
  • Start date
J

Jonathan Crawford

[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
(e-mail address removed)
===============
 
B

Bruce Barker

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)
 
J

Jonathan Crawford

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
(e-mail address removed)
===============
Bruce Barker said:
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 said:
[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
(e-mail address removed)
===============
 
M

Morgan

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 said:
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
(e-mail address removed)
===============
Bruce Barker said:
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 said:
[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
(e-mail address removed)
===============
 
B

Bruce Barker

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

-- bruce (sqlwork.com)


Jonathan Crawford said:
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
(e-mail address removed)
===============
Bruce Barker said:
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 said:
[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
(e-mail address removed)
===============
 
J

Jonathan Crawford

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
(e-mail address removed)
===============
Morgan said:
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 said:
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
(e-mail address removed)
===============
Bruce Barker said:
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)

[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
(e-mail address removed)
===============
 
P

prabhupr

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top