Exception Management AB Issue in ASP.NET

G

Guest

I'm trying to use the "Exception Management Application Block" that Microsoft supplies. I've built and included all the relevant code but I'm hitting a wall. When throwing an exception to be generated in the event log in XML I get the following error on line 515:

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

Source Error:


Line 513: Private Sub VerifyValidSource()
Line 514: Try
Line 515: If Not EventLog.SourceExists(applicationName) Then
Line 516: EventLog.CreateEventSource(applicationName, logName)
Line 517: End If


In order to try to resolve this I've added the ASPNET account in to the Administrators group and made permisson changes to the registry EventLog hive but no joy. Microsoft's documentation suggests that this was an issue in the beta version of their code but not in the release version.

http://msdn.microsoft.com/library/en-us/dnbda/html/emab-rm.asp?frame=true&_r=1

Has anyone solved this issue or can offer assistance that would be great.

Thanks

Damon
 
H

Hans Kesting

damon.f said:
I'm trying to use the "Exception Management Application Block" that
Microsoft supplies. I've built and included all the relevant code but I'm
hitting a wall. When throwing an exception to be generated in the event log
in XML I get the following error on line 515:
System.Security.SecurityException: Requested registry access is not allowed.

Source Error:


Line 513: Private Sub VerifyValidSource()
Line 514: Try
Line 515: If Not EventLog.SourceExists(applicationName) Then
Line 516: EventLog.CreateEventSource(applicationName, logName)
Line 517: End If


In order to try to resolve this I've added the ASPNET account in to the
Administrators group and made permisson changes to the registry EventLog
hive but no joy. Microsoft's documentation suggests that this was an issue
in the beta version of their code but not in the release version.
http://msdn.microsoft.com/library/en-us/dnbda/html/emab-rm.asp?frame=true&_r=1

Has anyone solved this issue or can offer assistance that would be great.

Thanks

Damon

I've had that problem also. You need to "install" this block (on the
development machine(s)
and the server(s) where you deploy the app):
* start the "Visual Studio Command Prompt"
* go to the directory containing (some copy of) the dll's of this block
* execute " InstallUtil Microsoft.ApplicationBlocks.ExceptionManagement.dll
"
This will grant this block access to the eventlog.

After that it works perfectly.

Hans Kesting
 

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

No members online now.

Forum statistics

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

Latest Threads

Top