Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 31st, 2003, 07:52 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Application Blocks Exception Management

Hi Folks

Has anyone out there experience of implementing Exception Blocks into an asp.net application?

I've intalled and referenced Microsoft.ApplicationBlocks.ExceptionManagement.dl l, and written a small routine to force a runtime error.

Sub Click(ByVal s As Object, ByVal e As EventArgs)

        Dim x As Integer
        Dim y As Integer
        Try
            x = 5 / y
        Catch ex As Exception
            ExceptionManager.Publish(ex)
        End Try

End Sub

What I would like to do is publish the exception to a text file (pref an SQL db, so if anyone has some advice on this it would be good), but I'm getting to following error:

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

This is because the exception manager is trying to write to the application log.

Is it possible to simply write to the text file and not the application log?

My web.config code is as follows:

<section name="exceptionManagement" type="Microsoft.ApplicationBlocks.ExceptionManagem ent.ExceptionManagerSectionHandler,Microsoft.Appli cationBlocks.ExceptionManagement" />

Defined in <configSections>

And:

<exceptionManagement>
<publisher
mode="on"
assembly="CustomPublisher"
type="CustomPublisher.ExceptionPublisher"
include="*"
fileName="c:\CustomPub.txt" />
</exceptionManagement>

Any help and advice would be greatly appreciated.

TIA

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
COM Exception while Run the C# Application saravanan.k C# 0 March 19th, 2007 09:04 AM
The 7 application blocks EricJ General .NET 0 June 30th, 2005 06:57 AM
vb.net window application Management resources CuuTrinh Pro VB.NET 2002/2003 3 September 10th, 2004 06:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.