Exception Handling Application Block

P

Polly Anna

Hi,

I am using the Exception Handling Application Block, which is lovely. I
have been able to create a flat file as well as create an entry in the Event
Log.

However I am unable to create an entry into the database using the database
trace listener. I followed the following steps -

1/ I have added a database trace listener to my Exception Handling
Application Block.

2/ I have configured the connection string which includes a user name and
password. (I was able to test the connection to the db using an udl file)

3/ I have added the trace listener to Special Sources > All events

4/ I have created a category (I called it DBCategory) in Category Sources
for the database trace listener.

5/ I have created a Policy (I called it DBLog Policy) that has a Logging
Handler which references the Log Category above (DBCategory)

When I use the policy in my code, it does not make an entry into the Message
table of the special logging db.

Please can someone help me. I would be most grateful for any help or
pointers.


Kind regards,

Polly Anna
 
J

Jeff Winn

I had to do something similar before when we needed to be able to log across
all of our applications into a single database. You might want to check out
the project I wrote on CodePlex to get some ideas about what you could do
with it rather than using the built in mechanisms.

http://www.codeplex.com/NException
 
P

Polly Anna

Hi Jeff,

thank you very very much. It is all working now and I am so grateful.
Thank you.

Kind regards,

Polly Anna
 

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

Top